h.mayer at inode.at
Sat Aug 21 16:09:18 UTC 2004
Huub van Niekerk wrote:
> Hannes Mayer wrote:
>> Huub van Niekerk wrote:
>>> I'm trying to build a kernel-module with g_NCR5380.c from the latest
>>> FC2 kernel, but it won't compile with success. I've tried this: gcc
>>> -c -O2 -Wall -D__KERNEL__ -DMODULE -isystem/lib/modules/`uname
>>> -r`/build/include g_NCR5380.c but I get the error that irq_vectors.h
>>> doesn't exist. When I try to make -C /lib/modules/`uname
>>> -r`/build/include g_NCR5380.c, it says that there is no rule to make
>>> target g_NCR5380.c
>>> What am I doing wrong?
>> Try the sample makefile from:
>> Building modules for kernel 2.6 is different (easier) as for 2.4 kernels.
> Thanks, but: I created Makefile in a temp. dir, replaced sum-module.c
> with g_NCR5380.c, copied g_NCR5380.c to the temp dir, and did make. It
> says: Nothing to be done for "default". Help is appreciated.
Ahh..now I get it. g_NCR5380.c already comes with the kernel!
In that case you need to install the kernel-source rpm (I assume you already
did this) and enable the g_NCR5380.c as module:
# make menuconfig
and look under SCSI .... to enable it as module
Now you can try to compile the module alone again (with the make file)
or in case this won't work, I fear you must completely build a new kernel.
How to build it:
After configuration type
to build the new 2.6 kernel
Install it with
# sudo make modules_install install
This will install the kernel and add it to GRUB. You can also make an new
kernel RPM, but I've not done this yet, so I can't tell you how.
Let me know if it works out.
More information about the users