TP-Link TL-WN722N V2 driver compilation for imx6 kernel

This thread has been locked for further replies. You can start a new thread to share your ideas or ask questions.
This thread has been locked for further replies. You can start a new thread to share your ideas or ask questions.
TP-Link TL-WN722N V2 driver compilation for imx6 kernel
TP-Link TL-WN722N V2 driver compilation for imx6 kernel
2021-12-02 07:14:28
Model: TL-WN722N  
Hardware Version: V2
Firmware Version:

Hi,

 

We downloaded the driver file from https://static.tp-link.com/2018/201805/20180521/TP-Link_Driver_Linux_series7_beta.zip 

We want to cross compile the driver for our device using our cross compiler toolchain "arm-fslc-linux-gnueabi-".

 

So, first I downloaded the kernel source code for version "4.14.78" from github.

Then I was able to compile the kernel source code using our cross compiler tool chain "arm-fslc-linux-gnueabi-"

 

I used the installation guide for reference. There was no entry for IMX6 device configuration in the “Makefile”.

So I decided to add the below configuration in the "Makefile".

 

CONFIG_PLATFORM_I386_PC = n
CONFIG_PLATFORM_ARM_IMX6 = y

 

 

 

ifeq ($(CONFIG_PLATFORM_ARM_IMX6), y)

EXTRA_CFLAGS += -Wall

ARCH := arm

CROSS_COMPILE := /opt/fslc-framebuffer/2.6.2/sysroots/x86_64-fslcsdk-linux/usr/bin/arm-fslc-linux-gnueabi/arm-fslc-linux-gnueabi-

KVER  := 4.14.78

KSRC ?= /home/ubuntu/WORK/IP7/wifi-adapters/kernel-source/src/linux-4.14.78/

Endif

 

But when I used the "make clean" and "make" command, I get a lot of compilation errors mentioned below.

 

ubuntu@ubuntu1:~/WORK/IP7/wifi-adapters/TP-Link_Driver_Linux_series7_beta/rtl8188EUS_linux_v5.2.2.4_25483.20171222$ make
make ARCH=arm CROSS_COMPILE=/opt/fslc-framebuffer/2.6.2/sysroots/x86_64-fslcsdk-linux/usr/bin/arm-fslc-linux-gnueabi/arm-fslc-linux-gnueabi- -C /home/ubuntu/WORK/IP7/wifi-adapters/kernel-source/src/linux-4.14.78/  M=/home/ubuntu/WORK/IP7/wifi-adapters/TP-Link_Driver_Linux_series7_beta/rtl8188EUS_linux_v5.2.2.4_25483.20171222  modules
make[1]: Entering directory '/home/ubuntu/WORK/IP7/wifi-adapters/kernel-source/src/linux-4.14.78'

  WARNING: Symbol version dump ./Module.symvers
           is missing; modules will have no dependencies and modversions.

  CC [M]  /home/ubuntu/WORK/IP7/wifi-adapters/TP-Link_Driver_Linux_series7_beta/rtl8188EUS_linux_v5.2.2.4_25483.20171222/core/rtw_cmd.o
In file included from /home/ubuntu/WORK/IP7/wifi-adapters/TP-Link_Driver_Linux_series7_beta/rtl8188EUS_linux_v5.2.2.4_25483.20171222/include/drv_types.h:32,
                 from /home/ubuntu/WORK/IP7/wifi-adapters/TP-Link_Driver_Linux_series7_beta/rtl8188EUS_linux_v5.2.2.4_25483.20171222/core/rtw_cmd.c:22:
/home/ubuntu/WORK/IP7/wifi-adapters/TP-Link_Driver_Linux_series7_beta/rtl8188EUS_linux_v5.2.2.4_25483.20171222/include/osdep_service.h: In function 'thread_enter':
/home/ubuntu/WORK/IP7/wifi-adapters/TP-Link_Driver_Linux_series7_beta/rtl8188EUS_linux_v5.2.2.4_25483.20171222/include/osdep_service.h:374:2: error: implicit declaration of function 'allow_signal'; did you mean 'alloc_secdata'? [-Werror=implicit-function-declaration]
  allow_signal(SIGTERM);
  ^~~~~~~~~~~~
  alloc_secdata
/home/ubuntu/WORK/IP7/wifi-adapters/TP-Link_Driver_Linux_series7_beta/rtl8188EUS_linux_v5.2.2.4_25483.20171222/include/osdep_service.h: In function 'flush_signals_thread':
/home/ubuntu/WORK/IP7/wifi-adapters/TP-Link_Driver_Linux_series7_beta/rtl8188EUS_linux_v5.2.2.4_25483.20171222/include/osdep_service.h:384:6: error: implicit declaration of function 'signal_pending'; did you mean 'timer_pending'? [-Werror=implicit-function-declaration]
  if (signal_pending(current))
      ^~~~~~~~~~~~~~
      timer_pending
/home/ubuntu/WORK/IP7/wifi-adapters/TP-Link_Driver_Linux_series7_beta/rtl8188EUS_linux_v5.2.2.4_25483.20171222/include/osdep_service.h:385:3: error: implicit declaration of function 'flush_signals'; did you mean 'flush_bp_all'? [-Werror=implicit-function-declaration]
   flush_signals(current);
   ^~~~~~~~~~~~~
   flush_bp_all
In file included from /home/ubuntu/WORK/IP7/wifi-adapters/TP-Link_Driver_Linux_series7_beta/rtl8188EUS_linux_v5.2.2.4_25483.20171222/include/drv_types.h:33,
                 from /home/ubuntu/WORK/IP7/wifi-adapters/TP-Link_Driver_Linux_series7_beta/rtl8188EUS_linux_v5.2.2.4_25483.20171222/core/rtw_cmd.c:22:
/home/ubuntu/WORK/IP7/wifi-adapters/TP-Link_Driver_Linux_series7_beta/rtl8188EUS_linux_v5.2.2.4_25483.20171222/include/rtw_byteorder.h: At top level:
/home/ubuntu/WORK/IP7/wifi-adapters/TP-Link_Driver_Linux_series7_beta/rtl8188EUS_linux_v5.2.2.4_25483.20171222/include/rtw_byteorder.h:35:5: error: #error "Must be LITTLE/BIG Endian Host"
  #  error "Must be LITTLE/BIG Endian Host"
     ^~~~~
In file included from /home/ubuntu/WORK/IP7/wifi-adapters/TP-Link_Driver_Linux_series7_beta/rtl8188EUS_linux_v5.2.2.4_25483.20171222/include/drv_types.h:112,
                 from /home/ubuntu/WORK/IP7/wifi-adapters/TP-Link_Driver_Linux_series7_beta/rtl8188EUS_linux_v5.2.2.4_25483.20171222/core/rtw_cmd.c:22:
/home/ubuntu/WORK/IP7/wifi-adapters/TP-Link_Driver_Linux_series7_beta/rtl8188EUS_linux_v5.2.2.4_25483.20171222/include/rtw_mlme_ext.h:1201:4: error: #error "Must be LITTLE or BIG Endian"
 #  error "Must be LITTLE or BIG Endian"
    ^~~~~
In file included from /home/ubuntu/WORK/IP7/wifi-adapters/TP-Link_Driver_Linux_series7_beta/rtl8188EUS_linux_v5.2.2.4_25483.20171222/include/../hal/phydm/phydm_precomp.h:64,
                 from /home/ubuntu/WORK/IP7/wifi-adapters/TP-Link_Driver_Linux_series7_beta/rtl8188EUS_linux_v5.2.2.4_25483.20171222/include/hal_data.h:25,
                 from /home/ubuntu/WORK/IP7/wifi-adapters/TP-Link_Driver_Linux_series7_beta/rtl8188EUS_linux_v5.2.2.4_25483.20171222/core/rtw_cmd.c:23:
/home/ubuntu/WORK/IP7/wifi-adapters/TP-Link_Driver_Linux_series7_beta/rtl8188EUS_linux_v5.2.2.4_25483.20171222/include/../hal/phydm/phydm_hwconfig.h:54:6: warning: "ODM_ENDIAN_TYPE" is not defined, evaluates to 0 [-Wundef]
 #if (ODM_ENDIAN_TYPE == ODM_ENDIAN_LITTLE)
      ^~~~~~~~~~~~~~~
/home/ubuntu/WORK/IP7/wifi-adapters/TP-Link_Driver_Linux_series7_beta/rtl8188EUS_linux_v5.2.2.4_25483.20171222/include/../hal/phydm/phydm_hwconfig.h:80:6: warning: "ODM_ENDIAN_TYPE" is not defined, evaluates to 0 [-Wundef]
 #if (ODM_ENDIAN_TYPE == ODM_ENDIAN_LITTLE)
      ^~~~~~~~~~~~~~~
/home/ubuntu/WORK/IP7/wifi-adapters/TP-Link_Driver_Linux_series7_beta/rtl8188EUS_linux_v5.2.2.4_25483.20171222/include/../hal/phydm/phydm_hwconfig.h:104:6: warning: "ODM_ENDIAN_TYPE" is not defined, evaluates to 0 [-Wundef]
 #if (ODM_ENDIAN_TYPE == ODM_ENDIAN_LITTLE)
      ^~~~~~~~~~~~~~~
/home/ubuntu/WORK/IP7/wifi-adapters/TP-Link_Driver_Linux_series7_beta/rtl8188EUS_linux_v5.2.2.4_25483.20171222/include/../hal/phydm/phydm_hwconfig.h:117:6: warning: "ODM_ENDIAN_TYPE" is not defined, evaluates to 0 [-Wundef]
 #if (ODM_ENDIAN_TYPE == ODM_ENDIAN_LITTLE)
      ^~~~~~~~~~~~~~~
/home/ubuntu/WORK/IP7/wifi-adapters/TP-Link_Driver_Linux_series7_beta/rtl8188EUS_linux_v5.2.2.4_25483.20171222/include/../hal/phydm/phydm_hwconfig.h:129:6: warning: "ODM_ENDIAN_TYPE" is not defined, evaluates to 0 [-Wundef]
 #if (ODM_ENDIAN_TYPE == ODM_ENDIAN_LITTLE)
      ^~~~~~~~~~~~~~~
/home/ubuntu/WORK/IP7/wifi-adapters/TP-Link_Driver_Linux_series7_beta/rtl8188EUS_linux_v5.2.2.4_25483.20171222/include/../hal/phydm/phydm_hwconfig.h:148:6: warning: "ODM_ENDIAN_TYPE" is not defined, evaluates to 0 [-Wundef]
 #if (ODM_ENDIAN_TYPE == ODM_ENDIAN_LITTLE)
      ^~~~~~~~~~~~~~~
/home/ubuntu/WORK/IP7/wifi-adapters/TP-Link_Driver_Linux_series7_beta/rtl8188EUS_linux_v5.2.2.4_25483.20171222/include/../hal/phydm/phydm_hwconfig.h:165:6: warning: "ODM_ENDIAN_TYPE" is not defined, evaluates to 0 [-Wundef]
 #if (ODM_ENDIAN_TYPE == ODM_ENDIAN_LITTLE)
      ^~~~~~~~~~~~~~~
/home/ubuntu/WORK/IP7/wifi-adapters/TP-Link_Driver_Linux_series7_beta/rtl8188EUS_linux_v5.2.2.4_25483.20171222/include/../hal/phydm/phydm_hwconfig.h:176:6: warning: "ODM_ENDIAN_TYPE" is not defined, evaluates to 0 [-Wundef]
 #if (ODM_ENDIAN_TYPE == ODM_ENDIAN_LITTLE)
      ^~~~~~~~~~~~~~~
In file included from /home/ubuntu/WORK/IP7/wifi-adapters/TP-Link_Driver_Linux_series7_beta/rtl8188EUS_linux_v5.2.2.4_25483.20171222/include/drv_types.h:80,
                 from /home/ubuntu/WORK/IP7/wifi-adapters/TP-Link_Driver_Linux_series7_beta/rtl8188EUS_linux_v5.2.2.4_25483.20171222/core/rtw_cmd.c:22:
/home/ubuntu/WORK/IP7/wifi-adapters/TP-Link_Driver_Linux_series7_beta/rtl8188EUS_linux_v5.2.2.4_25483.20171222/core/rtw_cmd.c: In function 'rtw_cmd_filter':
/home/ubuntu/WORK/IP7/wifi-adapters/TP-Link_Driver_Linux_series7_beta/rtl8188EUS_linux_v5.2.2.4_25483.20171222/include/rtw_cmd.h:1317:196: error: 'struct C2HEvent_Header' has no member named 'ID'
 ct drvextra_cmd_parm *)(cmd)->parmbuf)->ec_id : ((cmd)->cmdcode == GEN_CMD_CODE(_Set_MLME_EVT) ? ((struct C2HEvent_Header *)(cmd)->parmbuf)->ID : 0), \
                                                                                                                                            ^~

/home/ubuntu/WORK/IP7/wifi-adapters/TP-Link_Driver_Linux_series7_beta/rtl8188EUS_linux_v5.2.2.4_25483.20171222/include/rtw_debug.h:137:34: note: in expansion of macro 'CMD_ARG'
    _dbgdump(DRIVER_PREFIX fmt, ##arg);\
                                  ^~~
/home/ubuntu/WORK/IP7/wifi-adapters/TP-Link_Driver_Linux_series7_beta/rtl8188EUS_linux_v5.2.2.4_25483.20171222/core/rtw_cmd.c:439:4: note: in expansion of macro 'RTW_INFO'
    RTW_INFO(ADPT_FMT" drop "CMD_FMT" hw_init_completed:%u, cmdthd_running:%u\n", ADPT_ARG(cmd_obj->padapter)
    ^~~~~~~~
/home/ubuntu/WORK/IP7/wifi-adapters/TP-Link_Driver_Linux_series7_beta/rtl8188EUS_linux_v5.2.2.4_25483.20171222/core/rtw_cmd.c: In function 'rtw_cmd_thread':
/home/ubuntu/WORK/IP7/wifi-adapters/TP-Link_Driver_Linux_series7_beta/rtl8188EUS_linux_v5.2.2.4_25483.20171222/include/rtw_cmd.h:1317:196: error: 'struct C2HEvent_Header' has no member named 'ID'
 ct drvextra_cmd_parm *)(cmd)->parmbuf)->ec_id : ((cmd)->cmdcode == GEN_CMD_CODE(_Set_MLME_EVT) ? ((struct C2HEvent_Header *)(cmd)->parmbuf)->ID : 0), \
                                                                                                                                            ^~

/home/ubuntu/WORK/IP7/wifi-adapters/TP-Link_Driver_Linux_series7_beta/rtl8188EUS_linux_v5.2.2.4_25483.20171222/include/rtw_debug.h:137:34: note: in expansion of macro 'CMD_ARG'
    _dbgdump(DRIVER_PREFIX fmt, ##arg);\
                                  ^~~
/home/ubuntu/WORK/IP7/wifi-adapters/TP-Link_Driver_Linux_series7_beta/rtl8188EUS_linux_v5.2.2.4_25483.20171222/core/rtw_cmd.c:670:4: note: in expansion of macro 'RTW_INFO'
    RTW_INFO(ADPT_FMT" "CMD_FMT" %sexecute\n", ADPT_ARG(pcmd->padapter), CMD_ARG(pcmd)
    ^~~~~~~~
/home/ubuntu/WORK/IP7/wifi-adapters/TP-Link_Driver_Linux_series7_beta/rtl8188EUS_linux_v5.2.2.4_25483.20171222/include/rtw_cmd.h:1317:196: error: 'struct C2HEvent_Header' has no member named 'ID'
 ct drvextra_cmd_parm *)(cmd)->parmbuf)->ec_id : ((cmd)->cmdcode == GEN_CMD_CODE(_Set_MLME_EVT) ? ((struct C2HEvent_Header *)(cmd)->parmbuf)->ID : 0), \
                                                                                                                                            ^~

/home/ubuntu/WORK/IP7/wifi-adapters/TP-Link_Driver_Linux_series7_beta/rtl8188EUS_linux_v5.2.2.4_25483.20171222/include/rtw_debug.h:137:34: note: in expansion of macro 'CMD_ARG'
    _dbgdump(DRIVER_PREFIX fmt, ##arg);\
                                  ^~~
/home/ubuntu/WORK/IP7/wifi-adapters/TP-Link_Driver_Linux_series7_beta/rtl8188EUS_linux_v5.2.2.4_25483.20171222/core/rtw_cmd.c:695:4: note: in expansion of macro 'RTW_INFO'
    RTW_INFO(ADPT_FMT" "CMD_FMT" process_time=%d\n", ADPT_ARG(pcmd->padapter), CMD_ARG(pcmd), cmd_process_time);
    ^~~~~~~~
/home/ubuntu/WORK/IP7/wifi-adapters/TP-Link_Driver_Linux_series7_beta/rtl8188EUS_linux_v5.2.2.4_25483.20171222/include/rtw_cmd.h:1317:196: error: 'struct C2HEvent_Header' has no member named 'ID'
 ct drvextra_cmd_parm *)(cmd)->parmbuf)->ec_id : ((cmd)->cmdcode == GEN_CMD_CODE(_Set_MLME_EVT) ? ((struct C2HEvent_Header *)(cmd)->parmbuf)->ID : 0), \
                                                                                                                                            ^~

/home/ubuntu/WORK/IP7/wifi-adapters/TP-Link_Driver_Linux_series7_beta/rtl8188EUS_linux_v5.2.2.4_25483.20171222/include/rtw_debug.h:137:34: note: in expansion of macro 'CMD_ARG'
    _dbgdump(DRIVER_PREFIX fmt, ##arg);\
                                  ^~~
/home/ubuntu/WORK/IP7/wifi-adapters/TP-Link_Driver_Linux_series7_beta/rtl8188EUS_linux_v5.2.2.4_25483.20171222/core/rtw_cmd.c:733:4: note: in expansion of macro 'RTW_INFO'
    RTW_INFO("%s: leaving... drop "CMD_FMT"\n", __func__, CMD_ARG(pcmd));
    ^~~~~~~~
cc1: some warnings being treated as errors
scripts/Makefile.build:328: recipe for target '/home/ubuntu/WORK/IP7/wifi-adapters/TP-Link_Driver_Linux_series7_beta/rtl8188EUS_linux_v5.2.2.4_25483.20171222/core/rtw_cmd.o' failed
make[2]: *** [/home/ubuntu/WORK/IP7/wifi-adapters/TP-Link_Driver_Linux_series7_beta/rtl8188EUS_linux_v5.2.2.4_25483.20171222/core/rtw_cmd.o] Error 1
Makefile:1527: recipe for target '_module_/home/ubuntu/WORK/IP7/wifi-adapters/TP-Link_Driver_Linux_series7_beta/rtl8188EUS_linux_v5.2.2.4_25483.20171222' failed
make[1]: *** [_module_/home/ubuntu/WORK/IP7/wifi-adapters/TP-Link_Driver_Linux_series7_beta/rtl8188EUS_linux_v5.2.2.4_25483.20171222] Error 2
make[1]: Leaving directory '/home/ubuntu/WORK/IP7/wifi-adapters/kernel-source/src/linux-4.14.78'
Makefile:1921: recipe for target 'modules' failed
make: *** [modules] Error 2

 

 

Please let me know how to resolve these errors and cross compile the driver code.

 

 

  0      
  0      
#1
Options