sudo tar zxvf linux-2.6.38.4.tar.gz
sudo tar zxvf xen-4.0.1.tar.gz
sudo mkdir xen-patches
cd xen-patches
tar jxvf ../xen-patches-2.6.38-2.tar.bz2
进入linux-2.6.38.4目录,打上补丁:
sudo cat ../xen-patches/*.patch1 | patch -p1
二、编译Xen
make xen tools stubdom
make install-xen
make install-tools PYTHON_PREFIX_ARG=
make install-stubdom
在编译的过程中可能会遇到如下问题:
In file included from tapdisk.h:62:0,
from blk_linux.c:4:
../lib/blktaplib.h:199:0: error: "WRITE" redefined
/usr/include/linux/fs.h:160:0: note: this is the location of the previous definition
这个问题请打补丁:blk_linux.patch1
netfront.c:41:32: error: variably modified 'tx_freelist' at file scope
netfront.c:44:34: error: variably modified 'rx_buffers' at file scope
netfront.c:45:34: error: variably modified 'tx_buffers' at file scope
lib/math.c: In function '__qdivrem':
lib/math.c:196:9: error: 'tmp.ul[1]' may be used uninitialized in this function
mm.c: In function 'set_readonly':
mm.c:321:46: error: taking address of expression of type 'void'
这个问题请打补丁:gcc-4.5.patch1
如果使用xm命令报以下错误:
AttributeError: HTTPUnix instance has no attribute 'getresponse'