From ea1f8911cd69216027df5f9d727f47a1b67ef29b Mon Sep 17 00:00:00 2001 From: Filip Pytloun Date: Wed, 9 Mar 2016 11:09:41 +0100 Subject: Refactor: split bootstrap actions and allow custom --- bootstrap.d/10-bootstrap.sh | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 bootstrap.d/10-bootstrap.sh (limited to 'bootstrap.d/10-bootstrap.sh') diff --git a/bootstrap.d/10-bootstrap.sh b/bootstrap.d/10-bootstrap.sh new file mode 100644 index 0000000..fdccfba --- /dev/null +++ b/bootstrap.d/10-bootstrap.sh @@ -0,0 +1,27 @@ +# +# Debootstrap basic system +# + +. ./functions.sh + +# Base debootstrap (unpack only) +if [ "$ENABLE_MINBASE" = true ] ; then + http_proxy=${APT_PROXY} debootstrap --arch=armhf --variant=minbase --foreign --include=${APT_INCLUDES} $RELEASE $R http://${APT_SERVER}/debian +else + http_proxy=${APT_PROXY} debootstrap --arch=armhf --foreign --include=${APT_INCLUDES} $RELEASE $R http://${APT_SERVER}/debian +fi + +# Copy qemu emulator binary to chroot +cp /usr/bin/qemu-arm-static $R/usr/bin + +# Copy debian-archive-keyring.pgp +mkdir -p $R/usr/share/keyrings +cp /usr/share/keyrings/debian-archive-keyring.gpg $R/usr/share/keyrings/debian-archive-keyring.gpg + +# Complete the bootstrapping process +chroot_exec /debootstrap/debootstrap --second-stage + +# Mount required filesystems +mount -t proc none $R/proc +mount -t sysfs none $R/sys +mount --bind /dev/pts $R/dev/pts -- cgit v1.2.3