Rebuilding a kernel for a new driver

Associate
Joined
1 Aug 2003
Posts
1,053
I'm currently running CentOS 5.2

cat /proc/version gives:

Linux version 2.6.18-92.el5 ([email protected]) (gcc version 4.1.2 20071124 (Red Hat 4.1.2-42)) #1 SMP Tue Jun 10 18:49:47 EDT 2008

I want to install and use a Connexant ADSL adapter (or modem as people seem to insist on calling them). I have found a driver that claims to support kernels of ≥ 2.6.27 but I am having problems. Its make process requires that I have the kernel sources unpacked and configured in /usr/src/linux

I downloaded linux-2.6.27.31.bz2 from kernel.com and ran bzip2 -d then tar -fx and put all the files into a /usr/src/linux folder. From here, I'm a little stuck. I was under the impression that I merely had to run 'make config' but this does not work. Please could someone point out where I have managed to go so terribly wrong so early.

Ta!
 
Right - falling fairly early on I'm afraid.

There is no file in proc called config.gz, I wasn't totally sure what you were suggesting here. You seemed to be invoking zcat to decompress a file in proc - sorry if this makes me sound stupid but it's best to be honest with these things.

Beyond that, I think I need to install a bunch of stuff as I'm being told by bash that it doesn't understand make commands (something to do with gcc apparently).

Thanks
 
As an update, I ran the following:

yum groupinstall "Development Tools"
yum install ncurses-devel

As I thought that these would be necessary. The drivers I'm trying to install are located here:

http://www.zweije.nl.eu.org/~vzweije/accessrunner/release/CnxADSL-6.1.2.007-PIM-2.6-2.1.tar.bz2

The instructions read that I have to unpack the kernel to /usr/src/linux and that it be configured and compiled. Well... I have unpacked (tar and bz2) the kernel to /usr/src/linux but beyond that I am lost. After unpacking, I ran make menuconfig and got:

HOSTCC scripts/basic/fixdep
/bin/sh: gcc: command not found
make[1]: *** [scripts/basic/fixdep] Error 127
make: *** [scripts_basic] Error 2

Hope this clarifies the matter :)
 
If you extracted the new kernel sources straight to /usr/src/linux - you may very well have overwritten the existing sources (and subsequently dirtied the new ones), so - you'll need to find out if /usr/src is currently a symlink - it should be

I created the folder /usr/src/linux (am I the only one who keeps absent mindedly jabbing the tab key while typing these things...?) so certainly didn't overwrite anything. As for everything else, I'll get to that and let you know how I get on.
 
Right - I seem to be getting somewhere.

I had to yum a bunch of things before it would allow me to make, but it was eventually happy with them. I am now waiting for the kernel to recompile.

On another note, I think it is a point that many have made before me but surely this has to be the most obtuse way to install drivers imaginable. For all the faults of Windows, if you need a driver you just slap it on and go. While there are many advantages to Linux, the disadvantages are that it seems to delight in making me cry like a little girl.
 
Right, now I seem to be getting somewhere else. Following the directions of the man who wrote the driver package (I felt this best since he clearly knew what he was doing far more than I) after sorting out what I wanted in my kernel I then was supposed to run make in the folder containing the driver package and it produced this rather lovely stream for me:

bashprompt# make
for n in KernelModule/DpController; \
do if [ -d $n ]; then make -C $n all || exit; fi; done
for n in KernelModule DownLoadApp; do make -C $n all || exit; done
make[1]: Entering directory `/root/CnxADSL-6.1.2.007-PIM-2.6-2.1/KernelModule'
make CnxADSL.ko
make[2]: Entering directory `/root/CnxADSL-6.1.2.007-PIM-2.6-2.1/KernelModule'
make -C /usr/src/linux SUBDIRS=`pwd` modules
make[3]: Entering directory `/usr/src/linux'
CC [M] /root/CnxADSL-6.1.2.007-PIM-2.6-2.1/KernelModule/ARMAbstract.o
In file included from /root/CnxADSL-6.1.2.007-PIM-2.6-2.1/KernelModule/LnxTools.h:44,
from /root/CnxADSL-6.1.2.007-PIM-2.6-2.1/KernelModule/ARMAbstract.c:34:
/root/CnxADSL-6.1.2.007-PIM-2.6-2.1/KernelModule/Version.h:66:2: error: #error "CONFIG_ATM not defined, you can't use this driver without it"
/root/CnxADSL-6.1.2.007-PIM-2.6-2.1/KernelModule/Version.h:78:2: error: #error "CONFIG_PPPOATM not defined, you can't use this driver without it"
make[4]: *** [/root/CnxADSL-6.1.2.007-PIM-2.6-2.1/KernelModule/ARMAbstract.o] Error 1
make[3]: *** [_module_/root/CnxADSL-6.1.2.007-PIM-2.6-2.1/KernelModule] Error 2
make[3]: Leaving directory `/usr/src/linux'
make[2]: *** [CnxADSL.ko] Error 2
make[2]: Leaving directory `/root/CnxADSL-6.1.2.007-PIM-2.6-2.1/KernelModule'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/root/CnxADSL-6.1.2.007-PIM-2.6-2.1/KernelModule'
make: *** [all] Error 2

Any advice?

I rather foolishly (as I wanted to see what it would do) ran the make config routine and installed the new kernel before adding the driver. This was partially to check that it all worked fine without so that if anything did go wrong, it would narrow it down to the driver.

Clearly I'm missing pppd with the PPPoATM plugin but any ideas as to how to proceed?
 
Last edited:
I ran make oldconfig but still got

make
for n in KernelModule/DpController; \
do if [ -d $n ]; then make -C $n all || exit; fi; done
for n in KernelModule DownLoadApp; do make -C $n all || exit; done
make[1]: Entering directory `/root/CnxADSL-6.1.2.007-PIM-2.6-2.1/KernelModule'
make CnxADSL.ko
make[2]: Entering directory `/root/CnxADSL-6.1.2.007-PIM-2.6-2.1/KernelModule'
make -C /usr/src/linux SUBDIRS=`pwd` modules
make[3]: Entering directory `/usr/src/linux'
CC [M] /root/CnxADSL-6.1.2.007-PIM-2.6-2.1/KernelModule/ARMAbstract.o
In file included from /root/CnxADSL-6.1.2.007-PIM-2.6-2.1/KernelModule/LnxTools.h:44,
from /root/CnxADSL-6.1.2.007-PIM-2.6-2.1/KernelModule/ARMAbstract.c:34:
/root/CnxADSL-6.1.2.007-PIM-2.6-2.1/KernelModule/Version.h:66:2: error: #error "CONFIG_ATM not defined, you can't use this driver without it"
/root/CnxADSL-6.1.2.007-PIM-2.6-2.1/KernelModule/Version.h:78:2: error: #error "CONFIG_PPPOATM not defined, you can't use this driver without it"
make[4]: *** [/root/CnxADSL-6.1.2.007-PIM-2.6-2.1/KernelModule/ARMAbstract.o] Error 1
make[3]: *** [_module_/root/CnxADSL-6.1.2.007-PIM-2.6-2.1/KernelModule] Error 2
make[3]: Leaving directory `/usr/src/linux'
make[2]: *** [CnxADSL.ko] Error 2
make[2]: Leaving directory `/root/CnxADSL-6.1.2.007-PIM-2.6-2.1/KernelModule'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/root/CnxADSL-6.1.2.007-PIM-2.6-2.1/KernelModule'
make: *** [all] Error 2

I thought I'd made PPPoATM on the kernel but it doesn't seem to have helped
 
Back
Top Bottom