|
RS9113无线网卡驱动编译报错
发表于 2018-3-15 11:19:21
浏览:5300
|
回复:2
打印
只看该作者
[复制链接]
楼主
本帖最后由 gdzshjw1990 于 2018-3-15 11:19 编辑
在编译RS9113 onebox 驱动时报错。
编译平台 VM虚拟机,linux mint 18.3 64bit
目标平台 RK3399 ubuntu 16.04 内核版本4.4.77
驱动程序的Makefile已经设置了交叉编译工具链的路径和内核源码路径:
- CROSS_COMPILE := /home/kavi/firefly-rk3399/prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/bin/aarch64-linux-android-
- CC=$(CROSS_COMPILE)gcc
- #DEF_KERNEL_DIR := /lib/modules/$(shell uname -r)/build
- DEF_KERNEL_DIR := /home/kavi/firefly-rk3399/A3_Kubot_Firefly_RK3399_linux_kernel
复制代码 然后编译时会有以下报错:
- kavi-virtual-machine host # make
- -e Compiling Onebox Mobile Driver...
- make EXTRA_CFLAGS="-DWLAN_ENABLE -DONEBOX_DEBUG_ENABLE -DPROGRAMMING_BBP_TA -DPROGRAMMING_SCAN_TA -DRSI_SDIO_MULTI_BLOCK_SUPPORT -DLINUX -Wimplicit -Wstrict-prototypes -DFLASH_BURNING -DRSI_SDIO_MULTI_BLOCK_SUPPORT -DSDIO_COMMANDS -DDYNAMIC_VARIABLES -DRF_8111 -I/home/kavi/firefly-rk3399/RS9113.NBZ.NL.GENR.LNX.1.6.0/source/host/common_hal/include/linux/ -I/home/kavi/firefly-rk3399/RS9113.NBZ.NL.GENR.LNX.1.6.0/source/host/common_hal/include/common/ -DINET6 -Dnet80211_s -DBGSCAN_SUPPORT -DPWR_SAVE_SUPPORT -DACM_NO_TSPEC_CNFM -DBYPASS_TX_DATA_PATH -DBYPASS_RX_DATA_PATH -DIEEE80211_AMPDU_AGE -DSECURITY_SUPPORT -DAMPDU_AGGR_SUPPORT -DENABLE_P2P_SUPPORT -DRSI_CCX -DUSE_WORKQUEUES -DCHANNEL_UTILIZATION -DONEBOX_CONFIG_WOWLAN -I/home/kavi/firefly-rk3399/RS9113.NBZ.NL.GENR.LNX.1.6.0/source/host/wlan/net80211/linux/osd_linux/include/ -I/home/kavi/firefly-rk3399/RS9113.NBZ.NL.GENR.LNX.1.6.0/source/host/wlan/net80211/linux/osi_net80211/net80211/ -I/home/kavi/firefly-rk3399/RS9113.NBZ.NL.GENR.LNX.1.6.0/source/host/wlan/net80211/linux/osi_net80211/ -I/home/kavi/firefly-rk3399/RS9113.NBZ.NL.GENR.LNX.1.6.0/source/host/wlan/wlan_hal/include/linux -DUSE_BLUEZ_BT_STACK -I/home/kavi/firefly-rk3399/RS9113.NBZ.NL.GENR.LNX.1.6.0/source/host/bt/include/linux -I/home/kavi/firefly-rk3399/RS9113.NBZ.NL.GENR.LNX.1.6.0/source/host/zigbee/include/linux -g -DUSE_USB_INTF" -C /home/kavi/firefly-rk3399/A3_Kubot_Firefly_RK3399_linux_kernel SUBDIRS=/home/kavi/firefly-rk3399/RS9113.NBZ.NL.GENR.LNX.1.6.0/source/host modules
- make[1]: Entering directory '/home/kavi/firefly-rk3399/A3_Kubot_Firefly_RK3399_linux_kernel'
- CC [M] /home/kavi/firefly-rk3399/RS9113.NBZ.NL.GENR.LNX.1.6.0/source/host/wlan/wlan_hal/osi_wlan/devdep/rsi_9113/onebox_wlan_osi_init.o
- In file included from include/linux/pagemap.h:10:0,
- from include/linux/blkdev.h:14,
- from include/linux/mmc/host.h:19,
- from /home/kavi/firefly-rk3399/RS9113.NBZ.NL.GENR.LNX.1.6.0/source/host/common_hal/include/common/onebox_sdio_intf.h:50,
- from /home/kavi/firefly-rk3399/RS9113.NBZ.NL.GENR.LNX.1.6.0/source/host/wlan/wlan_hal/include/linux/wlan_common.h:1008,
- from /home/kavi/firefly-rk3399/RS9113.NBZ.NL.GENR.LNX.1.6.0/source/host/wlan/wlan_hal/osi_wlan/devdep/rsi_9113/onebox_wlan_osi_init.c:34:
- include/linux/highmem.h: In function 'kmap_to_page':
- include/linux/highmem.h:50:1: error: macro "ALIGN" passed 2 arguments, but takes just 1
- return virt_to_page(addr);
- ^
- In file included from include/linux/mm.h:66:0,
- from include/linux/scatterlist.h:7,
- from include/linux/dmaengine.h:24,
- from include/linux/netdevice.h:38,
- from /home/kavi/firefly-rk3399/RS9113.NBZ.NL.GENR.LNX.1.6.0/source/host/wlan/wlan_hal/include/linux/wlan_common.h:34,
- from /home/kavi/firefly-rk3399/RS9113.NBZ.NL.GENR.LNX.1.6.0/source/host/wlan/wlan_hal/osi_wlan/devdep/rsi_9113/onebox_wlan_osi_init.c:34:
- ./arch/arm64/include/asm/pgtable.h:43:23: error: 'ALIGN' undeclared (first use in this function)
- #define VMEMMAP_SIZE ALIGN((1UL << (VA_BITS - PAGE_SHIFT)) * sizeof(struct page), PUD_SIZE)
- ^
- ./arch/arm64/include/asm/pgtable.h:46:48: note: in expansion of macro 'VMEMMAP_SIZE'
- #define VMALLOC_END (PAGE_OFFSET - PUD_SIZE - VMEMMAP_SIZE - SZ_64K)
- ^
- ./arch/arm64/include/asm/pgtable.h:48:25: note: in expansion of macro 'VMALLOC_END'
- #define VMEMMAP_START (VMALLOC_END + SZ_64K)
- ^
- ./arch/arm64/include/asm/pgtable.h:49:35: note: in expansion of macro 'VMEMMAP_START'
- #define vmemmap ((struct page *)VMEMMAP_START - \
- ^
- include/asm-generic/memory_model.h:53:29: note: in expansion of macro 'vmemmap'
- #define __pfn_to_page(pfn) (vmemmap + (pfn))
- ^
- include/asm-generic/memory_model.h:81:21: note: in expansion of macro '__pfn_to_page'
- #define pfn_to_page __pfn_to_page
- ^
- ./arch/arm64/include/asm/memory.h:198:29: note: in expansion of macro 'pfn_to_page'
- #define virt_to_page(kaddr) pfn_to_page(__pa(kaddr) >> PAGE_SHIFT)
- ^
- include/linux/highmem.h:50:9: note: in expansion of macro 'virt_to_page'
- return virt_to_page(addr);
- ^
- ./arch/arm64/include/asm/pgtable.h:43:23: note: each undeclared identifier is reported only once for each function it appears in
- #define VMEMMAP_SIZE ALIGN((1UL << (VA_BITS - PAGE_SHIFT)) * sizeof(struct page), PUD_SIZE)
- ^
- ./arch/arm64/include/asm/pgtable.h:46:48: note: in expansion of macro 'VMEMMAP_SIZE'
- #define VMALLOC_END (PAGE_OFFSET - PUD_SIZE - VMEMMAP_SIZE - SZ_64K)
- ^
- ./arch/arm64/include/asm/pgtable.h:48:25: note: in expansion of macro 'VMALLOC_END'
- #define VMEMMAP_START (VMALLOC_END + SZ_64K)
- ^
- ./arch/arm64/include/asm/pgtable.h:49:35: note: in expansion of macro 'VMEMMAP_START'
- #define vmemmap ((struct page *)VMEMMAP_START - \
- ^
- include/asm-generic/memory_model.h:53:29: note: in expansion of macro 'vmemmap'
- #define __pfn_to_page(pfn) (vmemmap + (pfn))
- ^
- include/asm-generic/memory_model.h:81:21: note: in expansion of macro '__pfn_to_page'
- #define pfn_to_page __pfn_to_page
- ^
- ./arch/arm64/include/asm/memory.h:198:29: note: in expansion of macro 'pfn_to_page'
- #define virt_to_page(kaddr) pfn_to_page(__pa(kaddr) >> PAGE_SHIFT)
- ^
- include/linux/highmem.h:50:9: note: in expansion of macro 'virt_to_page'
- return virt_to_page(addr);
- ^
- scripts/Makefile.build:258: recipe for target '/home/kavi/firefly-rk3399/RS9113.NBZ.NL.GENR.LNX.1.6.0/source/host/wlan/wlan_hal/osi_wlan/devdep/rsi_9113/onebox_wlan_osi_init.o' failed
- make[2]: *** [/home/kavi/firefly-rk3399/RS9113.NBZ.NL.GENR.LNX.1.6.0/source/host/wlan/wlan_hal/osi_wlan/devdep/rsi_9113/onebox_wlan_osi_init.o] Error 1
- Makefile:1424: recipe for target '_module_/home/kavi/firefly-rk3399/RS9113.NBZ.NL.GENR.LNX.1.6.0/source/host' failed
- make[1]: *** [_module_/home/kavi/firefly-rk3399/RS9113.NBZ.NL.GENR.LNX.1.6.0/source/host] Error 2
- make[1]: Leaving directory '/home/kavi/firefly-rk3399/A3_Kubot_Firefly_RK3399_linux_kernel'
- Makefile:382: recipe for target 'compile_driver' failed
- make: *** [compile_driver] Error 2
复制代码 与RS9113原厂沟通,他们的回复是我们要编译linux系统为什么要用android的工具链,他们觉得这个问题是内核和这套工具链不兼容。
|
|