LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Kernel (https://www.linuxquestions.org/questions/linux-kernel-70/)
-   -   Intel 536 kernel module problems (https://www.linuxquestions.org/questions/linux-kernel-70/intel-536-kernel-module-problems-483660/)

Andy Hunter 09-15-2006 02:23 AM

Intel 536 kernel module problems
 
Hello, can someone out there help this linux newbie with his modem installation

I'm trying to compile the kernel module for an Intel536 based modem. The compilation process calls a 'config_check' script file that is supposed to check that I have the correct kernel source code installed.

Here are the offending lines from the 'config_check' file...

if [ -a /lib/modules/$KERNVER/build/include/linux/autoconf.h ]; then
echo " /lib/modules... autoconf.h exists"
else
echo " /lib/modules... autoconf.h does not exist"
echo " please install kernel source"
exit 1
fi

This makes perfect sense to me but the '/lib.modules/$KERNVER/build' directory is in fact a link to the '/usr/src/linux-2.6.16.13-4-obj/x86_64/default' directory. This directory contains nothing but a file titled 'Module.symvers'. As far as I can see the actual kernel sources are installed in '/usr/src/linux-2.6.16.13-4'

What I want to know is...

1) What's the difference between the '/usr/src/linux-2.6.16.13-4' and the '/usr/src/linux-2.6.16.13-4-obj' directories.
2) Is it okay for me to alter the '/lib.modules/$KERNVER/build' link to point to the correct directory?


The 'config_check' file then goes on to the following...

if [ "`diff /boot/vmlinuz.autoconf.h /lib/modules/$KERNVER/build/include/linux/autoconf.h`" \
== "" ]; then
echo " autoconf.h matches running kernel"
else

As far as I can see my system has no /boot/vmlinuz.autoconf.h file! Any ideas on this one?

Many regards


Andy H

jayjwa 09-19-2006 11:10 AM

The 536EP is a chipset for a Winmodem, but will work nicely on Linux with the resulting Intel536.ko module.

I've never seen a /usr/src/linux-(version)-obj directory. Is this something your distro is doing? Looks like someone wanted to try to keep the object files out of the source code. While that's possible, it can causes troubles later (like this one.)

If you build/install from source , you'll get /lib/modules/(version)/build symbolic linked to /usr/src/linux-(version). Then, autoconf.h will be in the right place that the script expects. The "build" directory in /lib/modules/(version) is so you can later compile modules against the source code. I'm curious how they'd get built with it linked to '/usr/src/linux-2.6.16.13-4-obj/x86_64/default. From what you've said, there is no source there. Prehaps you could fix the symlink. You can always put it back if need should arise later on.

I don't have a /boot/vmlinuz.autoconf.h either. Or even a vmlinuz. I think these are RedHat-isms. This in itself shouldn't halt the build. Ignore it. It's been awhile since my Intel536 source directory was install-default, so prehaps I fixed the script to not mind this file. I can't remember. If the script refuses to go forward without that file, remove that part from the script. The important thing is kernel version = source that is installed version.

Now we run into one other problem. Last I checked, the latest Intel536 source on their site was this tarball, Intel-536EP-4.71.tgz, which will not compile and work with 2.6.16-2.6.17 (and I want to say 2.6.15's as well, but that was awhile ago since I ran that kernel.)

Hopefully you have a distro-fixed version that will work on 2.6.16 and up. I've not seen one, but if your build bombs, this is most likely what is happening. Many things changed in the kernel source, and the code needs to be updated for the module. I found some patches on the net and compiled them together, and hacked in a few very ugly fixes just to get it working (C is definately not my language). The biggest trouble it seems is the kernel does not want to export the required symbols due to the fact that the module code is labeled Proprietry, and it wants GPL to export the symbols. Likely large parts of the module would need re-writing.

Andy Hunter 09-21-2006 10:27 AM

Thanks
 
Thanks for the reply jayjwa, I’ll have another play over the weekend and report back on Monday.

As far as I’m aware an Intel536 based modem is a hardware modem. Mine was certainly advertised as such. The kernel module is apparently to emulate the serial port interface.

I’ve no idea why the /usr/src/linux-(version)-obj directory is there or why /lib/modules… links to it. I’ll alter the symlink and try again.

If I can’t get it working this weekend I think I’ll procure an external modem!

Andy


All times are GMT -5. The time now is 01:54 PM.