AnsweredAssumed Answered

RTL8192cu in imx6qp android 6.0.1 kernel 4.1.15

Question asked by Jaffin MK on Oct 21, 2016
Latest reply on Jun 19, 2017 by 佳杰 吴

Hi all

 

Im trying to port RTL8192CU driver to imx6qp sabre board running on android 6.0.1 kernel 4.1.15.

 

Please advise the steps to be taken.

 

I am trying to compile the aosp and kernel with rtl8192cu as a module. I edited the imx_v7_android_defconfig file to include

CONFIG_WLAN=y

CONFIG_CFG80211=m

CONFIG_MAC80211_MESH=y
CONFIG_MAC80211=y

CONFIG_HOSTAP=y
CONFIG_RTL8192CU=m
CONFIG_RTLWIFI=y
CONFIG_RTL8192C_COMMON=y
CONFIG_USB_USBNET=y
CONFIG_NET_RADIO=y

 

But when I try to 'make imx_v7_android_defconfig', the defconfig file doesnt get copied to .config file.

CONFIG_RTL8192CU=m
CONFIG_RTLWIFI=y
CONFIG_RTL8192C_COMMON=y

are missing from the .config file. So the module doesnt get built with the 'make'.

 

Is there some other file I need to modify to build the module?

 

But I did make menuconfig and selected the required options and the module got compiled when I built the kernel separately. But again when I build the aosp with make, the kernel config again reverts back and starts building and gives this error.

 

arch/arm/configs/imx_v7_android_defconfig:148:warning: override: reassigning to symbol NF_NAT_IPV4
arch/arm/configs/imx_v7_android_defconfig:167:warning: override: reassigning to symbol NF_NAT_IPV6
arch/arm/configs/imx_v7_android_defconfig:348:warning: override: reassigning to symbol SENSORS_FXOS8700
arch/arm/configs/imx_v7_android_defconfig:349:warning: override: reassigning to symbol SENSORS_FXAS2100X
arch/arm/configs/imx_v7_android_defconfig:350:warning: override: reassigning to symbol INPUT_MPL3115
arch/arm/configs/imx_v7_android_defconfig:688:warning: override: reassigning to symbol CFG80211
arch/arm/configs/imx_v7_android_defconfig:691:warning: override: reassigning to symbol MAC80211
arch/arm/configs/imx_v7_android_defconfig:698:warning: override: reassigning to symbol USB_USBNET
#
# configuration written to .config
#
make[1]: Leaving directory `/home/jcxmej/Desktop/Tevatron/imx6.0.1/kernel_imx'
install -D kernel_imx/.config out/target/product/sabresd_6dq/.config
make -C kernel_imx -j4 uImage modules ARCH=arm CROSS_COMPILE=`pwd`/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.9/bin/arm-linux-androideabi- LOADADDR=0x10008000 KCFLAGS=-mno-android
make[1]: Entering directory `/home/jcxmej/Desktop/Tevatron/imx6.0.1/kernel_imx'
scripts/kconfig/conf  --silentoldconfig Kconfig
make[1]: Leaving directory `/home/jcxmej/Desktop/Tevatron/imx6.0.1/kernel_imx'
make[1]: Entering directory `/home/jcxmej/Desktop/Tevatron/imx6.0.1/kernel_imx'
  CHK     include/config/kernel.release
  CHK     include/generated/uapi/linux/version.h
  CHK     include/generated/utsrelease.h
make[2]: `include/generated/mach-types.h' is up to date.
  CHK     include/generated/bounds.h
  CHK     include/generated/asm-offsets.h
  CALL    scripts/checksyscalls.sh
  CHK     include/generated/compile.h
  LINK    vmlinux
  LD      vmlinux.o
  MODPOST vmlinux.o
WARNING: modpost: Found 4 section mismatch(es).
To see full details build your kernel with:
'make CONFIG_DEBUG_SECTION_MISMATCH=y'
  GEN     .version
  CHK     include/generated/compile.h
  UPD     include/generated/compile.h
  CC      init/version.o
  LD      init/built-in.o
/home/jcxmej/Desktop/Tevatron/imx6.0.1/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.9/bin/arm-linux-androideabi-ld: warning: unwinding may not work because EXIDX input section 8 of arch/arm/crypto/built-in.o is not in EXIDX output section
/home/jcxmej/Desktop/Tevatron/imx6.0.1/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.9/bin/arm-linux-androideabi-ld: warning: unwinding may not work because EXIDX input section 18 of arch/arm/mach-imx/built-in.o is not in EXIDX output section
/home/jcxmej/Desktop/Tevatron/imx6.0.1/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.9/bin/arm-linux-androideabi-ld: warning: unwinding may not work because EXIDX input section 311 of mm/built-in.o is not in EXIDX output section
/home/jcxmej/Desktop/Tevatron/imx6.0.1/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.9/bin/arm-linux-androideabi-ld: warning: unwinding may not work because EXIDX input section 556 of fs/built-in.o is not in EXIDX output section
/home/jcxmej/Desktop/Tevatron/imx6.0.1/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.9/bin/arm-linux-androideabi-ld: warning: unwinding may not work because EXIDX input section 31 of crypto/built-in.o is not in EXIDX output section
/home/jcxmej/Desktop/Tevatron/imx6.0.1/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.9/bin/arm-linux-androideabi-ld: warning: unwinding may not work because EXIDX input section 286 of block/built-in.o is not in EXIDX output section
/home/jcxmej/Desktop/Tevatron/imx6.0.1/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.9/bin/arm-linux-androideabi-ld: warning: unwinding may not work because EXIDX input section 243 of lib/built-in.o is not in EXIDX output section
/home/jcxmej/Desktop/Tevatron/imx6.0.1/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.9/bin/arm-linux-androideabi-ld: warning: unwinding may not work because EXIDX input section 26 of drivers/built-in.o is not in EXIDX output section
/home/jcxmej/Desktop/Tevatron/imx6.0.1/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.9/bin/arm-linux-androideabi-ld: warning: unwinding may not work because EXIDX input section 6 of sound/built-in.o is not in EXIDX output section
/home/jcxmej/Desktop/Tevatron/imx6.0.1/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.9/bin/arm-linux-androideabi-ld: warning: unwinding may not work because EXIDX input section 524 of net/built-in.o is not in EXIDX output section
drivers/built-in.o:wl_cfg80211.c:function wl_cfg80211_disconnect: error: undefined reference to 'cfg80211_disconnected'
drivers/built-in.o:wl_cfg80211.c:function wl_cfg80211_disconnect: error: undefined reference to 'cfg80211_disconnected'
drivers/built-in.o:wl_cfg80211.c:function wl_cfg80211_connect: error: undefined reference to 'ieee80211_frequency_to_channel'
drivers/built-in.o:wl_cfg80211.c:function wl_cfg80211_connect: error: undefined reference to 'ieee80211_frequency_to_channel'
drivers/built-in.o:wl_cfg80211.c:function wl_notify_pfn_status: error: undefined reference to 'cfg80211_disconnected'
drivers/built-in.o:wl_cfg80211.c:function wl_tdls_event_handler: error: undefined reference to 'cfg80211_rx_mgmt'
drivers/built-in.o:wl_cfg80211.c:function wl_notify_mic_status: error: undefined reference to 'cfg80211_michael_mic_failure'
drivers/built-in.o:wl_cfg80211.c:function wl_free_wdev: error: undefined reference to 'wiphy_unregister'
drivers/built-in.o:wl_cfg80211.c:function wl_free_wdev: error: undefined reference to 'wiphy_free'
drivers/built-in.o:wl_cfg80211.c:function wl_run_escan.constprop.17: error: undefined reference to 'ieee80211_frequency_to_channel'
drivers/built-in.o:wl_cfg80211.c:function wl_run_escan.constprop.17: error: undefined reference to 'ieee80211_frequency_to_channel'
drivers/built-in.o:wl_cfg80211.c:function wl_inform_single_bss: error: undefined reference to 'cfg80211_find_ie'
drivers/built-in.o:wl_cfg80211.c:function wl_inform_single_bss: error: undefined reference to 'ieee80211_channel_to_frequency'
drivers/built-in.o:wl_cfg80211.c:function wl_inform_single_bss: error: undefined reference to '__ieee80211_get_channel'
drivers/built-in.o:wl_cfg80211.c:function wl_inform_single_bss: error: undefined reference to 'cfg80211_inform_bss_width_frame'
drivers/built-in.o:wl_cfg80211.c:function wl_inform_single_bss: error: undefined reference to 'cfg80211_put_bss'
drivers/built-in.o:wl_cfg80211.c:function wl_update_bss_info: error: undefined reference to 'cfg80211_get_bss'
drivers/built-in.o:wl_cfg80211.c:function wl_update_bss_info: error: undefined reference to 'cfg80211_put_bss'
drivers/built-in.o:wl_cfg80211.c:function wl_notify_escan_complete: error: undefined reference to 'cfg80211_scan_done'
drivers/built-in.o:wl_cfg80211.c:function wl_cfg80211_mgmt_tx: error: undefined reference to 'cfg80211_mgmt_tx_status'
drivers/built-in.o:wl_cfg80211.c:function wl_cfg80211_mgmt_tx: error: undefined reference to 'cfg80211_mgmt_tx_status'
drivers/built-in.o:wl_cfg80211.c:function wl_cfg80211_mgmt_tx: error: undefined reference to 'cfg80211_mgmt_tx_status'
drivers/built-in.o:wl_cfg80211.c:function wl_bss_connect_done: error: undefined reference to 'cfg80211_connect_result'
drivers/built-in.o:wl_cfg80211.c:function wl_bss_connect_done: error: undefined reference to 'cfg80211_connect_result'
drivers/built-in.o:wl_cfg80211.c:function wl_cfg80211_join_ibss: error: undefined reference to 'cfg80211_get_bss'
drivers/built-in.o:binder.c:function wl_cfg80211_attach: error: undefined reference to 'wiphy_new_nm'
drivers/built-in.o:binder.c:function wl_cfg80211_attach: error: undefined reference to 'wiphy_apply_custom_regulatory'
drivers/built-in.o:binder.c:function wl_cfg80211_attach: error: undefined reference to 'wiphy_register'
drivers/built-in.o:binder.c:function wl_cfg80211_attach: error: undefined reference to 'wiphy_free'
drivers/built-in.o:wl_cfg80211.c:function wl_notify_roaming_status: error: undefined reference to 'ieee80211_channel_to_frequency'
drivers/built-in.o:wl_cfg80211.c:function wl_notify_roaming_status: error: undefined reference to '__ieee80211_get_channel'
drivers/built-in.o:wl_cfg80211.c:function wl_notify_roaming_status: error: undefined reference to 'cfg80211_roamed'
drivers/built-in.o:wl_cfg80211.c:function wl_cfg80211_get_station: error: undefined reference to 'cfg80211_disconnected'
drivers/built-in.o:wl_cfg80211.c:function wl_notify_connect_status_ap: error: undefined reference to 'cfg80211_new_sta'
drivers/built-in.o:wl_cfg80211.c:function wl_notify_connect_status_ap: error: undefined reference to 'cfg80211_del_sta_sinfo'
drivers/built-in.o:wl_cfg80211.c:function wl_notify_connect_status: error: undefined reference to 'ieee80211_channel_to_frequency'
drivers/built-in.o:wl_cfg80211.c:function wl_notify_connect_status: error: undefined reference to '__ieee80211_get_channel'
drivers/built-in.o:wl_cfg80211.c:function wl_notify_connect_status: error: undefined reference to 'cfg80211_ibss_joined'
drivers/built-in.o:wl_cfg80211.c:function wl_notify_connect_status: error: undefined reference to 'cfg80211_get_bss'
drivers/built-in.o:wl_cfg80211.c:function wl_notify_connect_status: error: undefined reference to 'cfg80211_unlink_bss'
drivers/built-in.o:wl_cfg80211.c:function wl_notify_connect_status: error: undefined reference to 'cfg80211_ibss_joined'
drivers/built-in.o:binder.c:function wl_update_wiphybands: error: undefined reference to 'wiphy_apply_custom_regulatory'
drivers/built-in.o:binder.c:function wl_update_wiphybands: error: undefined reference to 'ieee80211_channel_to_frequency'
drivers/built-in.o:binder.c:function wl_cfg80211_down: error: undefined reference to 'cfg80211_scan_done'
drivers/built-in.o:wl_cfg80211.c:function wl_cfg80211_remain_on_channel: error: undefined reference to 'cfg80211_ready_on_channel'
drivers/built-in.o:binder.c:function wl_cfg80211_scan_stop: error: undefined reference to 'cfg80211_scan_done'
drivers/built-in.o:wl_cfg80211.c:function wl_notify_rx_mgmt_frame: error: undefined reference to 'cfg80211_rx_mgmt'
drivers/built-in.o:wl_cfg80211.c:function wl_notify_rx_mgmt_frame: error: undefined reference to 'cfg80211_rx_mgmt'
drivers/built-in.o:binder.c:function wl_chspec_chandef: error: undefined reference to '__ieee80211_get_channel'
drivers/built-in.o:binder.c:function wl_chspec_chandef: error: undefined reference to 'cfg80211_chandef_create'
drivers/built-in.o:binder.c:function wl_cfg80211_ch_switch_notify: error: undefined reference to 'cfg80211_ch_switch_notify'
drivers/built-in.o:binder.c:function wl_cfgp2p_listen_complete: error: undefined reference to 'cfg80211_remain_on_channel_expired'
drivers/built-in.o:binder.c:function wl_cfgp2p_down: error: undefined reference to 'cfg80211_remain_on_channel_expired'
drivers/built-in.o:binder.c:function wl_cfgp2p_del_p2p_disc_if: error: undefined reference to 'cfg80211_unregister_wdev'
drivers/built-in.o:binder.c:function wl_cfgp2p_del_p2p_disc_if: error: undefined reference to 'cfg80211_unregister_wdev'
drivers/built-in.o:wl_cfgvendor.c:function wl_cfgvendor_priv_string_handler: error: undefined reference to '__cfg80211_alloc_reply_skb'
drivers/built-in.o:wl_cfgvendor.c:function wl_cfgvendor_priv_string_handler: error: undefined reference to 'cfg80211_vendor_cmd_reply'
drivers/built-in.o:binder.c:function wl_cfgvendor_send_async_event: error: undefined reference to '__cfg80211_alloc_event_skb'
drivers/built-in.o:binder.c:function wl_cfgvendor_send_async_event: error: undefined reference to '__cfg80211_send_event_skb'
make[1]: *** [vmlinux] Error 1
make[1]: Leaving directory `/home/jcxmej/Desktop/Tevatron/imx6.0.1/kernel_imx'
make: *** [out/target/product/sabresd_6dq/kernel] Error 2

 

If anyone tell me which all files are needed to be edited and how.

I referred posts about porting rt8192cu but its about previous versions of kernel and android. I tried following those only but Im failing to even compile everything. So can someone update the steps here. Thanks.

Outcomes