lorax-templates-rhel/80-rhel/arm.tmpl
Will Woods 2f477626fa Add the rest of the files
...turns out you can't just have a single template file, because lorax
just picks a single directory and expects all the data it needs to be
there. Sigh.

So this adds all the rest of the files, plus some Makefile machinery for
generating a tarball and updating the specfile after you've checked in
changes. See README for details.
2018-06-18 15:32:22 -04:00

59 lines
1.7 KiB
Cheetah

<%page args="kernels, runtime_img, runtime_base, basearch, outroot, arch"/>
<%
configdir="tmp/config_files/uboot"
PXEBOOTDIR="images/pxeboot"
DTBDIR="images/pxeboot/dtb"
BOOTDIR="boot"
KERNELDIR=PXEBOOTDIR
STAGE2IMG="images/install.img"
LORAXDIR="usr/share/lorax/"
# keep a comma-delimited list of platforms installed to add to .treeinfo
platforms = ""
delimiter = ''
from os.path import basename
%>
mkdir images
install ${runtime_img} ${STAGE2IMG}
treeinfo stage2 mainimage ${STAGE2IMG}
mkdir ${DTBDIR}
install boot/dtb-*/*dtb ${DTBDIR}/
## install kernels
mkdir ${KERNELDIR}
%for kernel in kernels:
%if kernel.flavor:
installkernel images-${kernel.flavor}-${basearch} ${kernel.path} ${KERNELDIR}/vmlinuz-${kernel.flavor}
installinitrd images-${kernel.flavor}-${basearch} ${kernel.initrd.path} ${KERNELDIR}/initrd-${kernel.flavor}.img
<%
platforms = platforms + delimiter + kernel.flavor
delimiter = ','
%>
%else:
installkernel images-${basearch} ${kernel.path} ${KERNELDIR}/vmlinuz
installinitrd images-${basearch} ${kernel.initrd.path} ${KERNELDIR}/initrd.img
%endif
%endfor
# add platform to treeinfo for Beaker support
treeinfo ${basearch} platforms ${platforms}
# Create optional product.img and updates.img
<% images=["product", "updates"] %>
%for img in images:
%if exists("%s/%s/" % (LORAXDIR, img)):
installimg --xz -9 --memlimit-compress=3700MiB ${LORAXDIR}/${img}/ images/${img}.img
treeinfo images-${basearch} ${img}.img images/${img}.img
%endif
%endfor
# Add the license files
%for f in glob("/usr/share/licenses/*-release/*"):
install ${f} ${f|basename}
%endfor
## FIXME: ARM may need some extra boot config