将wq9001驱动集成到rv1106 SDK

下载代码

上次修改好的代码已经上传到仓库,通过git clone下载到SDK的luckfox-pico/sysdrv/drv_ko/wifi文件夹中

修改上级Makefile文件

打开luckfox-pico/sysdrv/drv_ko/wifi中的Makefile

添加

bash 复制代码
ifneq ($(findstring $(RK_ENABLE_WIFI_CHIP),"WQ9001"),)
	@make -C wq9001-wifi/
endif

修改wq9001 的Makefile

bash 复制代码
# 这里要注意不能用$(shell pwd)及$(PWD)
# 防止在进入kernel后包含头文件时路径变化
DRV_PATH := $(abspath $(lastword $(MAKEFILE_LIST)))
DRV_PATH := $(dir $(DRV_PATH))
export DRV_PATH

ARCH ?= arm
CROSS_COMPILE ?= arm-rockchip830-linux-uclibcgnueabihf-
KSRC ?= ../../../source/kernel
......

all:
ifeq ($(KSRC),)
	$(error KSRC must be defined. Please specify the kernel source directory)
endif
	@echo $(DRV_PATH)
	$(MAKE) V=1 -C $(KSRC) M=$(DRV_PATH) \
		ARCH=$(ARCH) \
		CROSS_COMPILE=$(CROSS_COMPILE) \
		modules
	#添加strip进行瘦身
	$(CROSS_COMPILE)strip --strip-debug $(shell pwd)/*.ko
	#复制驱动到out目录
	cp $(shell pwd)/wq9001.ko $(M_OUT_DIR)

clean:
	rm -f *.o *.ko *.mod.c *.mod.o .*.cmd modules.order Module.symvers
	rm -rf .tmp_versions
	find . -name '*.o' -delete
	find . -name '.*.o.d' -delete
	find . -name '.*.o.cmd' -delete

使用

从新编译后,烧录镜像到TF卡,能正常找到wifi。

相关推荐
十日十行14 小时前
Linux和window共享文件夹
linux
木心月转码ing21 小时前
WSL+Cpp开发环境配置
linux
崔小汤呀2 天前
最全的docker安装笔记,包含CentOS和Ubuntu
linux·后端
何中应2 天前
vi编辑器使用
linux·后端·操作系统
何中应2 天前
Linux进程无法被kill
linux·后端·操作系统
何中应2 天前
rm-rf /命令操作介绍
linux·后端·操作系统
何中应2 天前
Linux常用命令
linux·操作系统
葛立国2 天前
从 / 和 /dev 说起:Linux 文件系统与挂载点一文理清
linux
哇哈哈20213 天前
信号量和信号
linux·c++
不是二师兄的八戒3 天前
Linux服务器挂载OSS存储的完整实践指南
linux·运维·服务器