summaryrefslogtreecommitdiff
path: root/archiso/mkarchiso
diff options
context:
space:
mode:
authorGerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>2012-04-01 12:04:00 -0300
committerGerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>2012-04-01 12:04:00 -0300
commit9069e2c103555520aa92954e9f4cf9a392925e5b (patch)
treecd025be203ab950dbcda972331e046092c81e5f7 /archiso/mkarchiso
parent67096caef2b33a6196bb5c40bb33d198bda074bb (diff)
downloadarchiso32-9069e2c103555520aa92954e9f4cf9a392925e5b.tar.xz
[archiso] mkarchiso: optionally add EFI "El Torito" boot support.
If EFI/archiso/efiboot.img exists then an alternative "El Torito" boot image is added to the ISO image compatible for EFI. This image is a FAT filesystem, that is interpreted by EFI as ESP (EFI System Partition). Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>
Diffstat (limited to 'archiso/mkarchiso')
-rwxr-xr-xarchiso/mkarchiso8
1 files changed, 8 insertions, 0 deletions
diff --git a/archiso/mkarchiso b/archiso/mkarchiso
index 3e9b112..1d7b781 100755
--- a/archiso/mkarchiso
+++ b/archiso/mkarchiso
@@ -380,6 +380,8 @@ command_checksum () {
# Create an ISO9660 filesystem from "iso" directory.
command_iso () {
+ local _iso_efi_boot_args=""
+
if [[ ! -f "${work_dir}/iso/isolinux/isolinux.bin" ]]; then
_msg_error "The file '${work_dir}/iso/isolinux/isolinux.bin' does not exist." 1
fi
@@ -387,6 +389,11 @@ command_iso () {
_msg_error "The file '${work_dir}/iso/isolinux/isohdpfx.bin' does not exist." 1
fi
+ # If exists, add an EFI "El Torito" boot image (FAT filesystem) to ISO-9660 image.
+ if [[ -f "${work_dir}/iso/EFI/archiso/efiboot.img" ]]; then
+ _iso_efi_boot_args="--efi-boot EFI/archiso/efiboot.img"
+ fi
+
_show_config iso
if _is_directory_changed "${work_dir}/iso" "${out_dir}/${img_name}"; then
@@ -406,6 +413,7 @@ command_iso () {
-eltorito-boot isolinux/isolinux.bin \
-eltorito-catalog isolinux/boot.cat \
-no-emul-boot -boot-load-size 4 -boot-info-table \
+ ${_iso_efi_boot_args} \
-isohybrid-mbr ${work_dir}/iso/isolinux/isohdpfx.bin \
-output "${out_dir}/${img_name}" \
"${work_dir}/iso/"