@1405010304geshuaishuai
2017-06-11T08:17:05.000000Z
字数 1607
阅读 4294
Linux
CentOS6
compliling_driver
I've installed the CentOS 6 on my laptop which has a bad physical network card that means I could not use the Internet. Fortunately, I bought a Fast Ethernet Adapter, at first I have no idea to drive this Adapter, though I have the diver and an unclear instruction. So I've placed this problem aside for a long time. These days, I began to review the fundamental knowledge of Linux and decided to compile this driver so that I can use this Adapter to surfer.
The reason why I do this job today is that I had difficulties to compile a driver before just because the driver is not compatible. The driver I have is just compatible for the version of kernel 2.6.28 and 2.6.29. Unfortunately, My kernel version is 2.6.32. Afterwards, I googled the problem I met when I compile the driver, there is one same situation as mine, according to his solution I learned that the driver's version is not compatible for my kernel version, I googled the appropriate driver for my Linux Kernel and finally I find this page.
According to the guide of this. First, I downloaded the driver and I ran make command:
$ make
No errors.
All I need to do is to copy the .ko
file to /lib/modules/'uname -r'/kernel/drivers/net/usb
then run depmod
to register the module
$ depmod
then modprobe usbnet
$ modprobe usbnet
and
$ insmod /lib/modules/`uname -r`/kernel/drivers/net/usb/qf9700.ko
and driver should be installed.
You can verify that you have a new network interface with
$ ifconfig
You got a new eth1
Restart networks:
$ service network restart
or it is just as easy to reboot
When you met some diffculties, first, you should know that why this situation happended, then to find the solutions.
I also learned how to drive the adapter for my Linux CnetOS 6.
Compile the Kernel...