LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices



Reply
 
Search this Thread
Old 04-01-2008, 11:05 AM   #1
nikhil_no_1
LQ Newbie
 
Registered: Sep 2004
Posts: 6

Rep: Reputation: 0
Getting "taints kernel" message even after having "Dual BSD/GPL" license


Hello Guys,

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 2.6.24.4.

Makefile:
# Comment/uncomment the following line to disable/enable debugging
#DEBUG = y


# Add your debugging flag (or not) to EXTRA_CFLAGS
ifeq ($(DEBUG),y)
DEBFLAGS = -O -g -DSCULL_DEBUG # "-O" is needed to expand inlines
else
DEBFLAGS = -O2
endif

EXTRA_CFLAGS += $(DEBFLAGS)
EXTRA_CFLAGS += -I$(LDDINC)

ifneq ($(KERNELRELEASE),)
# call from kernel build system

scull-objs := main.o pipe.o access.o

obj-m := scull.o

else

KERNELDIR ?= /lib/modules/$(shell uname -r)/build
PWD := $(shell pwd)

modules:
$(MAKE) -C $(KERNELDIR) M=$(PWD) LDDINC=$(PWD)/../include modules

endif



clean:
rm -rf *.o *~ core .depend .*.cmd *.ko *.mod.c .tmp_versions

depend .depend dep:
$(CC) $(EXTRA_CFLAGS) -M *.c > .depend


ifeq (.depend,$(wildcard .depend))
include .depend
endif


-Thanks in advance
Nikhil
 
Old 04-02-2008, 12:15 PM   #2
kushalkoolwal
Senior Member
 
Registered: Feb 2004
Location: Middle of nowhere
Distribution: Debian Squeeze
Posts: 1,249

Rep: Reputation: 48
I think you have a better chance of resolving the issue if you ask on kernel related mailing lists.

Try KernelTrap.org

Good Luck.
 
Old 04-24-2008, 09:48 PM   #3
jayjwa
Member
 
Registered: Jul 2003
Location: NY
Distribution: None (src & compile)
Posts: 253

Rep: Reputation: 36
I noticed a similar issue when mucking around with the Intel 536ep kmod. Basically, unless the kernel agrees that it is not "tainted", it refuses to export needed programming objects/symbols. What a way to discourage 3rd party programmers from releasing driver code for their hardware!
 
Old 12-06-2010, 01:29 PM   #4
kapsikum
Member
 
Registered: Mar 2005
Location: INDIA
Posts: 79

Rep: Reputation: 16
for
Note that if the code for your module is in multiple files that need to be linked, you need to tell the build system which files to compile. In the case of multiple files, none of these files can be named hello.c because doing so would cause a problem with the linking step. Assuming your code exists in file1.c, file2.c, and file3.c and you want to build hello.ko from them, your Makefile should include:

obj-m := hello.o
hello-objs := file1.o file2.o file3.o

from: http://hi.baidu.com/fancfd/blog/item...0ab184cdd.html
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
net working eth0 eth1 wlan0 "no connection" "no LAN" "no wi-fi" Cayitano Linux - Newbie 5 12-09-2007 08:11 PM
Standard commands give "-bash: open: command not found" even in "su -" and "su root" mibo12 Linux - General 4 11-11-2007 11:18 PM
LXer: Displaying "MyComputer", "Trash", "Network Servers" Icons On A GNOME Desktop LXer Syndicated Linux News 0 04-02-2007 09:31 AM
FC4 install errors, "diabling IRQ #10" "nobody cares" error message??? A6Quattro Fedora 6 07-20-2005 01:49 PM
error message when pressing "Next" "BIOS Problems" , help ! HeRCuLeSX Fedora 3 07-21-2004 03:37 PM


All times are GMT -5. The time now is 07:23 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration