日韩成人激情_欧美黑人xxx_国产一区二精品区在线_精品在线一区_97成人资源_久久久久久一区

產品分類

當前位置: 首頁 > 工業電子產品 > 其他電子產品 > 開發板,套件,編程器 > 開發板

類型分類:
科普知識
數據分類:
開發板

Porting ART Driver to OpenWRT

發布日期:2022-10-14 點擊率:36

OpenWRT is a popular wireless router OS, and ART (Atheros Radio Test) is a radio test tool provided by Qualcomm Atheros. If anyone want to test radio performance in OpenWRT OS, one thing has to to be done is that porting ART driver to OpenWRT. A friend of mine was looking for OpenWRT ART driver and I spent a lot of time on porting it. Fortunately, I finally succeeded and I like to share it with the readers of my blog in this post.

By the way, my English is not very good, if there is any mistake, please correct me.

Step 1, modify makefile.artmod to match with the specified kernel path and toolchain path.

KDIR := /home/tom/openwrt/trunk/build_dir/target-mips_34kc_uClibc-0.9.33.2/linux-ar71xx_generic/linux-3.18.7  
PWD := $(shell pwd)   
ROOTDIR := $(PWD)/modules  
# Default architecture is MIPS  
ARC :=mips  CROSS_CC :=/home/tom/openwrt/trunk/staging_dir/toolchain-mips_34kc_gcc-4.8-linaro_uClibc-0.9.33.2/bin/mips-openwrt-linux-uclibc-

Step 2, by not making any code changes, starting compile and I got the error below.

error: unknown field ‘ioctl’ specified in initialize

I have encountered similar problem during porting ART driver for Freescale i.MX6 processor. Change ioctl into compat_ioctl of dk_fops structure located in modules/dk_func.c, compile again and there are no errors about ioctl.

Step 3, a new error as below.

error: ‘SPIN_LOCK_UNLOCKED’ undeclared here (not in a function)

Modify related code from

spinlock_t driver_lock = SPIN_LOCK_UNLOCKED;

to

DEFINE_SPINLOCK(driver_lock);

Step 4, compile the source code once again and art.ko kernel module is avilable in modules directory.

Step 5, upload art.ko to a web server and download it into DUT by wget command.

Step 6, load DUT by artgui, error is reported in console window as below.

deviceInit devIndex=0 device_fn=0 pdkInfo=0  
Opening device /dev/dk0  
Error: get version ioctl failed !  
< 6006 ERROR Anwi driver load error.  
< 7502 CONTROL OFF  
< 7504 INFO |set|devid||  
< 7504 INFO |set|mac||  
< 7504 INFO |set|customer||  
< 7506 CONTROL DONE load devid=-1; caldata=auto;

the screenshot is attached below

Step 7, dk_fop structure is defined as below in higher ART version.

#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,31) 
static long dk_ioctl_new(struct file *file, unsigned int cmd, unsigned long arg) 
{ struct inode *inode = file->f_path.dentry->d_inode; 
long ret; 
ret = dk_ioctl(inode, file, cmd, arg); return ret; } 
#endif

A new ioctl is defined and it takes effect when kernel version is above 2.6.31.

Step 8, modify dk_fops structure defined in lower ART version as below.

static long dk_ioctl_new(struct file *file, unsigned int cmd, unsigned long arg) { 
struct inode *inode = file->f_path.dentry->d_inode; 
long ret; 
ret = dk_ioctl(inode, file, cmd, arg); return ret; 
}  

static struct file_operations dk_fops = { 
owner: THIS_MODULE, 
open: dk_open, 
release: dk_release, 
mmap: dk_mmap, 
unlocked_ioctl: dk_ioctl_new };

Step 9, compile again and download art.ko into DUT, using artgui to load DUT and thers is no error in console window as below.

下一篇: PLC、DCS、FCS三大控

上一篇: 修改OpenWRT的發射功

推薦產品

更多
主站蜘蛛池模板: 成年人在线视频 | 日本精品一区二区三区四区 | 亚洲欧美日本在线 | 亚洲一页| 亚洲一区二区三区免费在线 | 日韩一区二区免费视频 | 成人av在线播放 | 一区二区三区欧美在线 | 日本黄色不卡视频 | 日韩中文字幕网 | 国产无人区一区二区三区 | 免费看的黄网站 | 国产精品久久久久久久久久免费 | 日韩在线不卡 | 自拍偷拍第一页 | 精品一区二区三区免费毛片 | 伊人狠狠干 | 狠狠狠干 | 国产成人精品一区二区 | 国产精品中文字幕在线 | 久久久久亚洲 | 国产精品视频导航 | 免费成人在线网 | 午夜伊人 | 黄色欧美视频 | 毛片一级黄色 | 热久久久| 国产第一区二区 | 97国产一区二区精品久久呦 | 国产高清免费视频 | 久久精品国产亚洲一区二区 | 国产情侣在线看 | 亚洲天堂免费 | 亚洲www啪成人一区二区 | 国产精品高清在线 | 免费成人在线网 | 久久成人精品一区二区三区 | 国产精品成人在线播放 | 亚洲国产日本 | 久久久久久免费精品一区二区三区 | 欧美xxxx黑人又粗又长 |