This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
Home Products Support Community News


Re: [Xen-users] Building Xen 3.2 from source

Here is my post from a few weeks ago. Are you building a Dom0/DomU or a
super Xen kernel that can do either? My instructions are you build 2
separate kernels but you could easily build just one. The .config for each
should be in the "build-linux-2.6.18-xen0_x86_32" and
"build-linux-2.6.18-xenU_x86_32", respectively.

Hi Bernie, a fellow Austin-ite. :)

I'll assume you want to build under Xen 3.2. Here are the steps that I
have been writing up from my own documentation. I'm running my Dom0 on
CentOS 4.4 ( moving to 5.1 soon).

1. Make sure the following is installed:
mercurial 0.9.5 or better

2. Download Xen 3.2 tar ball from

3. tar -zxf xen-3.2.0.tar.gz

4. cd xen-3.2.0/

5. Since the official Xen kernel is now in Mercurial instead of just
patches to a vanilla kernel you need to setup your PYTHONPATH to point to
the mercurial Python library. It should look something like:
export PYTHONPATH=/usr/lib/python2.3:/usr/local/lib/python2.3/site-packages

6. Pull the 2.6.18 kernel from Mercurial:
hg clone http://xenbits.xensource.com/linux-2.6.18-xen.hg

7. In my configuration I build a Dom0 kernel and a DomU kernel. The Dom0
will have all the xen backend drivers and hardware drivers for my system
and the DomU will not. Here is how you would create two kernels...
(xen0=Dom0, xenU=DomU)

make linux-2.6-xen0-config CONFIGMODE=menuconfig
make linux-2.6-xen0-build
make linux-2.6-xen0-install

make linux-2.6-xenU-config CONFIGMODE=menuconfig
make linux-2.6-xenU-build
make linux-2.6-xenU-install

That should install the kernels and I believe (I'm not past this point
becuase of lack of hardware to run it on) it should install it in grub as
well. Let me know how this works for you.


>> While I've located a few threads on this topic from a few months ago, I
>> have not been successful at producing a working build given the
>> discussions from those threads, specifically the thread including:
>> http://lists.xensource.com/archives/html/xen-users/2008-01/msg00699.html
>> I followed the instructions of the above message ... downloaded the
>> xen-3.2 tarball and unpacked it. Installed mercurial. (I'm doing this on
>> a Suse 10.3 distro which does not include mercurial.) Cloned the
>> mercurial source tree at the same level as the 'xen-3.2.0' directory
>> (i.e. 'xen-3.2.0' and 'linux-2.6.18-xen.hg' are in the same parent
>> directory). Then after cd'ing to the xen-3.2.0 directory I did a 'make
>> prep-kernels' ... that all seemed to work fine.  I copied a config file
>> over to 'build-linux-2.6.18-xen_x86_32' and then did a 'make dist'.
>> Eventually this died with the error "No rule to make target 'vmlinuz'".
>> I then cd'd to 'build-linux-2.6.18-xen_x86_32' and executed 'make'.
>> This appeared to succeed but created a vmlinux file instead of a vmlinuz
>> file. I proceeded to repeat the previously failed 'make dist' but it
>> eventually failed with the same complaint about not having a rule to
>> make vmlinuz.
>> I'm also a bit concerned that any of the above is doing the right thing.
>> I say this because as the first make executed, it appeared as though
>> ketchup was downloading kernel source rather than using the mercurial
>> build tree that I had previously manually downloaded. There are
>> directories 'linux-2.6.18' and 'build-linux-2.6.18-xen_x86_32' created,
>> but they seem to have a fair number of differences with the files from
>> 'linux-2.6.18-xen.hg'.
>> Can anyone shed some light on what might be going on or what I'm doing
>> wrong?
>> I also noted that the linux-2.6.18 source that's offered on the xen.org
>> download page doesn't seem to be used in any of these build procedures.
>> It that correct?
>> Bernie Lofaso

Xen-users mailing list