Install Xen Kernel on Ubuntu 9.04 Jaunty i386

I stole the kernel from debian’s pool.

sudo dpkg -i linux-modules-2.6.26-2-xen-686_2.6.26-15_i386.deb
sudo dpkg -i linux-image-2.6.26-2-xen-686_2.6.26-15_i386.deb

* It’s a good idea to look for newer version. I don’t know why we cannot search by the debian website. But you can use the FTP…


Compiling XEN Kernel on Ubuntu 9.04 32bit

I am compiling XEN Kernel on Ubuntu 9.04 32bit
GCC is 4.3.3 and some issues with new compiler’s optimization.

This is on-going memo… I have compiled the kernel but it seems not compatible with Ubuntu 9.04.
So, I switched the xen kernel version supported by debian team.




(1) undefined reference to `__udivdi3′
arch/x86/kernel/built-in.o: In function `timer_interrupt’:
/usr/src/linux- undefined reference to `__udivdi3′
make: *** [.tmp_vmlinux1] Error 1
root@ubunzzo:/usr/src/linux- vi /usr/src/linux-

My attempt after reading reference (2) was successful, I inserted the asm(“”:”+r”(delta)) to the timer_interrupt function at the while scope at line number around 500.

        /* System-wide jiffy work. */
        if (delta >= NS_PER_TICK) {
                do_div(delta, NS_PER_TICK);
                processed_system_time += delta * NS_PER_TICK;
                while (delta > HZ) {


                        delta -= HZ;

* This works because this asm fools gcc compiler not to use optimization.
I guess do_timer internally uses do_div macro?

I found the same kind of fix in linux kernel here

The AT&T assembly format still looks confusing…