Factor out the code for EFI boot slightly
Only use -eltorito-alt-boot when we need to
This commit is contained in:
parent
aff1c7700d
commit
d2b08bb059
|
@ -474,22 +474,29 @@ if [ -d boot$N/isolinux/grub ] ; then
|
||||||
mcopy -o -i "$CDDIR/boot/grub/efi.img" $CDDIR/efi/boot/boot*.efi \
|
mcopy -o -i "$CDDIR/boot/grub/efi.img" $CDDIR/efi/boot/boot*.efi \
|
||||||
"::efi/boot"
|
"::efi/boot"
|
||||||
|
|
||||||
# Ugh - different code here depending on the version of xorriso we've got
|
if [ $BOOT_EFI = 2 ] ; then
|
||||||
if [ $XORRISO_VER -le 10202 ] ; then
|
# We're being added alongside (after) a BIOS boot record. Tell
|
||||||
# 1.2.2 shipping in Wheezy
|
# xorriso to create a (secondary) ElTorito boot record for the
|
||||||
echo "Using older EFI command line for xorriso $XORRISO_VER"
|
# EFI bootloader. Otherwise, xorriso will create it as the
|
||||||
# Tell xorriso to create a secondary ElTorito boot record for the
|
# primary.
|
||||||
# EFI bootloader
|
add_mkisofs_opt $CDDIR/../$N.mkisofs_opts "-eltorito-alt-boot"
|
||||||
add_mkisofs_opt $CDDIR/../$N.mkisofs_opts "-eltorito-alt-boot --efi-boot boot/grub/efi.img"
|
fi
|
||||||
# Add the efi image as a FAT partition too, so our CD image will
|
|
||||||
# also boot on a USB key (like isohybrid, just implemented
|
# also boot on a USB key (like isohybrid, just implemented
|
||||||
# differently)
|
# differently)
|
||||||
add_mkisofs_opt $CDDIR/../$N.mkisofs_opts "-append_partition 2 0x01 $CDDIR/boot/grub/efi.img"
|
add_mkisofs_opt $CDDIR/../$N.mkisofs_opts "-append_partition 2 0x01 $CDDIR/boot/grub/efi.img"
|
||||||
|
|
||||||
elif [ $XORRISO_VER -gt 10202 ] ; then
|
elif [ $XORRISO_VER -gt 10202 ] ; then
|
||||||
echo "Using newer EFI support in xorriso $XORRISO_VER"
|
echo "Using newer EFI support in xorriso $XORRISO_VER"
|
||||||
add_mkisofs_opt $CDDIR/../$N.mkisofs_opts "-eltorito-alt-boot -e boot/grub/efi.img -no-emul-boot"
|
add_mkisofs_opt $CDDIR/../$N.mkisofs_opts "-e boot/grub/efi.img -no-emul-boot"
|
||||||
add_mkisofs_opt $CDDIR/../$N.mkisofs_opts "-isohybrid-gpt-basdat -isohybrid-apm-hfsplus"
|
add_mkisofs_opt $CDDIR/../$N.mkisofs_opts "-isohybrid-gpt-basdat -isohybrid-apm-hfsplus"
|
||||||
|
# Ugh - different code here depending on the version of xorriso we've got
|
||||||
|
if [ $XORRISO_VER -le 10202 ] ; then
|
||||||
|
# 1.2.2 shipping in Wheezy
|
||||||
|
echo "Using older EFI command line for xorriso $XORRISO_VER"
|
||||||
|
|
||||||
|
add_mkisofs_opt $CDDIR/../$N.mkisofs_opts "--efi-boot boot/grub/efi.img"
|
||||||
|
# Add the efi image as a FAT partition too, so our CD image will
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
echo " No EFI boot code for $ARCH on CD$N"
|
echo " No EFI boot code for $ARCH on CD$N"
|
||||||
|
|
Loading…
Reference in New Issue