From bf7ed5aa4e05af64405478ef15af93ee3fc499a0 Mon Sep 17 00:00:00 2001 From: Will Woods Date: Mon, 29 Aug 2011 16:29:43 -0400 Subject: [PATCH] Build EFI hybrid (usb-bootable) images From: Matthew Garrett If we're producing EFI bootable images then we should also support making them bootable from USB sticks. This adds support for doing so. --- lorax.spec | 2 +- share/x86.tmpl | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/lorax.spec b/lorax.spec index 704bb65b..05009f41 100644 --- a/lorax.spec +++ b/lorax.spec @@ -31,7 +31,7 @@ Requires: squashfs-tools >= 4.2 Requires: e2fsprogs %ifarch %{ix86} x86_64 -Requires: syslinux +Requires: syslinux >= 4.02-5 %endif %ifarch %{sparc} diff --git a/share/x86.tmpl b/share/x86.tmpl index 91d09acf..8727d93e 100644 --- a/share/x86.tmpl +++ b/share/x86.tmpl @@ -49,12 +49,13 @@ hardlink ${KERNELDIR}/initrd.img ${BOOTDIR} ## WHeeeeeeee, EFI. ## We could remove the basearch restriction someday.. -<% efiargs=""; efigraft="" %> +<% efiargs=""; efigraft=""; efihybrid="" %> %if exists("boot/efi/EFI/redhat/grub.efi") and basearch != 'i386': <% efiarch = 'X64' if basearch=='x86_64' else 'IA32' efiargs="-eltorito-alt-boot -e images/efiboot.img -no-emul-boot" efigraft="EFI/BOOT={0}/EFI/BOOT images/efiboot.img={0}/images/efiboot.img".format(outroot) + efihybrid="-u" %> <%include file="efi.tmpl" args="configdir=configdir, KERNELDIR=KERNELDIR, efiarch=efiarch"/> %endif @@ -67,5 +68,5 @@ runcmd mkisofs -o ${outroot}/images/boot.iso \ ${KERNELDIR}=${outroot}/${KERNELDIR} \ LiveOS/squashfs.img=${outroot}/images/install.img \ ${efigraft} -runcmd isohybrid ${outroot}/images/boot.iso +runcmd isohybrid ${efihybrid} ${outroot}/images/boot.iso treeinfo images-${basearch} boot.iso images/boot.iso