add installupgradeinitrd function and use it to install the upgrade initrds
This commit is contained in:
parent
138cb06cd5
commit
78e3d0f115
@ -33,8 +33,7 @@ mkdir ${KERNELDIR}
|
||||
installinitrd images-${kernel.flavor}-${basearch} ${kernel.initrd.path} ${KERNELDIR}/initrd-${kernel.flavor}.img
|
||||
|
||||
## install upgrade image
|
||||
installinitrd ${kernel.upgrade.img} ${KERNELDIR}/upgrade-${kernel.flavor}.img
|
||||
treeinfo images-${kernel.flavor}-${basearch} upgrade ${KERNELDIR}/upgrade-${kernel.flavor}.img
|
||||
installupgradeinitrd images-${kernel.flavor}-${basearch} ${kernel.upgrade.img} ${KERNELDIR}/upgrade-${kernel.flavor}.img
|
||||
|
||||
## create U-Boot wrapped images
|
||||
|
||||
@ -60,8 +59,7 @@ mkdir ${KERNELDIR}
|
||||
installinitrd images-${basearch} ${kernel.initrd.path} ${KERNELDIR}/initrd.img
|
||||
|
||||
## install upgrade image
|
||||
installinitrd ${kernel.upgrade.img} ${KERNELDIR}/upgrade.img
|
||||
treeinfo images-${basearch} upgrade ${KERNELDIR}/upgrade.img
|
||||
installupgradeinitrd images-${basearch} ${kernel.upgrade.img} ${KERNELDIR}/upgrade.img
|
||||
|
||||
## create U-Boot wrapped images
|
||||
|
||||
|
@ -67,8 +67,7 @@ install ${configdir}/magic ${BOOTDIR}
|
||||
installinitrd images-${kernel.arch} ${kernel.initrd.path} ${KERNELDIR}/initrd.img
|
||||
|
||||
## upgrade image
|
||||
installinitrd ${kernel.upgrade.path} ${KERNELDIR}/upgrade.img
|
||||
treeinfo images-${kernel.arch} upgrade ${KERNELDIR}/upgrade.img
|
||||
installupgradeinitrd images-${kernel.arch} ${kernel.upgrade.path} ${KERNELDIR}/upgrade.img
|
||||
|
||||
## install arch-specific bootloader config
|
||||
install ${configdir}/yaboot.conf.in ${KERNELDIR}/yaboot.conf
|
||||
|
@ -25,8 +25,7 @@ installkernel images-${basearch} ${kernel.path} ${KERNELDIR}/kernel.img
|
||||
installinitrd images-${basearch} ${kernel.initrd.path} ${KERNELDIR}/initrd.img
|
||||
|
||||
## upgrader image
|
||||
installinitrd ${kernel.upgrade.img} ${KERNELDIR}/upgrade.img
|
||||
treeinfo images-${basearch} upgrade ${KERNELDIR}/upgrade.img
|
||||
installupgradeinitrd images-${basearch} ${kernel.upgrade.img} ${KERNELDIR}/upgrade.img
|
||||
|
||||
## s390 needs some extra boot config
|
||||
createaddrsize ${INITRD_ADDRESS} ${outroot}/${BOOTDIR}/initrd.img ${outroot}/${BOOTDIR}/initrd.addrsize
|
||||
|
@ -34,14 +34,12 @@ mkdir ${KERNELDIR}
|
||||
## i386 PAE
|
||||
installkernel images-xen ${kernel.path} ${KERNELDIR}/vmlinuz-${kernel.flavor}
|
||||
installinitrd images-xen ${kernel.initrd.path} ${KERNELDIR}/initrd-${kernel.flavor}.img
|
||||
installinitrd ${kernel.upgrade.path} ${KERNELDIR}/upgrade-${kernel.flavor}.img
|
||||
treeinfo images-xen upgrade ${KERNELDIR}/upgrade-${kernel.flavor}.img
|
||||
installupgradeinitrd images-xen ${kernel.upgrade.path} ${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
|
||||
installinitrd ${kernel.upgrade.path} ${KERNELDIR}/upgrade.img
|
||||
treeinfo images-${basearch} upgrade ${KERNELDIR}/upgrade.img
|
||||
installupgradeinitrd images-${basearch} ${kernel.upgrade.path} ${KERNELDIR}/upgrade.img
|
||||
%endif
|
||||
%endfor
|
||||
|
||||
|
@ -305,6 +305,15 @@ class LoraxTemplateRunner(object):
|
||||
self.chmod(dest, '644')
|
||||
self.treeinfo(section, "initrd", dest)
|
||||
|
||||
def installupgradeinitrd(self, section, src, dest):
|
||||
'''
|
||||
installupgradeinitrd SECTION SRC DEST
|
||||
Same as installkernel, but for "upgrade".
|
||||
'''
|
||||
self.install(src, dest)
|
||||
self.chmod(dest, '644')
|
||||
self.treeinfo(section, "upgrade", dest)
|
||||
|
||||
def hardlink(self, src, dest):
|
||||
'''
|
||||
hardlink SRC DEST
|
||||
|
Loading…
Reference in New Issue
Block a user