Compiling individual modules
Can anyone give me any pointers in how to compile individual modules. I am not a programmer, let alone a kernel programmer and am running into a road block. I know just enough about "C" to be dangerous. I was provided the source for a raid controller from LSI Logic and need to compile for a 9.0 smp install. Any help appreciated. -- Ken Schneider unix user since 1989 linux user since 1994 SuSE user since 1998 (6.2)
On Tue, 2004-02-10 at 15:11 -0500, Kenneth Schneider wrote:
Can anyone give me any pointers in how to compile individual modules. I am not a programmer, let alone a kernel programmer and am running into a road block. I know just enough about "C" to be dangerous.
I was provided the source for a raid controller from LSI Logic and need to compile for a 9.0 smp install.
Any help appreciated.
Usually it's enough to run "make" (or possibly make -f
On Tue, 2004-02-10 at 15:15, Anders Johansson wrote:
On Tue, 2004-02-10 at 15:11 -0500, Kenneth Schneider wrote:
Can anyone give me any pointers in how to compile individual modules. I am not a programmer, let alone a kernel programmer and am running into a road block. I know just enough about "C" to be dangerous.
I was provided the source for a raid controller from LSI Logic and need to compile for a 9.0 smp install.
Any help appreciated.
Usually it's enough to run "make" (or possibly make -f
) after first installing and preparing the kernel source (cd /usr/src/linux, make mrproper, make cloneconfig, make dep)
Tried that with many warnings and errors. The Makefile is as follows: #megaide makefile COMMON_FLAGS = -Wall -DBP_SUPPORT -DMEGAIDE_LIBRARY_READY -DMODULE -DMODVERSIONS -include $(HPATH)/linux/modversions.h MEGAIDE_OBJS = megaide_pci.o $(TOPDIR)/drivers/scsi/megaide/lib/megaide_lib.o all: clean megaide_pci.o megaide.o clean: rm -f megaide.o rm -f megaide_pci.o megaide.o: $(LD) $(LD_RFLAG) -r -o $@ $(MEGAIDE_OBJS) megaide_pci.o: $(CC) $(CFLAGS) $(COMMON_FLAGS) -c -o megaide_pci.o megaide_pci.c Changed the HPATH to the correct location as well as TOPDIR. The tail end of the errors: /usr/include/linux/ide.h:1279: warning: array `ide_hwifs' assumed to have one element /usr/include/linux/device.h:363: error: storage size of `dev' isn't known /usr/include/linux/ide.h:776: error: storage size of `list' isn't known /usr/include/linux/ide.h:1043: error: storage size of `gendev' isn't known /usr/include/linux/ide.h:1238: error: storage size of `drives' isn't known /usr/include/linux/ide.h:1239: error: storage size of `drivers' isn't known inc/megaide_pci.h:95: error: storage size of `ICH5R_completion' isn't known inc/megaide_pci.h:101: error: storage size of `scb_ext_free_list' isn't known inc/megaide_pci.h:103: error: storage size of `nit_lock' isn't known megaide_char.c:28: error: storage size of `megaidedev_fops' isn't known make: *** [megaide_pci.o] Error 1 -- Ken Schneider unix user since 1989 linux user since 1994 SuSE user since 1998 (6.2)
On Tue, 2004-02-10 at 15:41 -0500, Kenneth Schneider wrote:
On Tue, 2004-02-10 at 15:15, Anders Johansson wrote:
On Tue, 2004-02-10 at 15:11 -0500, Kenneth Schneider wrote:
Can anyone give me any pointers in how to compile individual modules. I am not a programmer, let alone a kernel programmer and am running into a road block. I know just enough about "C" to be dangerous.
I was provided the source for a raid controller from LSI Logic and need to compile for a 9.0 smp install.
Any help appreciated.
Usually it's enough to run "make" (or possibly make -f
) after first installing and preparing the kernel source (cd /usr/src/linux, make mrproper, make cloneconfig, make dep) Tried that with many warnings and errors. The Makefile is as follows:
#megaide makefile COMMON_FLAGS = -Wall -DBP_SUPPORT -DMEGAIDE_LIBRARY_READY -DMODULE -DMODVERSIONS -include $(HPATH)/linux/modversions.h MEGAIDE_OBJS = megaide_pci.o $(TOPDIR)/drivers/scsi/megaide/lib/megaide_lib.o
all: clean megaide_pci.o megaide.o
clean: rm -f megaide.o rm -f megaide_pci.o
megaide.o: $(LD) $(LD_RFLAG) -r -o $@ $(MEGAIDE_OBJS)
megaide_pci.o: $(CC) $(CFLAGS) $(COMMON_FLAGS) -c -o megaide_pci.o megaide_pci.c
Changed the HPATH to the correct location as well as TOPDIR.
The tail end of the errors: /usr/include/linux/ide.h:1279: warning: array `ide_hwifs' assumed to have one element
Something's wrong here. Why is it including from /usr/include? A kernel module isn't supposed to be doing that. Any possibility that we could see the actual source/Makefile? If the above is the complete makefile, you probably need to add something like "CFLAGS=-I /usr/src/linux/include" (or, more technically correct /lib/modules/`uname -r`/build/include)
participants (2)
-
Anders Johansson
-
Kenneth Schneider