[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: How do I build a XEN kernel with make-kpkg



Rainer Koenig <Rainer.Koenig@fujitsu-siemens.com> writes:

> Ok. Next try. Finding some sort of HowTos on the net, one describing
> that I need the XEN source package that applies patches to the kernel
> and then compile it. Whatever I do with 2.6.18 the kernel build process
> exits with errors that show me that something is very wrong in the 
> kernel source tree. 
>
> So I'm stuck, but I wonder: There IS a package linux-image-2.6.18-3-xen-686
> so it SHOULD be possible to build such an image. But HOW can I do that?
> Is there any sort of "magic spell" that I have to say before building
> it or am I just missing an important point? 

The debian patch package is incompatible to make-kpkg. See

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=382699

I was sure I did send in the workaround for xen but can't see it in
the BTS. So here we go again (CCing the bug).

As a quick fix for xen do:

mkdir /usr/src/kernel-patches/all/2.6.18/xen/    

cat > /usr/src/kernel-patches/all/2.6.18/apply/xen <<EOF
#!/bin/sh

echo "Applying debian patch with xen parts"

if [ -z "$KPKG_ARCH" ]; then
  KPKG_ARCH=$(dpkg-architecture -qDEB_HOST_ARCH)
fi

/usr/src/kernel-patches/all/2.6.18/apply/debian --arch $KPKG_ARCH --subarch xen
EOF

cat > /usr/src/kernel-patches/all/2.6.18/unpatch/xen <<EOF
#!/bin/sh
set -e

upstream="2.6.18"
exec "/usr/src/kernel-patches/all/$upstream/apply/debian" "$upstream-0"
EOF

chmod a+x /usr/src/kernel-patches/all/2.6.18/apply/xen /usr/src/kernel-patches/all/2.6.18/unpatch/xen



After that you can use

make-kpkg --added-patches xen clean
make-kpkg --added-patches xen kernel-image

The same can be done for vserver and xen-vserver.

MfG
        Goswin



Reply to: