[关闭]
@1405010304geshuaishuai 2017-06-11T08:17:05.000000Z 字数 1607 阅读 4294

『博客主页』

Compiling linux divers for RD9700(qf9700.ko) under Centos 6

Linux CentOS6 compliling_driver


Why to do so.

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 road is not flat

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.

Beginning compiling

According to the guide of this. First, I downloaded the driver and I ran make command:

  1. $ 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

  1. $ depmod

then modprobe usbnet

  1. $ modprobe usbnet

and

  1. $ 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

  1. $ ifconfig

You got a new eth1

Restart networks:

  1. $ service network restart

or it is just as easy to reboot

What I've learned

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.

Next mission

Compile the Kernel...

添加新批注
在作者公开此批注前,只有你和作者可见。
回复批注