[Pkg-xen-devel] Building a custom kernel-image.deb
Ralph Passgang
ralph at debianbase.de
Wed Mar 15 23:35:35 UTC 2006
Am Mittwoch, 15. März 2006 22:29 schrieb Goswin von Brederlow:
> Ralph Passgang <ralph at debianbase.de> writes:
> > Am Mittwoch, 15. März 2006 17:00 schrieb Goswin von Brederlow:
> >> Hi,
> >>
> >> maybe I'm missing something fundamental but I can't seem to be able to
> >> build a custom kernel-image.deb for xen.
> >>
> >> I was able to build the linux-2.6 with xen images from the repository
> >> and build a vmlinux file using the directions from upstream Xen. But
> >> I've had no luck with make-kpkg.
> >>
> >> Can anyone give me some hints?
> >
> > Hi Goswin,
> >
> > take a look at:
> > http://www.debian-administration.org/articles/320
>
> That page mentions a special xen patch package and manualy applies
> that to a vaniall kernel.
Yes, the "normal" 2.6.12 to 2.6.12.6-xen patch from the recent xen-3.0 testing
mercurial repository packaged as debian kernel patch package (what a funky
word *g*).
> I'm building from a linux-2.6 source
> snapshot where xen should be already included. But that seems to work
> different from that patch package.
Yeah, upstream changed it a bit. You don't need to use the make parameter
"ARCH=xen" anymore, instead you have to configure xen as subarch in
the .config.
see posting:
http://lists.xensource.com/archives/html/xen-users/2006-03/msg00052.html
> > "make-kpkg --revision <yourversion> --append-to-version .6-xen --arch xen
> > kernel_image" should be enough.
> >
> > ".6-xen" is the extraversion, if you are using xen-3.0.0 / xen-3.0.1 /
> > xen-3.0-testing,hg
> >
> > --Ralph
>
> How does it know to build a 32bit or 64bit kernel? I want the later.
As for every "normal" kernel... You can set "X86" or "X86_64" within
menuconfig. I hope that hasn't changed in upstream :)
You don't need "--arch xen" anymore when you call make-kpkg.
The "--append-to-version .6-xen" was for the 2.6.12 patch, because the
EXTRAVERSION was missing in the patch. dh_kpatches otherwise refused to build
a package for the patch.
I am not sure, you might want to use: "-rc5-xen" or something similar now.
> mrvn at storage:~/kernel/linux-2.6-2.6.15+2.6.16-rc5$ make-kpkg --revision
> 2.6.15+2.6.16-rc5-0experimental.1snapshot.6056 --append-to-version .6-xen
> --arch xen kernel_image I note you are using a hyphen in the revision
> number.
> Please ensure that the upstream and debian revision
> numbers are policy compliant enough that dpkg and
> shall not choke on them at the end of the compile
> exec debian/rules
> DEBIAN_REVISION=2.6.15+2.6.16-rc5-0experimental.1snapshot.6056
> APPEND_TO_VERSION=.6-xen KPKG_ARCH=xen kernel_image
>
> ====== making target CONFIG-common [new prereqs: testdir]======
>
> ====== making target CONFIG-common [new prereqs: stamp-conf]======
> ====== making stamp-arch-conf because of CONFIG-common ======
>
> ====== making target CONFIG-arch [new prereqs: stamp-arch-conf]======
> ====== making .config because of Makefile ======
>
> test -f .config || test ! -f .config.save || \
> cp -pf .config.save .config
> test -f .config || test ! -f .config || \
> cp -pf .config .config
> test -f .config || test ! -f ./debian/config || \
> cp -pf ./debian/config .config
> test -f .config || (echo "*** Need a config file .config" && false)
> ====== making target conf.vars [new prereqs: Makefile .config]======
>
> Makefile:524:
> /home/mrvn/kernel/linux-2.6-2.6.15+2.6.16-rc5/arch/xen/Makefile: No such
> file or directory make[1]: *** No rule to make target
> `/home/mrvn/kernel/linux-2.6-2.6.15+2.6.16-rc5/arch/xen/Makefile'. Stop.
> make: *** [conf.vars] Error 2
>
>
> This is a freshly unpacked
> linux-2.6_2.6.15+2.6.16-rc5-0experimental.1snapshot.6056.dsc that
> builds a xen kernel image (among all the others) just fine with
> debuild.
As said, upstream changed it. xen is now the subarch, not the arch.
> I looks like I fist have to apply
> debian/patches/xen-tree-merge-21940.patch, set CONFIG_X86_64_XEN and
> then just build for arch x86_64. Is that right?
I don't know if you need this patch. I never saw that... Where you got the
dsc/source package from? debian kernel team?
> The only problem then is that make-kpkg will put the wrong image into
> the deb (the one with bootsector instead of the raw image) unless I'm
> mistaken. If that is so I can figure out the rest. I've messed with
> make-kpkg before.
>
> MfG
> Goswin
>
> PS: Or should I scratch that and stick with the unofficial
> linux-patch-xen?
Depending on which version of the hypervisor / xen-utils you want to run. If
you want to test xen-unstable (and that sounds like you want to do so) then
you shouldn't stick with my patch that is provided on packages.debianbase.de.
If you want to use 3.0.1 (or even better the 3.0-testing) then you can use
the patch (and the manual from debian-administrators.org)
--Ralph
More information about the Pkg-xen-devel
mailing list