marco frattola <[EMAIL PROTECTED]> wrote: >Parrish M Myers <[EMAIL PROTECTED]> wrote: >> I built it by hand. Reason being I shouldn't have to recompile the >> entire kernel to add one module. So I tried it that way. I >> downloaded >> the 2.2.14 kernel-source and messed arround with the compile command >> for a while and found that the sugested command: >> >> gcc -DMODULE -D__KERNEL__ -I/usr/src/linux/net/inet -Wall >> -Wstrict-prototypes -O6 -c tulip.c >> >> does not work... but >> >> gcc -DMODULE -D__KERNEL__ -I/usr/src/linux/include -Wall >> -Wstrict-prototypes -O6 -c tulip.c >> >> worked. Once that was done, I thought I just had to install the >> module in the correct place and do a 'depmod -a'.
Er! I'm not surprised it broke, then. The Makefiles are there to help you, and if you use them your life will become a lot easier. The fact that gcc didn't return any errors doesn't necessarily mean that it was doing what you thought it was doing (the object file you produced probably needed to be linked against something else). Try changing to the directory containing tulip.c and typing 'make tulip.o' instead, then installing it as before. If that doesn't work, then I've missed out a step, too; trying 'make modules' or just 'make' in the appropriate directory might work better, even if it takes a little longer (it's still not a full kernel recompilation). Your problem, at any rate, is that tulip.o isn't linked against something against which it needs to be linked, which doesn't surprise me too much when it's compiled with just 'gcc -c'. >i don't think you can build module(s) without building the kernel that will >use it/them. >i've always made my kernel a-la debian (with kernel-package) and never had >problems with modules. >the reason is (my opinion, please correct if i'm wrong) that kernel need to >know which modules it has to be prepared to support. No, that's not true. This is what modules are for ... and, if you use module versioning, you *may* be able to get modules compiled against a different kernel version to work, too. -- Colin Watson [EMAIL PROTECTED]