lorax/0004-make-templates-install-upgrade.img.patch
2012-11-19 18:52:59 -06:00

108 lines
4.3 KiB
Diff

From 5df53dcbf2c1530beea9911594482b968639da2a Mon Sep 17 00:00:00 2001
From: Will Woods <wwoods@redhat.com>
Date: Tue, 13 Nov 2012 01:33:17 -0500
Subject: [PATCH 4/6] make templates install upgrade.img
---
share/arm.tmpl | 12 ++++++++++--
share/ppc.tmpl | 4 ++++
share/s390.tmpl | 4 ++++
share/x86.tmpl | 8 ++++++++
4 files changed, 26 insertions(+), 2 deletions(-)
diff --git a/share/arm.tmpl b/share/arm.tmpl
index 699b8b4..6afadca 100644
--- a/share/arm.tmpl
+++ b/share/arm.tmpl
@@ -32,7 +32,11 @@ mkdir ${KERNELDIR}
installkernel images-${kernel.flavor}-${basearch} ${kernel.path} ${KERNELDIR}/vmlinuz-${kernel.flavor}
installinitrd images-${kernel.flavor}-${basearch} ${kernel.initrd.path} ${KERNELDIR}/initrd-${kernel.flavor}.img
- # create U-Boot wrapped images
+ ## install upgrader image
+ install ${kernel.upgrader.img} ${KERNELDIR}/upgrade-${kernel.flavor}.img
+ treeinfo images-${kernel.flavor}-${basearch} upgrade ${KERNELDIR}/upgrade-${kernel.flavor}.img
+
+ ## create U-Boot wrapped images
runcmd mkimage \
-A arm -O linux -T ramdisk -C none \
@@ -55,7 +59,11 @@ mkdir ${KERNELDIR}
installkernel images-${basearch} ${kernel.path} ${KERNELDIR}/vmlinuz
installinitrd images-${basearch} ${kernel.initrd.path} ${KERNELDIR}/initrd.img
- # create U-Boot wrapped images
+ ## install upgrader image
+ install ${kernel.upgrader.img} ${KERNELDIR}/upgrade.img
+ treeinfo images-${basearch} upgrade ${KERNELDIR}/upgrade.img
+
+ ## create U-Boot wrapped images
runcmd mkimage \
-A arm -O linux -T ramdisk -C none \
diff --git a/share/ppc.tmpl b/share/ppc.tmpl
index 65215d6..984f294 100644
--- a/share/ppc.tmpl
+++ b/share/ppc.tmpl
@@ -66,6 +66,10 @@ install ${configdir}/magic ${BOOTDIR}
installkernel images-${kernel.arch} ${kernel.path} ${KERNELDIR}/vmlinuz
installinitrd images-${kernel.arch} ${kernel.initrd.path} ${KERNELDIR}/initrd.img
+ ## upgrader image
+ install ${kernel.upgrader.path} ${KERNELDIR}/upgrade.img
+ treeinfo images-${kernel.arch} upgrade ${KERNELDIR}/upgrade.img
+
## install arch-specific bootloader config
install ${configdir}/yaboot.conf.in ${KERNELDIR}/yaboot.conf
replace @BITS@ ${bits} ${KERNELDIR}/yaboot.conf
diff --git a/share/s390.tmpl b/share/s390.tmpl
index f02963d..3af81d4 100644
--- a/share/s390.tmpl
+++ b/share/s390.tmpl
@@ -24,6 +24,10 @@ replace @INITRD_LOAD_ADDRESS@ ${INITRD_ADDRESS} generic.ins
installkernel images-${basearch} ${kernel.path} ${KERNELDIR}/kernel.img
installinitrd images-${basearch} ${kernel.initrd.path} ${KERNELDIR}/initrd.img
+## upgrader image
+install ${kernel.upgrade.img} ${KERNELDIR}/upgrade.img
+treeinfo images-${basearch} upgrade ${KERNELDIR}/upgrade.img
+
## s390 needs some extra boot config
createaddrsize ${INITRD_ADDRESS} ${outroot}/${BOOTDIR}/initrd.img ${outroot}/${BOOTDIR}/initrd.addrsize
diff --git a/share/x86.tmpl b/share/x86.tmpl
index ac41d89..92e01fc 100644
--- a/share/x86.tmpl
+++ b/share/x86.tmpl
@@ -31,19 +31,27 @@ replace @ROOT@ 'inst.stage2=hd:LABEL=${isolabel|udev}' ${BOOTDIR}/isolinux.cfg
mkdir ${KERNELDIR}
%for kernel in kernels:
%if kernel.flavor:
+ ## i386 PAE
installkernel images-xen ${kernel.path} ${KERNELDIR}/vmlinuz-${kernel.flavor}
installinitrd images-xen ${kernel.initrd.path} ${KERNELDIR}/initrd-${kernel.flavor}.img
+ install ${kernel.upgrade.path} ${KERNELDIR}/upgrade-${kernel.flavor}.img
+ treeinfo images-xen upgrade ${KERNELDIR}/upgrade-${kernel.flavor}.img
%else:
+ ## normal i386, x86_64
installkernel images-${basearch} ${kernel.path} ${KERNELDIR}/vmlinuz
installinitrd images-${basearch} ${kernel.initrd.path} ${KERNELDIR}/initrd.img
+ install ${kernel.upgrade.path} ${KERNELDIR}/upgrade.img
+ treeinfo images-${basearch} upgrade ${KERNELDIR}/upgrade.img
%endif
%endfor
hardlink ${KERNELDIR}/vmlinuz ${BOOTDIR}
hardlink ${KERNELDIR}/initrd.img ${BOOTDIR}
+hardlink ${KERNELDIR}/upgrade.img ${BOOTDIR}
%if basearch == 'x86_64':
treeinfo images-xen kernel ${KERNELDIR}/vmlinuz
treeinfo images-xen initrd ${KERNELDIR}/initrd.img
+ treeinfo images-xen upgrade ${KERNELDIR}/upgrade.img
%endif
## WHeeeeeeee, EFI.
--
1.8.0