Results 1 to 1 of 1
I have been trying to get a external module to load into a 2.6.x kernel...and I have a few questions. I am using the kernel build system to make my ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 05-06-2004 #1
- Join Date
- Apr 2004
trouble with my external module
I have been trying to get a external module to load into a 2.6.x kernel...and I have a few questions.
I am using the kernel build system to make my module. I have the following snippet in my make file
obj-m := optopci.o
module-objs := optotrak.o amcc.o
KDIR := /lib/modules/$(shell uname -r)/build
PWD := $(shell pwd)
$(MAKE) -C $(KDIR) SUBDIRS=$(PWD) modules
Does this mechanism make use of targets listed below. For example, I am getting this error:
<No rule to make optopci.c >
However, my target below this has a rule for optopci.o
optopci.o: optopci.o optotrak.o amcc.o
ld -r -o optopci.o optotrak.o amcc.o
test -c /dev/optopci || mknod -m 666 /dev/optopci c 232 0
I dont need an optopci.c. Is what I'm seeing the default behaviour of the new build mechanism. Can I override that without editing the source tree makefile.
If I futz around, for testing purposes only and rename files, I can get *.ko to build with this mechanism. However, when I go to insmod my module I get an error:
insmod: error inserting <module.ko>: unknown symbols in module:
Does this have something to do with the fact that I do not use EXPORT_SYMBOL() at all in my code.
Do I need to use EXPORT_SYMBOL() in both source files. Do I need to use it at all. I have downloaded a couple of essays on external module building, however, none give details on how this macro/function(?) is to be used.
Any help would be appreciated,