Weblog entry #96 for Steve
I rebuilt the Xen installation on my desktop PC today. One minor change is that Xen is no longer its own arch.
So instead of running:
make-kpkg --revision skx1 \ --append-to-version .6-xen \ --arch xen kernel_image
We now use:
make-kpkg --revision skx1 \ --append-to-version .6-xen \ --arch i386 kernel_image
It might be possible to use higher than i386, but I've not bothered experimenting yet.
Here are the two scripts I use to do a rebuild:
prepare.sh
This prepares the original source code:
#!/bin/sh # # Remove the directory. # if [ -d /home/xen/tmp/linux-2.6.12 ]; then echo "Directory exists - removing" rm -rf /home/xen/tmp/linux-2.6.12 fi # # get the source if it is missing. # cd /home/xen/tmp if [ ! -e linux-2.6.12.tar.bz2 ] ; then echo "Kernel source missing. Fetching" wget ftp://ftp.kernel.org/pub/linux/kernel/v2.6/linux-2.6.12.tar.bz2 fi # # Unpack the source # echo "Unpacking source" tar -jxf linux-2.6.12.tar.bz2 # # patch it. # cd /home/xen/tmp/linux-2.6.12 /usr/src/kernel-patches/i386/apply/xen # # Configure the source # make ARCH=xen menuconfig
make-package.sh
This builds the package:
#!/bin/sh
if [ ! -d /home/xen/tmp/linux-2.6.12 ] ; then
echo "Source directory not found"
exit;
fi
cd /home/xen/tmp/linux-2.6.12
#
# Build the package
#
make-kpkg --arch=i386 --revision skx5 --append-to-version .6-xen kernel_image
#
# Initrd generation
#
if [ -d /lib/tls ]; then
mv /lib/tls /lib/tls.disabled
fi
mkinitrd -o /boot/xen-modules-2.6.12.6-xen 2.6.12.6-xen
Both these scripts work well if you use the same naming convention as I do, and have /home/xen/tmp to play with. (I use this location since all the domains I use under Xen are stored in /home/xen/domains.)
Comments on this Entry
[ Send Message | View dkg's Scratchpad | View Weblogs ]
Shouldn't these settings track each other? If not, what is the difference between them?
[ Parent | Reply to this comment ]
[ Send Message | View Steve's Scratchpad | View Weblogs ]
Hmmm yes that is weird. Actually it worked out OK since I just exited the menuconfig step and in between calling "prepare" + "build" I copied my existing configuration file into place:
zcat /proc/conf.gz .config
I'll have a quick look at preparing the source without the arch=xen tonight, thanks.
[ Parent | Reply to this comment ]