2011-05-09 14:47:25 +00:00
|
|
|
<%page args="ANABOOTDIR, KERNELDIR, efiarch"/>
|
|
|
|
<% EFIBOOTDIR="EFI/BOOT" %>
|
|
|
|
|
|
|
|
mkdir ${EFIBOOTDIR}
|
|
|
|
install boot/efi/EFI/redhat/grub.efi ${EFIBOOTDIR}/BOOT${efiarch}.bin
|
2011-05-10 22:21:18 +00:00
|
|
|
install boot/grub/splash.xpm.gz ${EFIBOOTDIR}
|
2011-05-09 14:47:25 +00:00
|
|
|
|
|
|
|
## actually make the EFI images
|
|
|
|
${make_efiboot("images/efidisk.img", include_kernel=True, disk=True)}
|
|
|
|
${make_efiboot("images/efiboot.img", include_kernel=False)}
|
|
|
|
|
|
|
|
## This is kinda gross, but then... so's EFI.
|
|
|
|
<%def name="make_efiboot(img, include_kernel, disk=False)">
|
|
|
|
<%
|
|
|
|
kdir = EFIBOOTDIR if include_kernel else KERNELDIR
|
|
|
|
args = "--label=ANACONDA"
|
|
|
|
if disk: args += " --disk"
|
|
|
|
%>
|
|
|
|
%if include_kernel:
|
|
|
|
copy ${KERNELDIR}/vmlinuz ${EFIBOOTDIR}
|
2011-05-10 22:21:18 +00:00
|
|
|
copy ${KERNELDIR}/initrd.img ${EFIBOOTDIR}
|
2011-05-09 14:47:25 +00:00
|
|
|
%endif
|
|
|
|
install ${ANABOOTDIR}/grub.conf ${EFIBOOTDIR}/BOOT${efiarch}.conf
|
|
|
|
replace @PRODUCT@ ${product.name} ${EFIBOOTDIR}/BOOT${efiarch}.conf
|
|
|
|
replace @VERSION@ ${product.version} ${EFIBOOTDIR}/BOOT${efiarch}.conf
|
|
|
|
replace @KERNELPATH@ /${kdir}/vmlinuz ${EFIBOOTDIR}/BOOT${efiarch}.conf
|
2011-05-10 22:21:18 +00:00
|
|
|
replace @INITRDPATH@ /${kdir}/initrd.img ${EFIBOOTDIR}/BOOT${efiarch}.conf
|
2011-05-09 14:47:25 +00:00
|
|
|
replace @SPLASHPATH@ /EFI/BOOT/splash.xpm.gz ${EFIBOOTDIR}/BOOT${efiarch}.conf
|
|
|
|
%if efiarch == 'IA32':
|
|
|
|
copy ${EFIBOOTDIR}/BOOT${efiarch}.conf ${EFIBOOTDIR}/BOOT.conf
|
|
|
|
%endif
|
|
|
|
runcmd mkefiboot ${args} ${outroot}/${EFIBOOTDIR} ${outroot}/${img}
|
|
|
|
%if include_kernel:
|
|
|
|
remove ${EFIBOOTDIR}/vmlinuz
|
2011-05-10 22:21:18 +00:00
|
|
|
remove ${EFIBOOTDIR}/initrd.img
|
2011-05-09 14:47:25 +00:00
|
|
|
%endif
|
|
|
|
</%def>
|