17179f2120
Anaconda dropped the addrsize utility in F-16, so we need to implement it directly in lorax.
41 lines
1.3 KiB
Cheetah
41 lines
1.3 KiB
Cheetah
<%page args="kernels, runtime_img, basearch, outroot"/>
|
|
<%
|
|
configdir="tmp/config_files/s390"
|
|
BOOTDIR="images"
|
|
KERNELDIR=BOOTDIR
|
|
INITRD_ADDRESS="0x02000000"
|
|
MKCDBOOT="usr/libexec/anaconda/mk-s390-cdboot"
|
|
# The assumption seems to be that there is only one s390 kernel, ever
|
|
kernel = kernels[0]
|
|
%>
|
|
|
|
mkdir images
|
|
install ${runtime_img} images
|
|
|
|
## install bootloader (such as it is) and bootloader config
|
|
install ${configdir}/redhat.exec ${BOOTDIR}
|
|
install ${configdir}/generic.prm ${BOOTDIR}
|
|
install ${configdir}/generic.ins .
|
|
|
|
## configure bootloader
|
|
replace @INITRD_LOAD_ADDRESS@ ${INITRD_ADDRESS} generic.ins
|
|
|
|
## 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
|
|
treeinfo images-${basearch} generic.ins generic.ins
|
|
|
|
## make cdboot.img
|
|
runcmd ${MKCDBOOT} \
|
|
-i ${outroot}/${kernel.path} \
|
|
-r ${outroot}/${kernel.initrd.path} \
|
|
-p ${outroot}/${BOOTDIR}/generic.prm \
|
|
-o ${outroot}/${BOOTDIR}/cdboot.img
|