Getting "taints kernel" message even after having "Dual BSD/GPL" license
I have just started delving into the world of linux device drivers.
I am trying out the "scull" example from ldd3.
Apparently I am getting the message "scull: module license 'unspecified' taints kernel" even after I have "MODULE_LICENSE("Dual BSD/GPL");" in the code.
This is what I had to change in the original code to get it to run.
1) Replaced all occurrences of CFLAGS in the scull Makefile to EXTRA_CFLAGS due to following error
scripts/Makefile.build:46: *** CFLAGS was changed in "/home/nikhil/Documents/Books/ldd3_pdf/examples/scull/Makefile". Fix it to use EXTRA_CFLAGS. Stop.
2) The code included config.h header file which I believe is no longer included in 2.6 kernel, so just touched one.
3) Got an error wherein it couldn't dereference the "current" pointer.
So included linux/sched.h in access.c
After that everything compiled, but I am unable to load the module as I'm getting following error
"scull: Unknown symbol __wake_up_sync"
Somewhere I read that I can get this error if I don't have the GPL license.
But I do have it.
Somebody else who had faced similar problem reported that he had to fix his makefile (but didn't mention what fix).
I looked at the Makefile and can't find anything.
One more thing I wanted to know, the taints kernel message is logged only the first time. Is that how it works? Only the first occurrence is logged?
AM using custom compiled kernel 188.8.131.52.
# Comment/uncomment the following line to disable/enable debugging
#DEBUG = y
# Add your debugging flag (or not) to EXTRA_CFLAGS
DEBFLAGS = -O -g -DSCULL_DEBUG # "-O" is needed to expand inlines
DEBFLAGS = -O2
EXTRA_CFLAGS += $(DEBFLAGS)
EXTRA_CFLAGS += -I$(LDDINC)
# call from kernel build system
scull-objs := main.o pipe.o access.o
obj-m := scull.o
KERNELDIR ?= /lib/modules/$(shell uname -r)/build
PWD := $(shell pwd)
$(MAKE) -C $(KERNELDIR) M=$(PWD) LDDINC=$(PWD)/../include modules
rm -rf *.o *~ core .depend .*.cmd *.ko *.mod.c .tmp_versions
depend .depend dep:
$(CC) $(EXTRA_CFLAGS) -M *.c > .depend
ifeq (.depend,$(wildcard .depend))
-Thanks in advance