OK I managed to re-discover the info - probably the most helpful but a
little out of-date was the kernel-doc package and the file:-
/usr/share/doc/kernel-doc-2.6.18/Documentation/kbuild/modules.txt
It says you are required to successfully build a kernel first, but on
Fedora Core 6 at least, you don't have to. Here's what works for me:-
install kernel-devel, kernel source rpm etc
# I don't want to mess up my copy of untouched source so I copy elsewhere
cp -a /usr/src/redhat/BUILD/kernel-2.6.18/linux-2.6.18.i386 \
/usr/src/linuxtest
cd /usr/src/linuxtest
# keep a copy of .config that comes with it
mv .config dot.config
cp configs/kernel-2.6.18-i586.config .config
# enable the module you need in the kernel config
make menuconfig (or make xconfig or whatever, see `make help`)
make modules_prepare
cd fs/ntfs
make -C /usr/src/linuxtest M=`pwd`
insmod ntfs.ko
# make another module
cd /usr/src/linuxtest/drivers/isdn
make -C /usr/src/linuxtest M=`pwd`
insmod hisax/hisax.ko
On Tue, 9 Jan 2007, Grant Parnell wrote:
Doh... just remembered I should have posted this to coders
I'm trying to re-discover how to build a single module. I once found a
brilliant howto and can't find it again. I'm trying with Fedora Core 6 with
2.6.18. As near as I can tell it's something like this...
pwd
/usr/src/linux-unaltered
ls
arch CREDITS fs Kbuild Makefile REPORTING-BUGS usr
block crypto include kernel mm scripts
configs Documentation init lib net security
COPYING drivers ipc MAINTAINERS README sound
make -C /usr/src/linux-unaltered \
M=/usr/src/linux-unaltered/fs/ntfs/ modules
make: Entering directory `/usr/src/linux-unaltered'
WARNING: Symbol version dump /usr/src/linux-unaltered/Module.symvers
is missing; modules will have no dependencies and modversions.
Building modules, stage 2.
MODPOST
/bin/sh: scripts/mod/modpost: No such file or directory
make[1]: *** [__modpost] Error 127
make: *** [modules] Error 2
make: Leaving directory `/usr/src/linux-unaltered'
BTW, I'm just using the ntfs module as an example any working example will
do. Of pariticular interest for me is recompiling the capi and mISDN drivers
with a patch I've got for the NetJet ISDN card.
I keep retrying from scratch by copying the source tree from
/usr/src/redhat/BUILD/kernel-2.6.18/linux-2.6.18.i386
Then copying in a .config file from either /boot/config-* or configs/ within
the source tree. Then doing make oldconfig and make prepare.
What am I missing here?
I'm even happy to move it out of the kernel tree and follow the external
module build but I think I'll hit the same problem. I wish I could find that
howto again because it worked!
--
---<GRiP>---
Grant Parnell - senior LPIC-1 certified consultant
Linux User #281066 at http://counter.li.org (Linux Counter)
EverythingLinux services - the consultant's backup & tech support.
Web: http://www.everythinglinux.com.au/support.php
We're also busybits.com.au and linuxhelp.com.au and elx.com.au.
Phone 02 8756 3522 to book service or discuss your needs.
ELX or its employees participate in the following:-
OSIA (Open Source Industry Australia) - http://www.osia.net.au
AUUG (Australian Unix Users Group) - http://www.auug.org.au
SLUG (Sydney Linux Users Group) - http://www.slug.org.au
LA (Linux Australia) - http://www.linux.org.au
_______________________________________________
coders mailing list
[email protected]
http://lists.slug.org.au/listinfo/coders