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

Re: Building kernel modules for stock kernels is a hell of a job!

Henning Makholm <henning@makholm.net> writes:

> Scripsit Manoj Srivastava <srivasta@debian.org>
>> 	He said use the kernel-headers package, not
>>  kernel-package. Any debian packaged module shall work with something
>>  like:
>>  ./debian/rules KVERS="2.4.21" KSRC="/usr/src/kernel-headers-2.4.21" KPKG_DEST_DIR="../" KDREV="blah" kdist_image
> Interesting. Just out of curiosity, where is that supposed to be
> documented?

All of the information is in
/usr/share/doc/kernel-package/README.modules, though not with a single
command line like that as such.

> (Btw, is it a bug for the debian/rules in a module package to run
> dh_testroot from its 'build' target? I know it's not allowed in the
> debian/rules in a _source_ package, but perhaps the conventions
> for kernel-module packages are different).

I don't consider it a bug.  I do think the kdist and kdist_image
targets should reinvoke make under $(ROOT_CMD), though, just to be
sure.  The i2c-source debian/rules file has:

        $(ROOT_CMD) $(MAKE) $(MFLAGS) -f debian/rules binary-modules
        $(ROOT_CMD) $(MAKE) $(MFLAGS) -f debian/rules clean

        $(ROOT_CMD) $(MAKE) $(MFLAGS) -f debian/rules binary-modules
        dpkg-genchanges -b -e"$(KMAINT) <$(KEMAIL)>" -u"$(KSRC)/.." > $(CHFILE)
        debsign -e"$(KMAINT) <$(KEMAIL)>" $(CHFILE)
        $(ROOT_CMD) $(MAKE) $(MFLAGS) -f debian/rules clean

        $(ROOT_CMD) $(MAKE) $(MFLAGS) -f debian/rules clean

...with some magic early on in the file to figure out the name of the
.changes file $(CHFILE).

David Maze         dmaze@debian.org      http://people.debian.org/~dmaze/
"Theoretical politics is interesting.  Politicking should be illegal."
	-- Abra Mitchell

Reply to: