diff options
author | Ben Howard <ben.howard@canonical.com> | 2011-09-30 16:24:08 -0600 |
---|---|---|
committer | Daniel Baumann <daniel@debian.org> | 2011-10-05 07:38:53 +0200 |
commit | d90c311ef937a95ead004142c1d0740eca313a0a (patch) | |
tree | e2a020b20c2529d56068da01b7fa7981b21c34fc /scripts/build/lb_bootstrap_debootstrap | |
parent | 9e5218ec75190dc497224d41f68939f460573754 (diff) | |
download | vyos-live-build-d90c311ef937a95ead004142c1d0740eca313a0a.tar.gz vyos-live-build-d90c311ef937a95ead004142c1d0740eca313a0a.zip |
Adding foreign bootstrap via qemu for cross arch building.
Diffstat (limited to 'scripts/build/lb_bootstrap_debootstrap')
-rwxr-xr-x | scripts/build/lb_bootstrap_debootstrap | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/scripts/build/lb_bootstrap_debootstrap b/scripts/build/lb_bootstrap_debootstrap index 1b5f5fe05..16e478dab 100755 --- a/scripts/build/lb_bootstrap_debootstrap +++ b/scripts/build/lb_bootstrap_debootstrap @@ -137,7 +137,24 @@ then fi Echo_breakage "Running debootstrap... " - ${LB_ROOT_COMMAND} debootstrap ${DEBOOTSTRAP_OPTIONS} "${LB_PARENT_DISTRIBUTION}" chroot "${LB_PARENT_MIRROR_BOOTSTRAP}" + + # Run appropriate bootstrap, i.e. foreign or regular bootstrap + if [ "${LB_BOOTSTRAP_QEMU_ARCHITECTURES}" = "${LB_ARCHITECTURES}" ]; then + + if [ -n "${LB_BOOTSTRAP_QEMU_EXCLUDE}" ] + then + DEBOOTSTRAP_OPTIONS="${DEBOOTSTRAP_OPTIONS} --exclude=$(echo ${LB_BOOTSTRAP_QEMU_EXCLUDE} | sed 's| *|,|g')" + fi + + Echo_message "Bootstrap will be foreign" + ${LB_ROOT_COMMAND} debootstrap ${DEBOOTSTRAP_OPTIONS} --foreign "${LB_PARENT_DISTRIBUTION}" chroot "${LB_PARENT_MIRROR_BOOTSTRAP}" + + Echo_message "Running debootstrap second stage under QEMU" + cp ${LB_BOOTSTRAP_QEMU_STATIC} chroot/usr/bin + Chroot chroot /debootstrap/debootstrap --second-stage + else + ${LB_ROOT_COMMAND} debootstrap ${DEBOOTSTRAP_OPTIONS} "${LB_PARENT_DISTRIBUTION}" chroot "${LB_PARENT_MIRROR_BOOTSTRAP}" + fi if [ -n "${LB_ROOT_COMMAND}" ] then |