Tuesday, July 07, 2009


Building Xenified 2.6.30.1 kernel via xen-patches-2.6.30-2.tar.bz2


To build xenified 2.6.30.1 via Andrew Lyon's 2.6.30 patch set in it's current state downloaded patch set:-

# wget http://gentoo-xen-kernel.googlecode.com/files/xen-patches-2.6.30-2.tar.bz2
# tar jxvf xen-patches-2.6.30-2.tar.bz2
#cd xen-patches-2.6.30-2

1. Created log1 via script

rm -f log1
touch -f log1
for V in `ls 6*`
do
echo $V >> log1
cat $V|grep CONFIG_SPARSE_IRQ >> log1
done

2. Analyzed log1

60035_xen3-patch-2.6.29.patch1
+# if !defined(CONFIG_SPARSE_IRQ) && NR_CPUS 32 * MAX_IO_APICS
+#ifdef CONFIG_SPARSE_IRQ
+#ifdef CONFIG_SPARSE_IRQ
+#ifdef CONFIG_SPARSE_IRQ
+#ifdef CONFIG_SPARSE_IRQ
+#ifdef CONFIG_SPARSE_IRQ
+#ifdef CONFIG_SPARSE_IRQ
+#ifndef CONFIG_SPARSE_IRQ

60036_xen3-patch-2.6.30.patch1
-# if !defined(CONFIG_SPARSE_IRQ) && NR_CPUS 32 * MAX_IO_APICS
+# elif defined(CONFIG_SPARSE_IRQ)
+#ifdef CONFIG_SPARSE_IRQ

3. Made two replacements CONFIG_SPARSE_IRQ by CONFIG_GENERIC_HARDIRQS
60035_xen3-patch-2.6.29.patch1 line 11568

+#ifdef CONFIG_SPARSE_IRQ
+ irq_to_desc(irq)->kstat_irqs[cpu] = 0;
+#else
kstat_cpu(cpu).irqs[irq] = 0;

60036_xen3-patch-2.6.30.patch1 line 18283

+#ifdef CONFIG_SPARSE_IRQ
+int __init arch_probe_nr_irqs(void)
+{
+ int nr;
+
+ if (nr_irqs > (NR_VECTORS * nr_cpu_ids))
+ nr_irqs = NR_VECTORS * nr_cpu_ids;

4.Untared linux-2.6.30.1.tar.bz2 and applied patches.
Built kernel :-

# make menuconfig











# make
# make modules_install install
# mkinitramfs -o /boot/initrd-linux-2.6.30.1.img 2.6.30.1

To test 2.6.30.1 xenified kernel setup Xen 3.4.1 on to top of Ubuntu Jaunty Server

# cd /usr/src
# hg clone http://xenbits.xensource.com/xen-3.4-testing.hg
# cd xen-3.4-testing.hg
Set in Config.mk
PYTHON = python
PYTHON_PREFIX_ARG =
# make install-xen
# make install-tools

Add entry to /boot/grub/menu.lst:-

title Xen 3.4 / Ubuntu 9.04 kernel 2.6.30.1
uuid 34d2c0bd-fe30-47e0-990e-4921caf1e845
kernel /boot/xen-3.4.gz
module /boot/vmlinuz-2.6.30.1 root=/dev/sda14 ro console=tty0
module /boot/initrd-2.6.30.1.img

and rebooted into xen host.Tested OSOL 2009.06 loaded with PV Drivers in stub domain OK , also tested OSOL 2009.06 PV DomU and F11 PV DomU.














Update OSOL 2009.06 PV DomU











References
1.Gentoo-xen-kernel
2.2.6.30 dom0 Xen patches