TQ2440上移植RT3070AP過程

2021-06-21 12:03:38 字數 3546 閱讀 8959

硬體:tq2440,usb rt3070

配置好編譯環境,解壓2010_0203_rt3070_softap_v2.4.0.1_dpa

移植過程:

1、修改配置相關檔案

進入2010_0203_rt3070_softap_v2.4.0.1_dpa

下面有3個資料夾module、netif、util

分別修改3個makefile檔案

將platform = smdk開啟,其他注釋掉

然後配置平台,linux_src是核心的絕對路徑

ifeq ($(platform),smdk)

linux_src = /opt/embedsky/linux-2.6.30.4

cross_compile = arm-linux-

endif

另外需要修改的地方

netif/os/linux/usb_main_dev.c中新增module_license("gpl");

module/common/rtmp_init.c中的module_license("ralink");改為module_license("gpl");

2、編譯

用make或者make arch=arm kbuild_nopedantic=1編譯都行

但是make編譯時沒有生成rtnet3070ap.ko

進入netif資料夾直接make也可以生成ko檔案

3、拷到開發板上的檔案

上述三個資料夾的os/linux下的ko檔案rtutil3070ap.ko、rt3070ap.ko、rtnet3070ap.ko

再加乙個module下的rt2870ap.dat檔案

四個檔案copy到u盤,插到開發板上

4、開發板配置

在開發板的/etc/wireless下建立乙個資料夾rt2870ap,將rt2870ap.dat放到此資料夾下

將另外三個ko檔案放到/usr下,這個可以自己定義

5、載入

按順序載入

#insmod rtutil3070ap.ko

#insmod rt3070ap.ko

#insmod rtnet3070ap.ko

如果不允許載入

用lsmod檢視目前存在的模組

如果有rt5370就解除安裝再上述順序載入,tq開發板預設安裝了這個ko檔案,解除安裝命令rmmod rt5370sta.ko

6、可能遇到問題

如果上述一切正常

下面繼續

問題一:

[root@embedsky /usr]# ifconfig ra0 up

<-- error in alloc tx txcontext[3] httx_buffer !!

<-- rtmpalloctxrxringmemory, status=3

error!!! rtmpallocdmamemory failed, status[=0x00000003]

!!! rt28xx initialized fail !!!

ifconfig: siocsifflags: operation not permitted

解決:修改module netif util三個目錄下的include/os/rt_linux.h中bulkaggre_size引數,將100改為60

問題二:

[root@embedsky /usr]# ifconfig ra0 up

<-- rtmpalloctxrxringmemory, status=0

-->rtusbvenderreset

<--rtusbvenderreset

rtmposfileopen(): error 2 opening /etc/wireless/rt2870ap/rt2870ap.dat

open file "/etc/wireless/rt2870ap/rt2870ap.dat" failed!

1. phy mode = 0

error!!! rtmpreadparametershook failed, status[=0x00000001]

---> rtmpfreetxrxringmemory

<--- rtmpfreetxrxringmemory

!!! rt28xx initialized fail !!!

ifconfig: siocsifflags: operation not permitted

解決:應該是沒有建立rt2870ap資料夾,建立好再把rt2870ap.dat烤過去,因為我先移植過rt3070sta,所以以為這個rt2870××.dat是通用的

7、正常工作

下面是正常列印

[root@embedsky /]# ifconfig ra0 up

<-- rtmpalloctxrxringmemory, status=0

-->rtusbvenderreset

<--rtusbvenderreset

key1str is invalid key length(0) or type(0)

key2str is invalid key length(0) or type(0)

key3str is invalid key length(0) or type(0)

key4str is invalid key length(0) or type(0)

1. phy mode = 9

2. phy mode = 9

nvm is efuse and its size =2d[2d0-2fc]

3. phy mode = 9

mcs set = ff 00 00 00 01

sync - bbp r4 to 20mhz.l

sync - bbp r4 to 20mhz.l

sync - bbp r4 to 20mhz.l

sync - bbp r4 to 20mhz.l

sync - bbp r4 to 20mhz.l

sync - bbp r4 to 20mhz.l

sync - bbp r4 to 20mhz.l

sync - bbp r4 to 20mhz.l

main bssid = 7c:dd:90:56:6d:84

<==== rt28xx_init, status=0

0x1300 = 00064320

配置ip命令:

ifconfig ra0 192.168.8.25

#iwconfig ra0

ra0       rtwifi softap  essid:"rt2860ap"  nickname:""

mode:managed  channel=11  access point: 7c:dd:90:56:6d:84

bit rate=150 mb/s

用android手裡可以查到rt2870ap的wifi訊號

8、關閉模組

結束後,可以通過以下命令解除安裝模組:

#ifconfig ra0 down

#rmmod rtnet3070ap.ko

#rmmod rt3070ap.ko

#rmmod rtutil3070ap.ko

TQ2440上移植RT3070AP過程

硬體 tq2440,usb rt3070 配置好編譯環境,解壓2010 0203 rt3070 softap v2.4.0.1 dpa 移植過程 1 修改配置相關檔案 進入2010 0203 rt3070 softap v2.4.0.1 dpa 下面有3個資料夾module netif util 分...

TQ2440移植strace工具

一 以下是網上的乙個方法,但是不適合tq2440 主要是主機靜態連線的庫我沒有,呵呵 strace工具是乙個非常強大的工具,是除錯程式的好工具。要移植到arm平台,就需要使用交叉編譯工具編譯生成靜態鏈結的可執行檔案。具體步驟如下 2.解壓。3.配置。configure host arm none l...

arm linux 移植無線網絡卡RT3070驅動

環境 編譯環境 ubuntukylin 14.04 交叉編譯器 arm linux gcc 4.4.1 開發板核心 linux2.6 3.0.1及以上 無線模組 雷凌ralink rt3070 一 核心版本 linux 3.0及以上 1 配置linux核心 1.1 進入linux核心目錄 make ...