当前位置:   article > 正文

安信可WiFi模组WIFI-AI-M62做linux网卡_ai-m62-cbs

ai-m62-cbs

安信可WiFi模组WIFI-AI-M62做linux网卡

为了方便编译,重官网给的驱动源码拷贝wifi6_drv文件出来,后续在该文件里面做修改进行编译运行:

一、修改Makefile文件:

1.修改CONFIG_WPA3_SUPPORT配置,改为n
2.修改CONFIG_SUPPORT_WEXT_MODE配置,改为y
3.修改运行平台ARCH 为arm
4.修改编译工具CROSS_COMPILE为arm-linux-gnueabihf-(根据自己所用工具而定)
5.指定linux内核所在的路径KERNELDIR

BL_VERS_NUM=6.7.4.0

#
# WAITING FOR KCONFIG {
#
CONFIG_BL_PCIE ?= n
CONFIG_BL_SDIO ?= y
CONFIG_BL_USB ?= y
CONFIG_BL_BTUSB ?= n

# one driver support wifi BT for usb interface
CONFIG_WIFI_BT_USB_ONE_DRV ?= n
# user speicify the configure file location (tx_pwr.conf rf_para.conf)
CONFIG_CFG_FILE_LOCATION_USER_DEFINE ?= n
# configure usb use 2k rx buffer in driver
CONFIG_BL_USB_RX_BUF_2K ?=n

## mp cmds
CONFIG_BL_MP ?= y

## use combo fw for wifi/bt coexit
CONFIG_FW_COMBO ?=y

## FW bin mode or convert to array mode
CONFIG_BL_DNLD_FWBIN ?= y

## use cfg80211 wext standard ioctl to support wext mode
CONFIG_SUPPORT_WEXT_MODE ?= y

## support wpa3 compat if apply patch to kernel (<4.17) to support wpa3
CONFIG_WPA3_SUPPORT ?=n

export CONFIG_BL_MP
export CONFIG_FW_COMBO
export CONFIG_BL_DNLD_FWBIN

CONFIG_DEBUG_FS ?= n

#
# mesh feature support
CONFIG_MESH ?=n

#
# DEBUG OPTIONS
CONFIG_BL_UM_HELPER_DFLT ?= "/dini/dini_bin/bl_umh.sh"

#
# FW ARCH:
CONFIG_BL_SDM ?= n
CONFIG_BL_TL4 ?= n
CONFIG_BL_FW_RETRY ?= y
CONFIG_BL_FPGA ?= n
CONFIG_BL_RX_REORDER ?= y
CONFIG_BL_RX_DEFRAG ?= y
CONFIG_BL_BAND_5G ?= n

# IPC version
CONFIG_BL_OLD_IPC ?= n

# TX/RX profiling
CONFIG_BL_TRX_PROFILE ?= n

# Support of P2P DebugFS for enabling/disabling NoA and OppPS
CONFIG_BL_P2P_DEBUGFS ?= n

# Polling interrupt
CONFIG_BL_INT_POLLING ?= n

ifeq ($(CONFIG_DEBUG_FS),y)
CONFIG_BL_DEBUGFS ?= y
export CONFIG_BL_DEBUGFS ?= y
endif
#
# } // WAITING FOR KCONFIG
#
subdir-ccflags-$(CONFIG_MESH) += -DCONFIG_MESH

subdir-ccflags-$(CONFIG_BL_DEBUGFS) += -DCONFIG_BL_DEBUGFS
subdir-ccflags-$(CONFIG_BL_DEBUGFS) += -DCONFIG_BL_UM_HELPER_DFLT=\"$(CONFIG_BL_UM_HELPER_DFLT)\"
subdir-ccflags-$(CONFIG_BL_P2P_DEBUGFS) += -DCONFIG_BL_P2P_DEBUGFS

# FW VARS
subdir-ccflags-y += -DNX_VIRT_DEV_MAX=2
subdir-ccflags-y += -DNX_REMOTE_STA_MAX=4
subdir-ccflags-y += -DNX_MU_GROUP_MAX=62
subdir-ccflags-y += -DNX_TXDESC_CNT=64
subdir-ccflags-y += -DNX_TX_MAX_RATES=4
subdir-ccflags-y += -DNX_CHAN_CTXT_CNT=3
subdir-ccflags-y += -DCONFIG_BL_FULLMAC
subdir-ccflags-y += -DDEBUG

# FW ARCH:
subdir-ccflags-$(CONFIG_BL_SDM) += -DCONFIG_BL_SDM
subdir-ccflags-$(CONFIG_BL_TL4) += -DCONFIG_BL_TL4
subdir-ccflags-$(CONFIG_BL_OLD_IPC) += -DCONFIG_BL_OLD_IPC
subdir-ccflags-$(CONFIG_BL_FW_RETRY) += -DBL_FW_RETRY
subdir-ccflags-$(CONFIG_BL_RX_REORDER) += -DBL_RX_REORDER
subdir-ccflags-$(CONFIG_BL_RX_DEFRAG)  += -DBL_RX_DEFRAG
subdir-ccflags-$(CONFIG_BL_FPGA) += -DBL_FPGA
subdir-ccflags-$(CONFIG_BL_BAND_5G) += -DBL_BAND_5G
subdir-ccflags-$(CONFIG_BL_TRX_PROFILE) += -DBL_TRX_PROFILE

# driver configure
subdir-ccflags-$(CONFIG_BL_DNLD_FWBIN) += -DCONFIG_BL_DNLD_FWBIN
subdir-ccflags-$(CONFIG_BL_MP) += -DCONFIG_BL_MP
subdir-ccflags-$(CONFIG_FW_COMBO) += -DCONFIG_FW_COMBO
subdir-ccflags-$(CONFIG_SUPPORT_WEXT_MODE) += -DCONFIG_SUPPORT_WEXT_MODE
subdir-ccflags-$(CONFIG_BL_USB_RX_BUF_2K) += -DBL_USB_RX_BUF_2K

subdir-ccflags-$(CONFIG_CFG_FILE_LOCATION_USER_DEFINE) += -DCFG_FILE_LOCATION_USER_DEFINE
subdir-ccflags-$(CONFIG_BL_INT_POLLING) += -DBL_INT_POLLING

subdir-ccflags-$(CONFIG_WPA3_SUPPORT) += -DBL_WPA3_COMPAT

# BT USB driver:
ifeq ($(CONFIG_WIFI_BT_USB_ONE_DRV),y)
export CONFIG_BL_BTUSB = y
export CONFIG_WIFI_BT_USB_ONE_DRV = y
endif
ifeq ($(CONFIG_BL_PCIE),y)
obj-m  += pcie/
endif
ifeq ($(CONFIG_BL_SDIO),y)
obj-m  += sdio/
endif
ifeq ($(CONFIG_BL_USB),y)
obj-m   += usb/
endif
#obj-$(CONFIG_BL_PCIE)  += pcie/
#obj-$(CONFIG_BL_SDIO)  += sdio/
#obj-$(CONFIG_BL_USB)   += usb/

ifeq ($(CONFIG_BL_BTUSB),y)
export CONFIG_BL_BTUSB = y
obj-m += btusb/
endif
KBUILD_CFLAGS += -w

all: modules

ARCH := arm
CROSS_COMPILE = arm-linux-gnueabihf-
#KERNELDIR = /lib/modules/`uname -r`/build
KERNELDIR = /home/kf2/share/gateway/linux/build

modules clean:
	@$(PWD)/mklink.sh
#	$(MAKE) -C $(KERNELDIR) O=$(KBUILDDIR) M=$(PWD) $@
	$(MAKE) -C $(KERNELDIR) O=$(KBUILDDIR) ARCH=$(ARCH) CROSS_COMPILE=$(CROSS_COMPILE) M=$(PWD) $@
	@$(PWD)/mklink.sh clean


  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51
  • 52
  • 53
  • 54
  • 55
  • 56
  • 57
  • 58
  • 59
  • 60
  • 61
  • 62
  • 63
  • 64
  • 65
  • 66
  • 67
  • 68
  • 69
  • 70
  • 71
  • 72
  • 73
  • 74
  • 75
  • 76
  • 77
  • 78
  • 79
  • 80
  • 81
  • 82
  • 83
  • 84
  • 85
  • 86
  • 87
  • 88
  • 89
  • 90
  • 91
  • 92
  • 93
  • 94
  • 95
  • 96
  • 97
  • 98
  • 99
  • 100
  • 101
  • 102
  • 103
  • 104
  • 105
  • 106
  • 107
  • 108
  • 109
  • 110
  • 111
  • 112
  • 113
  • 114
  • 115
  • 116
  • 117
  • 118
  • 119
  • 120
  • 121
  • 122
  • 123
  • 124
  • 125
  • 126
  • 127
  • 128
  • 129
  • 130
  • 131
  • 132
  • 133
  • 134
  • 135
  • 136
  • 137
  • 138
  • 139
  • 140
  • 141
  • 142
  • 143
  • 144
  • 145
  • 146
  • 147
  • 148
  • 149
  • 150
  • 151
  • 152

在这里插入图片描述

二、编译生成ko文件

  1. make
  2. 在sdio文件中生成ko文件
  3. 将ko驱动文件移植到arm中,insmod加载驱动

三、 根据官方提供的教程完成后续工具

依次输入以下命令完成配置:
1. insmod bl_sdio_drv.ko
2. rfkill unblock all
3. ./bf.sh
4. sudo udhcpc -i wlan0

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/小桥流水78/article/detail/808930
推荐阅读
相关标签
  

闽ICP备14008679号