LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Add a Driver to kernel (https://www.linuxquestions.org/questions/linux-newbie-8/add-a-driver-to-kernel-676463/)

shahin123 10-15-2008 05:57 AM

Add a Driver to kernel
 
Hi,

I want to add a NIC driver to my kernel (Debian 2.6.18-5-686) , find a doc on how to do this, I did download the linux-2.2.26.tar.bz2 on my Debian box after unzip and untar it, the doc suggested to run make menuconfig but when I do so (or make or mske gconfig or make xconfig. etc..) I get this error:


make: *** No rule to make target `menuconfig'. Stop.
Debian:/usr/src/linux-2.6.27/drivers# make: *** No rule to make target `menuconfig'. Stop.


Do I need some extra application for recompiling a kernel? or standard Debian install is enough! or there is some thing more into it then just downloading the kernel src and untar it?

Thanks,

Shahin

Total-MAdMaN 10-15-2008 06:02 AM

You run "make menuconfig" from the root of the source code directory, which in your case is /usr/src/linux-2.6.27.

shahin123 10-16-2008 05:41 AM

Hi,

Thanks for your reply,
I did get the make menuconfig to work.

As I said I want to add a driver for a nic to debian, becuse when I install it, Debian couldn't find a driver for nic and my nic is not in the list of NICs. so I did finsh the install without NIC, and download the proper NIC driver, it has .rpm and the source code. so could you tel me how to install the driver?



Thanks,

Shahin

jf.argentino 10-16-2008 06:19 AM

I'm not sure that's the best way to do this. You'd better to install the kernel development package through apt. It must be something like "apt get install kern-devel"

shahin123 10-17-2008 04:10 AM

Hi,

After starting the make menuconfig I can go to Drivers > Network but how can I load the driver here?

Thnaks,

Shahin

Total-MAdMaN 10-17-2008 12:11 PM

The menu is used for deciding what you want compiled into the kernel. You have to specify the modules (drivers) you want loaded in /etc/modules.autoload (or something similar, depending on your distribution).

shahin123 10-22-2008 06:11 AM

Hi,

Thanks for your update,

I did install debian etch (Kernel 2.6.18-5-686) and as I said it does not see the NIC's, the NICs using the tg3.ko drivers, The read my files of the drivers say the kernel 2.6 should recogise the NICs, so I did check the /lib/modules/2.6.18-5-686/kernel/drivers/net/ and yes the tg3.ko is there (/lib/modules/2.6.18-5-686/kernel/drivers/net/tg3.ko), so my question is, why then the nic's are not recognise at the installion?

Thanks,

Shahin

tredegar 10-22-2008 09:23 AM

Quote:

so I did check the /lib/modules/2.6.18-5-686/kernel/drivers/net/ and yes the tg3.ko is there
The module is "there", but is it loaded? It won't work unless it is loaded.
Check with lsmod | grep tg3
Is it listed?
If not, load the module with sudo modprobe tg3
Then see if your NIC is seen with sudo ifconfig


All times are GMT -5. The time now is 05:51 PM.