lorax/share/aarch64.tmpl
Peter Jones 460bcd8f68 Fix aarch64 efi.tmpl invocation
We didn't add "efiarch32" on aarch64 because it made no sense, but we
need to because it's not an optional argument in the other template.
Just make it efiarch32=None.

Related: rhbz#1310775

Signed-off-by: Peter Jones <pjones@redhat.com>
2017-04-07 17:31:18 -07:00

64 lines
2.2 KiB
Cheetah

<%page args="kernels, runtime_img, basearch, outroot, product, isolabel"/>
<%
configdir="tmp/config_files/aarch64"
PXEBOOTDIR="images/pxeboot"
KERNELDIR=PXEBOOTDIR
LIVEDIR="LiveOS"
LORAXDIR="usr/share/lorax/"
%>
mkdir ${LIVEDIR}
install ${runtime_img} ${LIVEDIR}/squashfs.img
treeinfo stage2 mainimage ${LIVEDIR}/squashfs.img
## install kernels
mkdir ${KERNELDIR}
%for kernel in kernels:
## normal aarch64
installkernel images-${basearch} ${kernel.path} ${KERNELDIR}/vmlinuz
installinitrd images-${basearch} ${kernel.initrd.path} ${KERNELDIR}/initrd.img
%if doupgrade:
installupgradeinitrd images-${basearch} ${kernel.upgrade.path} ${KERNELDIR}/upgrade.img
%endif
%endfor
#FIXME: this will need adjusted when we have a real bootloader.
## WHeeeeeeee, EFI.
## We could remove the basearch restriction someday..
<% efiargs=""; efigraft="" %>
%if exists("boot/efi/EFI/*/gcdaa64.efi"):
<%
efiarch = 'AA64'
efigraft="EFI/BOOT={0}/EFI/BOOT".format(outroot)
images = ["images/efiboot.img"]
for img in images:
efiargs += " -eltorito-alt-boot -e {0} -no-emul-boot".format(img)
efigraft += " {0}={1}/{0}".format(img,outroot)
%>
<%include file="efi.tmpl" args="configdir=configdir, KERNELDIR=KERNELDIR, efiarch32=None, efiarch64=efiarch, isolabel=isolabel"/>
# Create optional product.img and updates.img
<% imggraft=""; images=["product", "updates"] %>
%for img in images:
%if exists("%s/%s/" % (LORAXDIR, img)):
installimg ${LORAXDIR}/${img}/ images/${img}.img
<% imggraft += " images/{0}.img={1}/images/{0}.img".format(img, outroot) %>
%endif
%endfor
# Inherit iso-graft/ if it exists from external templates
<%
import os
if os.path.exists(workdir + "/iso-graft"):
imggraft += " " + workdir + "/iso-graft"
%>
## make boot.iso
runcmd mkisofs -o ${outroot}/images/boot.iso \
${efiargs} -R -J -V '${isolabel}' -T -graft-points \
${KERNELDIR}=${outroot}/${KERNELDIR} \
${LIVEDIR}=${outroot}/${LIVEDIR} \
${efigraft} ${imggraft}
treeinfo images-${basearch} boot.iso images/boot.iso
%endif