Regards all: Sorry for the length of the post, but I'm trying to reduce questions about what I'm doing...
I'm trying to compile an external driver for my LFS 6.3/BLFS (development version) system and am running into an odd problem... Background: I've upgraded the kernel to 2.6.23.1 so that I could apply the real time preemptive kernel patch. This works fine. I don't seem to have a file called /etc/modules.conf, and I can't seem to get modprobe to work for me but insmod and rmmod appear to work fine. None of my kernel is compiled as a module. My kernel driver wants to look at a structure within 8250.c for various purposes (called serial8250_ports). I've removed the 'static' from the definition and I added EXPORT_SYMBOL(serial8250_ports) to the file. Recompiled the kernel and verified that Module.symvers and System.map contain references to the newly exposed variable. Also, procs/kallsyms has this variable as well. I've created a simple test driver now. It merely references the variable serial8250_ports and uses printk to print out the value of the address of this variable (this simply for test purposes). IE printk (KERN_ALERT "address of serial8250_ports is %p\n", &serial8250_ports[0]); If I reference a function from 8250.c in my driver such as serial8250_suspend_port(), insmod doesn't complain. Makefile contains: obj-m := hello.o Build file contains: make V=1 -C /linux/sources/linux-2.6.23.1/ M=`pwd` modules Basically, just like the book "Linux Device Drivers" 3rd edition with the extra printk as above. It compiles fine except: 1. the script complains about 'include/linux/autoconf.h' and/or 'include/config/auto.conf' missing. I've verified that these files are in fact there and match the .config file used to compile the kernel. So I ignore this message. 2. insmod complains by issuing "hello: Unknown symbol serial8250_ports" and "insmod: error inserting 'hello.ko': -1 Unknown symbol in table" The local Module.symvers created by the modules script always has length 0. The modules script doesn't report any errors during compile, modpost or link. I'm at a loss to figure this one out. Any takers? Is it possible that insmod is messed up with the newer kernel? Kernel version issue? Configuration issue? Regards, Darcy Roberts AICDairy.com -- http://linuxfromscratch.org/mailman/listinfo/blfs-support FAQ: http://www.linuxfromscratch.org/blfs/faq.html Unsubscribe: See the above information page
