From 0f65bc4a319437d9ca36956425328ce7a798b763 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20Hor=C3=A1k?= Date: Wed, 29 Apr 2015 16:35:41 +0200 Subject: [PATCH] Add product.img support for s390 templates (cherry picked from commit a2c2a4be280794dcb1355f867466c01fd8f3de89) --- share/live/s390.tmpl | 10 ++++++++++ share/s390.tmpl | 17 +++++++++++++++++ 2 files changed, 27 insertions(+) diff --git a/share/live/s390.tmpl b/share/live/s390.tmpl index f02963d5..86e020de 100644 --- a/share/live/s390.tmpl +++ b/share/live/s390.tmpl @@ -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] %> @@ -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 diff --git a/share/s390.tmpl b/share/s390.tmpl index fa712fd7..9d7eb001 100644 --- a/share/s390.tmpl +++ b/share/s390.tmpl @@ -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] %> @@ -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" +%>