45 lines
1.4 KiB
Cheetah
45 lines
1.4 KiB
Cheetah
<%page args="kernels, runtime_img, runtime_base, basearch, outroot, arch"/>
|
|
<%
|
|
configdir="tmp/config_files/uboot"
|
|
PXEBOOTDIR="images/pxeboot"
|
|
BOOTDIR="boot"
|
|
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:
|
|
%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
|
|
|
|
treeinfo images-${kernel.flavor}-${basearch} uimage ${KERNELDIR}/uImage-${kernel.flavor}
|
|
treeinfo images-${kernel.flavor}-${basearch} uinitrd ${KERNELDIR}/uInitrd-${kernel.flavor}
|
|
|
|
%else:
|
|
installkernel images-${basearch} ${kernel.path} ${KERNELDIR}/vmlinuz
|
|
installinitrd images-${basearch} ${kernel.initrd.path} ${KERNELDIR}/initrd.img
|
|
|
|
treeinfo images-${basearch} uimage ${KERNELDIR}/uImage
|
|
treeinfo images-${basearch} uinitrd ${KERNELDIR}/uInitrd
|
|
|
|
%endif
|
|
%endfor
|
|
|
|
# Create optional product.img and updates.img
|
|
<% images=["product", "updates"] %>
|
|
%for img in images:
|
|
%if exists("%s/%s/" % (LORAXDIR, img)):
|
|
installimg ${LORAXDIR}/${img}/ images/${img}.img
|
|
%endif
|
|
%endfor
|
|
|
|
## FIXME: ARM may need some extra boot config
|
|
|