1. 程式人生 > >WIFI驅動移植---編譯MT7601驅動

WIFI驅動移植---編譯MT7601驅動

1.修改Makefile

    1)新增平臺型別

   

    2)新增編譯工具等

ifeq ($(PLATFORM),3518E)
LINUX_SRC = /home/float/share/Hi3518E_SDK_V1.0.4.0/package/osdrv/opensource/kernel/linux-3.4.y
CROSS_COMPILE = /opt/hisi-linux/x86-arm/arm-hisiv300-linux/bin/arm-hisiv300-linux-uclibcgnueabi-
export ARCH = arm
endif

2、修改配置檔案

   vim os/linux/config.mk

    

4、編譯

    make ARCH=arm CHIPSET=7601U

    編譯過程中 報錯

/home/float/share/wifi/mt7601_JEDI_v1.9/os/linux/../../os/linux/cfg80211.c: In function ‘CFG80211_OpsScan’:
/home/float/share/wifi/mt7601_JEDI_v1.9/os/linux/../../os/linux/cfg80211.c:708:32: error: macro "RTMP_DRIVER_80211_SCAN" requires 2 arguments, but only 1 given
  if (RTMP_DRIVER_80211_SCAN(pAd) != NDIS_STATUS_SUCCESS) {
                                ^
/home/float/share/wifi/mt7601_JEDI_v1.9/os/linux/../../os/linux/cfg80211.c:708:6: error: ‘RTMP_DRIVER_80211_SCAN’ undeclared (first use in this function)
  if (RTMP_DRIVER_80211_SCAN(pAd) != NDIS_STATUS_SUCCESS) {
      ^
/home/float/share/wifi/mt7601_JEDI_v1.9/os/linux/../../os/linux/cfg80211.c:708:6: note: each undeclared identifier is reported only once for each function it appears in
scripts/Makefile.build:307: recipe for target '/home/float/share/wifi/mt7601_JEDI_v1.9/os/linux/../../os/linux/cfg80211.o' failed
make[2]: *** [/home/float/share/wifi/mt7601_JEDI_v1.9/os/linux/../../os/linux/cfg80211.o] Error 1
Makefile:1365: recipe for target '_module_/home/float/share/wifi/mt7601_JEDI_v1.9/os/linux' failed
make[1]: *** [_module_/home/float/share/wifi/mt7601_JEDI_v1.9/os/linux] Error 2

開啟檔案os/linux/cfg80211.c 修改


4.編譯完成 

    檢查