aboutsummaryrefslogtreecommitdiff
path: root/bootstrap.d/10-bootstrap.sh
diff options
context:
space:
mode:
authorVincent Knecht <vincent.knecht@mailoo.org>2016-03-12 00:54:23 +0100
committerVincent Knecht <vincent.knecht@mailoo.org>2016-03-12 00:54:23 +0100
commit061173da65b0b6061d7fa46066c69737bc4957fe (patch)
treec472df2edb495adb8e0a9012de5bb14242865f82 /bootstrap.d/10-bootstrap.sh
parent54acc1e70a3e357d0c60e4d9a9afd99077edce84 (diff)
parent80185bd93dd9eecb1b41ef8ac9a186aff19ab33e (diff)
downloadrpi2-gen-image-061173da65b0b6061d7fa46066c69737bc4957fe.tar.gz
rpi2-gen-image-061173da65b0b6061d7fa46066c69737bc4957fe.tar.bz2
rpi2-gen-image-061173da65b0b6061d7fa46066c69737bc4957fe.zip
Added ENABLE_SPLITFS option to produce distinct /boot/firmware and root images
Diffstat (limited to 'bootstrap.d/10-bootstrap.sh')
-rw-r--r--bootstrap.d/10-bootstrap.sh27
1 files changed, 27 insertions, 0 deletions
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