diff options
-rwxr-xr-x | scripts/build/binary_iso | 86 |
1 files changed, 52 insertions, 34 deletions
diff --git a/scripts/build/binary_iso b/scripts/build/binary_iso index a390f61a4..c063c703a 100755 --- a/scripts/build/binary_iso +++ b/scripts/build/binary_iso @@ -107,42 +107,60 @@ then XORRISO_OPTIONS="${XORRISO_OPTIONS} -V \"${LB_ISO_VOLUME}\"" fi -# Handle xorriso architecture specific options -case "${LB_PRIMARY_BOOTLOADER}" in - grub) - XORRISO_OPTIONS="${XORRISO_OPTIONS} -no-emul-boot -boot-load-size 4 -boot-info-table" - XORRISO_OPTIONS="${XORRISO_OPTIONS} -b boot/grub/stage2_eltorito" - XORRISO_EXCLUDE="boot/grub/stage2_eltorito" - ;; - - grub-pc) - XORRISO_OPTIONS="${XORRISO_OPTIONS} -no-emul-boot -boot-load-size 4 -boot-info-table" - XORRISO_OPTIONS="${XORRISO_OPTIONS} -b boot/grub/grub_eltorito -J" - XORRISO_EXCLUDE="boot/grub/grub_eltorito" - ;; - - syslinux) - case "${LB_MODE}" in - progress-linux) - XORRISO_OPTIONS="${XORRISO_OPTIONS} -b boot/boot.bin -c boot/boot.cat" - XORRISO_EXCLUDE="boot/boot.bin" - ;; - - *) - XORRISO_OPTIONS="${XORRISO_OPTIONS} -b isolinux/isolinux.bin -c isolinux/boot.cat" - XORRISO_EXCLUDE="isolinux/isolinux.bin" - ;; - esac +OLDIFS="$IFS" +IFS="," +BOOTLOADER_NUMBER=0 +for BOOTLOADER in ${LB_BOOTLOADERS} +do + BOOTLOADER_NUMBER=$(expr ${BOOTLOADER_NUMBER} + 1) + # Handle xorriso architecture specific options - XORRISO_OPTIONS="${XORRISO_OPTIONS} -no-emul-boot -boot-load-size 4 -boot-info-table" - ;; + # If the bootloader number is greater or equal than 2 it means + # we are not the first bootloader and thus we need to tell + # mkisosfs to add an additional eltorito entry + if [ ${BOOTLOADER_NUMBER} -ge 2 ] + then + XORRISO_OPTIONS="${XORRISO_OPTIONS} -eltorito-alt-boot " + fi + case "${BOOTLOADER}" in + grub) + XORRISO_OPTIONS="${XORRISO_OPTIONS} -no-emul-boot -boot-load-size 4 -boot-info-table" + XORRISO_OPTIONS="${XORRISO_OPTIONS} -b boot/grub/stage2_eltorito" + XORRISO_EXCLUDE="boot/grub/stage2_eltorito" + ;; + + grub-pc) + XORRISO_OPTIONS="${XORRISO_OPTIONS} -no-emul-boot -boot-load-size 4 -boot-info-table" + XORRISO_OPTIONS="${XORRISO_OPTIONS} -b boot/grub/grub_eltorito -J" + XORRISO_EXCLUDE="boot/grub/grub_eltorito" + ;; + + syslinux) + case "${LB_MODE}" in + progress-linux) + XORRISO_OPTIONS="${XORRISO_OPTIONS} -b boot/boot.bin -c boot/boot.cat" + XORRISO_EXCLUDE="boot/boot.bin" + ;; + + *) + XORRISO_OPTIONS="${XORRISO_OPTIONS} -b isolinux/isolinux.bin -c isolinux/boot.cat" + XORRISO_EXCLUDE="isolinux/isolinux.bin" + ;; + esac + + XORRISO_OPTIONS="${XORRISO_OPTIONS} -no-emul-boot -boot-load-size 4 -boot-info-table" + ;; + + + *) + Echo_warning "Bootloader on your architecture not yet supported by live-build." + Echo_warning "This will produce a most likely not bootable image (Continuing in 5 seconds)." + sleep 5 + ;; + esac - *) - Echo_warning "Bootloader on your architecture not yet supported by live-build." - Echo_warning "This will produce a most likely not bootable image (Continuing in 5 seconds)." - sleep 5 - ;; -esac +done +IFS="$OLDIFS" #if [ "${LB_DEBIAN_INSTALLER}" != "live" ] #then |