[DRBD-user] make kernel-patch failure with 2.6.13 kernel

prosolutions at gmx.net prosolutions at gmx.net
Sun Sep 11 20:12:39 CEST 2005

Note: "permalinks" may not be as permanent as we would like,
direct links of old sources may well be a few messages off.


> > > 
> > > Since I'm building a kernel for production machines on another
> > > system my understanding is that this can only be done via the 'make
> > > KDIR=... kernel-patch' mechanism since 'make; make install' would
> > > obviously not make sense on the build system itself.  
> 
> your understanding is wrong.
> 
> why not use a module?
> why not use a precompiled package?
> why not build a package yourself,
> if you really need/want to build it yourself?
> 

I have multiple target systems which run custom kernels and am not going
to compile a module for a debian kernel on each one since this would
require a complete build environment on each system which is a waste.
Rather, I build one time for all my systems in a chrooted sarge
environment on a different system.  I never compile stuff for the
production machines on those machines themselves for a number of
reasons.  It is simply too impractical and also to some extent
dangerous.  This is exactly what using the tool debbootstrap is for: to
give the developer a build environment identical to some other
target environment to build packages.  Many developers run Sid personaly
and develop their packages in a sarge chroot.  It is silly and a waste
of resources to have to have an entirely seperate machine just for
compiling packages for sarge when you are already running sid.

I wanted to create the kernel-patch and the user space tools seperately
for obvious reasons because I build the custom kernel for the target
systems seperately from the user space tools.  Later on I will create a
custom .deb for the user space tools.

Currently there is something weird about how drbd build the kernel patch
as it requires more than just pointing it at the source tree of the
kernel you want to patch against.  It is apparently requiring/looking for other
things in the system environment which the build system uses.  I think
it should be able to build cleanly using only the target source tree.


> > > But I am getting the following error when I try to compile the kernel-patch:
> > > 
> > > 
> > > # make KDIR=/usr/src/linux-2.6.13 kernel-patch
> > > make -C drbd drbd_buildtag.c
> > > make[1]: Entering directory `/usr/local/src/drbd-0.7.13/drbd'
> > > make[1]: Leaving directory `/usr/local/src/drbd-0.7.13/drbd'
> > > set -o errexit; \
> > > kbase=$(basename /usr/src/linux-2.6.13); \
> > > d=patch-$kbase-drbd-0.7.13; \
> > > test -e $d && cp -fav --backup=numbered $d $d; \
> > > bash scripts/patch-kernel /usr/src/linux-2.6.13 . > $d
> > > `patch-linux-2.6.13-drbd-0.7.13' -> `patch-linux-2.6.13-drbd-0.7.13.~1~'
> > > cp: cannot stat `/usr/src/linux-2.6.13/arch/um/Kconfig_block': No such file or directory
> > > make: *** [kernel-patch] Error 1
> > > 
> > > I have a target kernel in /usr/src/linux-2.6.13 which I've configure with 'make menuconfig'
> > > 
> > 
> > 
> > I should maybe add that I'm running this in a chrooted Debian Sarge
> > environment (running under Debian Sid).  I don't know if perhaps the
> > chroot could be screwing up the make scripts in detecting the
> > architecture.  
> 
> then, why do you not just apt-get install?
> 
> > Because its saying "cannot stat
> > `/usr/src/linux-2.6.13/arch/um/Kconfig_block" it makes me think that
> > maybe its trying to build for architecture "um" for some reason?
> 
> no. it tries to generate a patch against the kernel source tree.
> there are many architechtures in that tree, one of which is um.
> 
> wget http://www.kernel.org/pub/linux/kernel/v2.6/ChangeLog-2.6.11
> grep Kconfig_block ChangeLog-2.6.11
>   [PATCH] uml: depend on !USERMODE in drivers/block/Kconfig
>    ** and drop arch/um/Kconfig_block **
> 
> so this file is no longer there
> and our attempt to generate a patch against it fails.
> 
> but I think you really just want to use apt-get on the target system, no?
> 
> -- 
> : Lars Ellenberg                                  Tel +43-1-8178292-0  :
> : LINBIT Information Technologies GmbH            Fax +43-1-8178292-82 :
> : Schoenbrunner Str. 244, A-1120 Vienna/Europe   http://www.linbit.com :
> __
> please use the "List-Reply" function of your email client.
> _______________________________________________
> drbd-user mailing list
> drbd-user at lists.linbit.com
> http://lists.linbit.com/mailman/listinfo/drbd-user




More information about the drbd-user mailing list