2013-12-12 22:15:13 +00:00
|
|
|
<%page args="kernels, runtime_img, basearch, outroot, product, isolabel"/>
|
|
|
|
<%
|
|
|
|
configdir="tmp/config_files/aarch64"
|
|
|
|
PXEBOOTDIR="images/pxeboot"
|
|
|
|
KERNELDIR=PXEBOOTDIR
|
|
|
|
LIVEDIR="LiveOS"
|
2014-11-05 03:07:57 +00:00
|
|
|
LORAXDIR="usr/share/lorax/"
|
2013-12-12 22:15:13 +00:00
|
|
|
%>
|
|
|
|
|
|
|
|
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="" %>
|
2014-02-20 04:33:08 +00:00
|
|
|
%if exists("boot/efi/EFI/*/grubaa64.efi"):
|
2013-12-12 22:15:13 +00:00
|
|
|
<%
|
2014-09-26 20:40:38 +00:00
|
|
|
efiarch = 'AA64'
|
2013-12-12 22:15:13 +00:00
|
|
|
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, efiarch=efiarch, isolabel=isolabel"/>
|
|
|
|
%endif
|
|
|
|
|
2014-11-05 03:07:57 +00:00
|
|
|
# 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
|
|
|
|
|