Re: Best practices for kernel patches?
On Fri, Dec 7, 2001 at 10:21:30 -0500 (+0000), David Z Maze wrote:
[snip]
> A typical kernel-module package (e.g. lm-sensors, openafs) includes
> both some user-space tools and the kernel modules. So the build
> process tends to build the user-space tools, clean up, and then tar up
> the package source and drop the tarball into debian/my-module-source.
> ISTR some module packages (maybe ALSA's?) having completely separate
> sets of rules/control/etc. files for the module package; lm-sensors
> shares a rules file between the main package and lm-sensors-source.
> But you essentially want to wind up with a binary package which, when
> installed, has a tar file in /usr/src containing a modules/$PACKAGE
> directory which is a Debian source tree for the kernel modules.
I've done something different for tpctl-modules. For this I've unpacked
everything already into /usr/src/modules/tpctl. This has the advantage that
you don't need to do "cd /usr/src; rm -rf modules/alsa-driver; tar xzf
alsa-driver.tar.gz" each time you build a new kernel just incase a new
module source package has been released.
Now I've just got the problem that I want to build the binary modules for
the provided Debian kernels. I can get so far, but not far enough. I wrote
the script below whilst trying to do this. NOCLEAN is a hack to stop
kdist_image from cleaning up at the end as kernel-package says to. Then it
builds the .deb. Unfortunately after I got this lot working, it still
rejected the package as it couldn't find the source. Attempt number 2 soon.
[2]wyvern:~$ cat DEBIAN/tpctl/mkmod
#!/bin/sh -e
# script to make binary modules of tpctl
## edit next line
cd /usr/src/kernel-headers-2.4.16
export KMAINT="Adrian Bridgett"
export KEMAIL="bridget@debian.org"
export KSRC=$PWD
export KDREV=prebuilt
export KVERS=`awk -F\" '/UTS_RELEASE/ {print $2}' include/linux/version.h`
cd /usr/src/modules/tpctl
export NOCLEAN=true
debian/rules kdist_image
mv ../../tpctl-modules-$KVERS*.deb ..
dpkg-buildpackage -rfakeroot -b -nc -kbridgett@debian.org
debian/rules kdist_clean
Email: adrian.bridgett@iname.com
Windows NT - Unix in beta-testing. GPG/PGP keys available on public key servers
Debian GNU/Linux -*- By professionals for professionals -*- www.debian.org
Reply to: