1.下載最新版的RT73無線網(wǎng)卡驅(qū)動:
# wget http://rt2x00.serialmonkey.com/rt73-cvs-daily.tar.gz
解壓:# tar zxvf rt73-cvs-daily.tar.gz
2.在內(nèi)核中創(chuàng)建新文件夾drivers/usb/net/rt73,
# mkdir drivers/usb/net/rt73
將解壓出來的文件夾Module下的文件拷貝到剛才新建的rt73文件夾中:
# cp rt73-(time)/Module/* /home/oem/trunk/cirrus-1-0-0-4/linux-2.6.8.1/drivers/usb/net/rt73
3.修改Qwerk板內(nèi)核源代碼,加入RT73驅(qū)動的配置信息,以使在make menuconfig 中能添加RT73驅(qū)動的選項。
修改drivers/usb/net/Kconfig文件,加入RT73的驅(qū)動模塊的配置項:
# gedit drivers/usb/net/Kconfig &
加入以下內(nèi)容:
config RT73
tristate “support for rt73 wireless usb device”
depends on USB && NET && USB_USBNET
修改drivers/usb/net/Makefile, 加入rt73的編譯項:
# gedit drivers/usb/net/Makefile &
添加一下內(nèi)容:
obj-$(CONFIG_RT73)+= rt73/
4.修改RT73的Makefile,設(shè)置內(nèi)核位置和編譯選項:
刪除以前的modules選項,并將arm編譯項改成modules,這樣編譯的時候才是for ARM版本的驅(qū)動模塊;
修改KERNDIR為Qwerk內(nèi)核位置:
KERNDIR=/home/oem/trunk/cirrus-1-0-0-4/linux-2.6.8.1
5.配置內(nèi)核:
將Qwerk默認配置拷貝到內(nèi)核根目錄下:
# cp ../edb9302/linux.config .config
用make menuconfig界面配置編譯選項,選上RT73無線網(wǎng)卡編譯選項:
在USB devices à network à support for rt73 wireless usb device,按空格鍵選為M,將其編譯成模塊。
6.編譯內(nèi)核模塊:
# make modules
成功編譯后,會在drivers/usb/net/rt73目錄下生成rt73.ko驅(qū)動文件,將其拷貝到FTP目錄下,以便于下載到Qwerk板上:
# cp drivers/usb/net/rt73/rt73.ko /home/ftp/
7.下載rt73驅(qū)動到Qwerk上,并修改一些腳本文件使其開機加載驅(qū)動并啟用網(wǎng)卡:
假設(shè)Qwerk板已經(jīng)可以啟動起來(燒寫系統(tǒng)可以參考QwerkDevelopmentGuide),啟動Qwerk板,從minicom命令行操作:
# cd /opt/driver/
# wget ftp://192.168.1.201/rt73.ko
編寫開機加載rt73.ko驅(qū)動、啟用網(wǎng)卡腳本,將其放入/opt/scripts/目錄下:
# cd ../scripts/
# vi wifi-up
加入如下內(nèi)容:
(去公司后Copy到這兒)
修改/opt/scripts/robot.init腳本文件,在最后添加wifi-up腳本:
# vi robot.init
加入:
/opt/scripts/wifi-up
保存推出。
8.至此為止,無線網(wǎng)卡驅(qū)動移植和配置工作已經(jīng)完成,重啟Qwerk,無線網(wǎng)卡就能工作了。
說明:
1.如果按照modules編譯的rt73.ko不能工作的話,可以選用armdebug編譯。
附一個老外的指導(dǎo):
put the contents of the Module directory into my arm 2.6.15 kernel tree under drivers/usb/net/rt73, then did the following to make it part of the kernel build:
- I added to the /drivers/usb/net/Kconfig to add an option to enable the rt73 module,
- Then edited the Makefile in /drivers/usb/net to have it build the subdir rt73 when the option above is active.
Then I ran the kernel menuconfig to actually enable that option.
Finally I edited the Makefile for the rt73 driver itself:
- put the right paths in KERNEL_SOURCE and MODULE_ROOT
- removed the calls to /sbin/depmod since we're not on the target system
- deleted the module and debug rules
- renamed arm rule to module and armdebug rule to debug
At this point doing make modules && make modules_install from the kernel root did the trick.
I'm not sure if this will be enough on your system. It worked for me.
By wuzechun
MSN:chernwu at hotmail.com