diff options
author | Mark McLoughlin <markmc@redhat.com> | 2008-08-06 11:25:03 +0100 |
---|---|---|
committer | Jeremy Katz <katzj@redhat.com> | 2008-08-07 09:29:52 -0400 |
commit | 42d3d03953dc9dc746a844e626ba4db298700697 (patch) | |
tree | d5fa0a54308760142e2e1ad1ccdbbb2657108a5a /scripts/mk-images.x86 | |
parent | 87e740b4b35d426eb856101954d922ebed37f842 (diff) | |
download | anaconda-42d3d03953dc9dc746a844e626ba4db298700697.tar.gz anaconda-42d3d03953dc9dc746a844e626ba4db298700697.tar.xz anaconda-42d3d03953dc9dc746a844e626ba4db298700697.zip |
mk-images: replace kernel-xen with pv_ops kernel
kernel-xen is dead, replaced now with pv_ops Xen guest
support in the stock kernels.
On x86_64 and ia64, we now just point the [images-xen]
.treeinfo stanza at the stock kernels in images/pxeboot.
On x86_32, things are a bit more complicated. The stock
kernel is kernel.i586 but Xen guests support is only
included in kernel-PAE.i686 because Xen only runs in PAE
mode.
In this case, we just copy the kernel-PAE vmlinuz to
images/pxeboot/vmlinuz-PAE and build another initrd as
images/pxeboot/initrd-PAE.img. It's these images we point
the [images-xen] stanza at.
Signed-off-by: Mark McLoughlin <markmc@redhat.com>
Diffstat (limited to 'scripts/mk-images.x86')
-rw-r--r-- | scripts/mk-images.x86 | 36 |
1 files changed, 21 insertions, 15 deletions
diff --git a/scripts/mk-images.x86 b/scripts/mk-images.x86 index 3597e868f..408437096 100644 --- a/scripts/mk-images.x86 +++ b/scripts/mk-images.x86 @@ -83,14 +83,25 @@ normally would. EOF makeBootImages() { - if [ "$kerneltag" != "xen" ]; then - echo "Building initrd.img" - makeinitrd --initrdto $TOPDESTPATH/images/pxeboot/initrd.img \ + local initrd="initrd.img" + local kernelimage="vmlinuz" + + if [ "$kernelvers" = "$kernelxen" ] ; then + local tag="${kernelvers#kernel}" + if [ -n "$tag" -a "$tag" != "$kernelvers" ] ; then + initrd="initrd${tag}.img" + kernelimage="vmlinuz${tag}" + fi + fi + + echo "Building $initrd" + makeinitrd --initrdto $TOPDESTPATH/images/pxeboot/$initrd \ --initrdsize 8192 \ --loaderbin loader \ --modules "$INITRDMODS" - [ $? = 0 ] || exit 1 + [ $? = 0 ] || exit 1 + if [ "$kernelvers" != "$kernelxen" ] ; then if [ -f $IMGPATH/usr/lib/syslinux/isolinux.bin ]; then echo "Building isolinux directory" MBD_BOOTTREE=$TOPDESTPATH/isolinux @@ -129,20 +140,15 @@ kernel = images/pxeboot/vmlinuz initrd = images/pxeboot/initrd.img __EOT__ if [ -n "$BOOTISO" ]; then echo "boot.iso = images/$BOOTISO" >> $TOPDESTPATH/.treeinfo ; fi + fi - else # set up the boot stuff for the xen guest kernel - echo "Building $KERNELARCH guest initrd.img" - mkdir -p $TOPDESTPATH/images/xen - makeinitrd --initrdto $TOPDESTPATH/images/xen/initrd.img \ - --initrdsize 8192 \ - --loaderbin loader \ - --modules "$INITRDMODS" - [ $? = 0 ] || exit 1 - cp $KERNELROOT/boot/vmlinuz-*xen* $TOPDESTPATH/images/xen/vmlinuz + # set up the boot stuff for the xen guest kernel + if [ -z "$kernelxen" -o "$kernelvers" = "$kernelxen" ] ; then + cp $KERNELROOT/boot/vmlinuz-$version $TOPDESTPATH/images/pxeboot/$kernelimage cat << __EOT__ >> $TOPDESTPATH/.treeinfo [images-xen] -kernel = images/xen/vmlinuz -initrd = images/xen/initrd.img +kernel = images/pxeboot/$kernelimage +initrd = images/pxeboot/$initrd __EOT__ fi |