You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

38 regels
1005 B

  1. #!/bin/bash
  2. set -e
  3. printf "Create base rootfs directory... "
  4. mkdir -p $BASE_DIR
  5. printf "(OK)\n"
  6. if [[ "$PISDR_ARCH" != $(uname -p) ]]; then
  7. printf "Enabling qemu kernel components... "
  8. update-binfmts --enable qemu-arm > /dev/null 2>&1 | true
  9. if [ ! "$(ls -A /proc/sys/fs/binfmt_misc/)" ]; then
  10. printf "(NOK)\n"
  11. exit
  12. fi
  13. printf "(OK)\n"
  14. fi
  15. echo "Run debootstrap first stage..."
  16. if [ ! -f "${BASE_DIR}/.bootstrap_completed" ]; then
  17. qemu-debootstrap \
  18. --arch=$PISDR_ARCH \
  19. --variant=minbase \
  20. --no-merged-usr \
  21. --force-check-gpg \
  22. --keyring /usr/share/keyrings/ubuntu-archive-keyring.gpg \
  23. --include=python3,libegl1,python3-apt \
  24. $PISDR_RELEASE \
  25. $BASE_DIR
  26. touch $BASE_DIR/.bootstrap_completed
  27. fi
  28. echo "Run debootstrap first stage... (OK)"
  29. echo "Run base installation..."
  30. cd $TARGET/ansible
  31. export ANSIBLE_ROOTFS_DIR=$BASE_DIR
  32. ansible-playbook -v 00_base.yaml
  33. echo "Run base installation... (OK)"