Skip to content

Commit

Permalink
Add product.img support for s390 templates
Browse files Browse the repository at this point in the history
  • Loading branch information
sharkcz authored and bcl committed Apr 29, 2015
1 parent 80ed500 commit a2c2a4b
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
10 changes: 10 additions & 0 deletions share/live/s390.tmpl
Expand Up @@ -4,6 +4,7 @@ configdir="tmp/config_files/s390"
BOOTDIR="images"
KERNELDIR=BOOTDIR
INITRD_ADDRESS="0x02000000"
LORAXDIR="usr/share/lorax/"
# The assumption seems to be that there is only one s390 kernel, ever
kernel = kernels[0]
%>
Expand Down Expand Up @@ -31,3 +32,12 @@ createaddrsize ${INITRD_ADDRESS} ${outroot}/${BOOTDIR}/initrd.img ${outroot}/${B
treeinfo images-${basearch} initrd.addrsize ${BOOTDIR}/initrd.addrsize
treeinfo images-${basearch} generic.prm ${BOOTDIR}/generic.prm
treeinfo images-${basearch} generic.ins generic.ins

# 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
17 changes: 17 additions & 0 deletions share/s390.tmpl
Expand Up @@ -4,6 +4,7 @@ configdir="tmp/config_files/s390"
BOOTDIR="images"
KERNELDIR=BOOTDIR
INITRD_ADDRESS="0x02000000"
LORAXDIR="usr/share/lorax/"
# The assumption seems to be that there is only one s390 kernel, ever
kernel = kernels[0]
%>
Expand Down Expand Up @@ -38,3 +39,19 @@ treeinfo images-${basearch} initrd.addrsize ${BOOTDIR}/initrd.addrsize
treeinfo images-${basearch} generic.prm ${BOOTDIR}/generic.prm
treeinfo images-${basearch} genericdvd.prm ${BOOTDIR}/genericdvd.prm
treeinfo images-${basearch} generic.ins generic.ins

# 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

# Inherit iso-graft/ if it exists from external templates
<%
import os
if os.path.exists(workdir + "/iso-graft"):
imggraft += " " + workdir + "/iso-graft"
%>

0 comments on commit a2c2a4b

Please sign in to comment.