2019-06-18 18:33:05 +00:00
|
|
|
<%page args="kernels, runtime_img, runtime_base, basearch, outroot, extra_boot_args"/>
|
2012-07-27 14:45:57 +00:00
|
|
|
<%
|
|
|
|
configdir="tmp/config_files/s390"
|
|
|
|
BOOTDIR="images"
|
|
|
|
KERNELDIR=BOOTDIR
|
|
|
|
INITRD_ADDRESS="0x02000000"
|
2015-04-29 14:35:41 +00:00
|
|
|
LORAXDIR="usr/share/lorax/"
|
2012-07-27 14:45:57 +00:00
|
|
|
# The assumption seems to be that there is only one s390 kernel, ever
|
|
|
|
kernel = kernels[0]
|
|
|
|
%>
|
|
|
|
|
|
|
|
mkdir images
|
|
|
|
install ${runtime_img} images
|
|
|
|
treeinfo stage2 mainimage images/${runtime_base}
|
|
|
|
|
|
|
|
## install bootloader (such as it is) and bootloader config
|
|
|
|
install ${configdir}/redhat.exec ${BOOTDIR}
|
|
|
|
install ${configdir}/generic.prm ${BOOTDIR}
|
2016-08-01 21:24:44 +00:00
|
|
|
install ${configdir}/genericdvd.prm ${BOOTDIR}
|
2012-07-27 14:45:57 +00:00
|
|
|
install ${configdir}/generic.ins .
|
|
|
|
|
|
|
|
## configure bootloader
|
|
|
|
replace @INITRD_LOAD_ADDRESS@ ${INITRD_ADDRESS} generic.ins
|
2019-06-18 18:33:05 +00:00
|
|
|
replace @EXTRA@ '${extra_boot_args}' ${BOOTDIR}/generic.prm
|
2012-07-27 14:45:57 +00:00
|
|
|
|
|
|
|
## install kernel
|
|
|
|
installkernel images-${basearch} ${kernel.path} ${KERNELDIR}/kernel.img
|
|
|
|
installinitrd images-${basearch} ${kernel.initrd.path} ${KERNELDIR}/initrd.img
|
|
|
|
|
|
|
|
## s390 needs some extra boot config
|
|
|
|
createaddrsize ${INITRD_ADDRESS} ${outroot}/${BOOTDIR}/initrd.img ${outroot}/${BOOTDIR}/initrd.addrsize
|
|
|
|
|
|
|
|
## s390 also has some special treeinfo data
|
|
|
|
treeinfo images-${basearch} initrd.addrsize ${BOOTDIR}/initrd.addrsize
|
|
|
|
treeinfo images-${basearch} generic.prm ${BOOTDIR}/generic.prm
|
2016-08-01 21:24:44 +00:00
|
|
|
treeinfo images-${basearch} genericdvd.prm ${BOOTDIR}/genericdvd.prm
|
2012-07-27 14:45:57 +00:00
|
|
|
treeinfo images-${basearch} generic.ins generic.ins
|
2019-06-18 18:33:05 +00:00
|
|
|
treeinfo images-${basearch} redhat.exec ${BOOTDIR}/redhat.exec
|
2015-04-29 14:35:41 +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
|