Build EFI hybrid (usb-bootable) images
From: Matthew Garrett <mjg@redhat.com> If we're producing EFI bootable images then we should also support making them bootable from USB sticks. This adds support for doing so.
This commit is contained in:
parent
219911f37c
commit
bf7ed5aa4e
@ -31,7 +31,7 @@ Requires: squashfs-tools >= 4.2
|
|||||||
Requires: e2fsprogs
|
Requires: e2fsprogs
|
||||||
|
|
||||||
%ifarch %{ix86} x86_64
|
%ifarch %{ix86} x86_64
|
||||||
Requires: syslinux
|
Requires: syslinux >= 4.02-5
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%ifarch %{sparc}
|
%ifarch %{sparc}
|
||||||
|
@ -49,12 +49,13 @@ hardlink ${KERNELDIR}/initrd.img ${BOOTDIR}
|
|||||||
|
|
||||||
## WHeeeeeeee, EFI.
|
## WHeeeeeeee, EFI.
|
||||||
## We could remove the basearch restriction someday..
|
## We could remove the basearch restriction someday..
|
||||||
<% efiargs=""; efigraft="" %>
|
<% efiargs=""; efigraft=""; efihybrid="" %>
|
||||||
%if exists("boot/efi/EFI/redhat/grub.efi") and basearch != 'i386':
|
%if exists("boot/efi/EFI/redhat/grub.efi") and basearch != 'i386':
|
||||||
<%
|
<%
|
||||||
efiarch = 'X64' if basearch=='x86_64' else 'IA32'
|
efiarch = 'X64' if basearch=='x86_64' else 'IA32'
|
||||||
efiargs="-eltorito-alt-boot -e images/efiboot.img -no-emul-boot"
|
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)
|
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"/>
|
<%include file="efi.tmpl" args="configdir=configdir, KERNELDIR=KERNELDIR, efiarch=efiarch"/>
|
||||||
%endif
|
%endif
|
||||||
@ -67,5 +68,5 @@ runcmd mkisofs -o ${outroot}/images/boot.iso \
|
|||||||
${KERNELDIR}=${outroot}/${KERNELDIR} \
|
${KERNELDIR}=${outroot}/${KERNELDIR} \
|
||||||
LiveOS/squashfs.img=${outroot}/images/install.img \
|
LiveOS/squashfs.img=${outroot}/images/install.img \
|
||||||
${efigraft}
|
${efigraft}
|
||||||
runcmd isohybrid ${outroot}/images/boot.iso
|
runcmd isohybrid ${efihybrid} ${outroot}/images/boot.iso
|
||||||
treeinfo images-${basearch} boot.iso images/boot.iso
|
treeinfo images-${basearch} boot.iso images/boot.iso
|
||||||
|
Loading…
Reference in New Issue
Block a user