Makefile confused about kernel version that's running - Failed Module Insertion
3 Attachment(s)
Hi everyone,
I'm trying to install a driver for an analog-to-digital converter, everything compiles just fine but I get an insertion error. I'm running the non-smp kernel when doing this but the Makefile for the A-D seems to think I'm running the smp kernel, I think this is why the module is not being inserted or loaded properly ? Attached some screenshots. snapshot1 - the failed insertion. snapshot2 - verified proper gcc version. snapshot5 - output of modinfo Any ideas why the Makefile would be "confused" about the kernel version that is running ? Typing "uname -r" returns 2.6.21.5, not the smp kernel ! Thanks. |
Strange indeed. Are you sure the kernel sources/headers you're building against are for your running kernel?
This is what the Makefile essentially does: Code:
KERNELVER = $(shell uname -r | cut -d . -f1-2 ) |
1 Attachment(s)
Hi, thanks for the help.
Is there a way I can check this ? I did also find the following message, see attached. |
Try to provide KERNELDIR explicitly as an argument to make:
Code:
make -C driver KERNELDIR="/lib/modules/$(uname -r)/build" |
Unfortunately this didn't work 100 percent, the make_all script ran very quickly with the following command
./make_all -C driver KERNELDIR="/lib/modules/$(uname -r)/build" and still didn't install the module ? I then removed the 24dsi12 directory completely, and then re-unpacked the tar file (so as to start from scratch), and still the same effect, the new command ran very quickly and didn't seem to be doing anything ?, when I ran just ./make_all, then the Vortex had to work for a minute or so compiling, etc., but again the module wasn't inserted, with the apparent result being the makefile is compiling against the smp kernel. I may try installing Lubuntu 10.04 (2.6.32.21) which DOES properly see both Vortex cores (with the generic kernel) and then try installing the ADC driver in Lubuntu ? Thanks. |
Quote:
Code:
make -C driver KERNELDIR="/lib/modules/$(uname -r)/build" Code:
./make_all KERNELDIR="/lib/modules/$(uname -r)/build" |
Oh, sorry about that, I'll re-try with the new ./make_all syntax, have got Lubuntu 10.04 booted up, no gcc installed at all ! Back to Slack12 and will try the new ./make_all command.
|
2 Attachment(s)
Darn-it, still no luck, the ./make_all process definitely did all the work it was supposed to, but the module still fails to insert, modinfo 24dsi12_pll.ko returns 2.6.21.5-smp.
Attached some screen-shots of the build process. |
Run 'dmesg -W' in another terminal and then try insmod again, what do you see?
|
Unrelated question maybe, but, when typing the following
ls /lib/modules/`uname-r`/kernel/drivers There's no directory here for the 24dsi12_pll. Is the 24dsi12_pll.ko supposed to "live" in the location shown above ?, presumably inside a 24dsi12_pll directory ? Presently, the only place the kernel-object file is located (that I know of) is /usr/src/linux-2.6.21.5-generic/drivers/24dsi12_pll/driver |
1 Attachment(s)
Hi, I tried dmesg -W but this didn't work for me ? SO I just tried dmesg, and I saw the same info as obtained when typing
dmesg | grep -i 24dsi Attached that screenshot here. Thanks for the help. |
You have some CHOST conflict there, your Vortex probably is an i586 or even i486, but you are building for i686. Even if your Vortex is an i686 your kernel is not. You need to build for -march=i486 to match your kernel.
|
Can I pass the compiler option -march=i486 to the makefile from the command line ?
./make_all KERNELDIR="/lib/modules/$(uname -r)/build" -march=i486 ??? |
Code:
CFLAGS="-march=i486" |
Unfortunately no luck still, same error, unable to load module, invalid module format.
|
All times are GMT -5. The time now is 11:29 PM. |