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.
 
 
 
 
 

36 lines
923 B

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