WARNING: "****" [**RTL88x2BU-Linux-Driver/88x2bu.ko] undefined!
I use kernel version 4.4.126, and I encountered the following warning when I compiled this module. This caused the ko file I generated to fail to insmod on the target device.
root@b99b3ad5dab3:~/RTL88x2BU-Linux-Driver# make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- KSRC=/root/rockchip-kernel
make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- -C /root/rockchip-kernel M=/root/RTL88x2BU-Linux-Driver modules
make[1]: Entering directory '/root/rockchip-kernel'
Building modules, stage 2.
MODPOST 1 modules
WARNING: "usb_register_driver" [/root/RTL88x2BU-Linux-Driver/88x2bu.ko] undefined!
WARNING: "__napi_schedule" [/root/RTL88x2BU-Linux-Driver/88x2bu.ko] undefined!
WARNING: "eth_type_trans" [/root/RTL88x2BU-Linux-Driver/88x2bu.ko] undefined!
WARNING: "napi_gro_receive" [/root/RTL88x2BU-Linux-Driver/88x2bu.ko] undefined!
WARNING: "register_netdevice_notifier" [/root/RTL88x2BU-Linux-Driver/88x2bu.ko] undefined!
WARNING: "skb_queue_tail" [/root/RTL88x2BU-Linux-Driver/88x2bu.ko] undefined!
WARNING: "cfg80211_mgmt_tx_status" [/root/RTL88x2BU-Linux-Driver/88x2bu.ko] undefined!
WARNING: "dev_get_by_name" [/root/RTL88x2BU-Linux-Driver/88x2bu.ko] undefined!
WARNING: "ieee80211_frequency_to_channel" [/root/RTL88x2BU-Linux-Driver/88x2bu.ko] undefined!
WARNING: "cfg80211_rx_mgmt" [/root/RTL88x2BU-Linux-Driver/88x2bu.ko] undefined!
WARNING: "napi_disable" [/root/RTL88x2BU-Linux-Driver/88x2bu.ko] undefined!
WARNING: "free_netdev" [/root/RTL88x2BU-Linux-Driver/88x2bu.ko] undefined!
WARNING: "__cfg80211_alloc_reply_skb" [/root/RTL88x2BU-Linux-Driver/88x2bu.ko] undefined!
WARNING: "unregister_netdevice_queue" [/root/RTL88x2BU-Linux-Driver/88x2bu.ko] undefined!
WARNING: "__pskb_copy_fclone" [/root/RTL88x2BU-Linux-Driver/88x2bu.ko] undefined!
WARNING: "usb_submit_urb" [/root/RTL88x2BU-Linux-Driver/88x2bu.ko] undefined!
WARNING: "netif_receive_skb" [/root/RTL88x2BU-Linux-Driver/88x2bu.ko] undefined!
WARNING: "alloc_etherdev_mqs" [/root/RTL88x2BU-Linux-Driver/88x2bu.ko] undefined!
WARNING: "usb_free_urb" [/root/RTL88x2BU-Linux-Driver/88x2bu.ko] undefined!
WARNING: "cfg80211_new_sta" [/root/RTL88x2BU-Linux-Driver/88x2bu.ko] undefined!
WARNING: "unregister_netdev" [/root/RTL88x2BU-Linux-Driver/88x2bu.ko] undefined!
WARNING: "unregister_netdevice_notifier" [/root/RTL88x2BU-Linux-Driver/88x2bu.ko] undefined!
WARNING: "cfg80211_inform_bss_frame_data" [/root/RTL88x2BU-Linux-Driver/88x2bu.ko] undefined!
WARNING: "cfg80211_connect_result" [/root/RTL88x2BU-Linux-Driver/88x2bu.ko] undefined!
WARNING: "netdev_set_default_ethtool_ops" [/root/RTL88x2BU-Linux-Driver/88x2bu.ko] undefined!
WARNING: "dev_alloc_name" [/root/RTL88x2BU-Linux-Driver/88x2bu.ko] undefined!
WARNING: "usb_kill_urb" [/root/RTL88x2BU-Linux-Driver/88x2bu.ko] undefined!
WARNING: "netif_carrier_on" [/root/RTL88x2BU-Linux-Driver/88x2bu.ko] undefined!
WARNING: "cfg80211_unlink_bss" [/root/RTL88x2BU-Linux-Driver/88x2bu.ko] undefined!
WARNING: "__dev_kfree_skb_any" [/root/RTL88x2BU-Linux-Driver/88x2bu.ko] undefined!
WARNING: "usb_alloc_coherent" [/root/RTL88x2BU-Linux-Driver/88x2bu.ko] undefined!
WARNING: "skb_push" [/root/RTL88x2BU-Linux-Driver/88x2bu.ko] undefined!
WARNING: "skb_trim" [/root/RTL88x2BU-Linux-Driver/88x2bu.ko] undefined!
WARNING: "netif_napi_add" [/root/RTL88x2BU-Linux-Driver/88x2bu.ko] undefined!
WARNING: "unregister_inetaddr_notifier" [/root/RTL88x2BU-Linux-Driver/88x2bu.ko] undefined!
WARNING: "register_netdev" [/root/RTL88x2BU-Linux-Driver/88x2bu.ko] undefined!
WARNING: "cfg80211_put_bss" [/root/RTL88x2BU-Linux-Driver/88x2bu.ko] undefined!
WARNING: "cfg80211_roamed" [/root/RTL88x2BU-Linux-Driver/88x2bu.ko] undefined!
WARNING: "register_inetaddr_notifier" [/root/RTL88x2BU-Linux-Driver/88x2bu.ko] undefined!
WARNING: "cfg80211_scan_done" [/root/RTL88x2BU-Linux-Driver/88x2bu.ko] undefined!
WARNING: "napi_complete_done" [/root/RTL88x2BU-Linux-Driver/88x2bu.ko] undefined!
WARNING: "netif_carrier_off" [/root/RTL88x2BU-Linux-Driver/88x2bu.ko] undefined!
WARNING: "usb_get_dev" [/root/RTL88x2BU-Linux-Driver/88x2bu.ko] undefined!
WARNING: "register_netdevice" [/root/RTL88x2BU-Linux-Driver/88x2bu.ko] undefined!
WARNING: "skb_copy" [/root/RTL88x2BU-Linux-Driver/88x2bu.ko] undefined!
WARNING: "skb_copy_bits" [/root/RTL88x2BU-Linux-Driver/88x2bu.ko] undefined!
WARNING: "cfg80211_ibss_joined" [/root/RTL88x2BU-Linux-Driver/88x2bu.ko] undefined!
WARNING: "netif_rx" [/root/RTL88x2BU-Linux-Driver/88x2bu.ko] undefined!
WARNING: "usb_deregister" [/root/RTL88x2BU-Linux-Driver/88x2bu.ko] undefined!
WARNING: "skb_dequeue" [/root/RTL88x2BU-Linux-Driver/88x2bu.ko] undefined!
WARNING: "cfg80211_michael_mic_failure" [/root/RTL88x2BU-Linux-Driver/88x2bu.ko] undefined!
WARNING: "netif_tx_wake_queue" [/root/RTL88x2BU-Linux-Driver/88x2bu.ko] undefined!
WARNING: "cfg80211_disconnected" [/root/RTL88x2BU-Linux-Driver/88x2bu.ko] undefined!
WARNING: "csum_ipv6_magic" [/root/RTL88x2BU-Linux-Driver/88x2bu.ko] undefined!
WARNING: "ethtool_op_get_link" [/root/RTL88x2BU-Linux-Driver/88x2bu.ko] undefined!
WARNING: "init_net" [/root/RTL88x2BU-Linux-Driver/88x2bu.ko] undefined!
WARNING: "__cfg80211_send_event_skb" [/root/RTL88x2BU-Linux-Driver/88x2bu.ko] undefined!
WARNING: "cfg80211_get_bss" [/root/RTL88x2BU-Linux-Driver/88x2bu.ko] undefined!
WARNING: "wiphy_new_nm" [/root/RTL88x2BU-Linux-Driver/88x2bu.ko] undefined!
WARNING: "wiphy_free" [/root/RTL88x2BU-Linux-Driver/88x2bu.ko] undefined!
WARNING: "skb_put" [/root/RTL88x2BU-Linux-Driver/88x2bu.ko] undefined!
WARNING: "__ieee80211_get_channel" [/root/RTL88x2BU-Linux-Driver/88x2bu.ko] undefined!
WARNING: "cfg80211_ready_on_channel" [/root/RTL88x2BU-Linux-Driver/88x2bu.ko] undefined!
WARNING: "skb_clone" [/root/RTL88x2BU-Linux-Driver/88x2bu.ko] undefined!
WARNING: "cfg80211_ch_switch_started_notify" [/root/RTL88x2BU-Linux-Driver/88x2bu.ko] undefined!
WARNING: "usb_put_dev" [/root/RTL88x2BU-Linux-Driver/88x2bu.ko] undefined!
WARNING: "cfg80211_ch_switch_notify" [/root/RTL88x2BU-Linux-Driver/88x2bu.ko] undefined!
WARNING: "netif_wake_subqueue" [/root/RTL88x2BU-Linux-Driver/88x2bu.ko] undefined!
WARNING: "usb_control_msg" [/root/RTL88x2BU-Linux-Driver/88x2bu.ko] undefined!
WARNING: "__pskb_pull_tail" [/root/RTL88x2BU-Linux-Driver/88x2bu.ko] undefined!
WARNING: "usb_alloc_urb" [/root/RTL88x2BU-Linux-Driver/88x2bu.ko] undefined!
WARNING: "usb_autopm_get_interface" [/root/RTL88x2BU-Linux-Driver/88x2bu.ko] undefined!
WARNING: "wiphy_unregister" [/root/RTL88x2BU-Linux-Driver/88x2bu.ko] undefined!
WARNING: "netif_tx_stop_all_queues" [/root/RTL88x2BU-Linux-Driver/88x2bu.ko] undefined!
WARNING: "cfg80211_del_sta_sinfo" [/root/RTL88x2BU-Linux-Driver/88x2bu.ko] undefined!
WARNING: "cfg80211_vendor_cmd_reply" [/root/RTL88x2BU-Linux-Driver/88x2bu.ko] undefined!
WARNING: "usb_autopm_put_interface" [/root/RTL88x2BU-Linux-Driver/88x2bu.ko] undefined!
WARNING: "__netdev_alloc_skb" [/root/RTL88x2BU-Linux-Driver/88x2bu.ko] undefined!
WARNING: "nla_put_nohdr" [/root/RTL88x2BU-Linux-Driver/88x2bu.ko] undefined!
WARNING: "cfg80211_remain_on_channel_expired" [/root/RTL88x2BU-Linux-Driver/88x2bu.ko] undefined!
WARNING: "nla_put" [/root/RTL88x2BU-Linux-Driver/88x2bu.ko] undefined!
WARNING: "wiphy_register" [/root/RTL88x2BU-Linux-Driver/88x2bu.ko] undefined!
WARNING: "__cfg80211_alloc_event_skb" [/root/RTL88x2BU-Linux-Driver/88x2bu.ko] undefined!
WARNING: "netif_napi_del" [/root/RTL88x2BU-Linux-Driver/88x2bu.ko] undefined!
WARNING: "usb_free_coherent" [/root/RTL88x2BU-Linux-Driver/88x2bu.ko] undefined!
WARNING: "rtnl_is_locked" [/root/RTL88x2BU-Linux-Driver/88x2bu.ko] undefined!
WARNING: "skb_pull" [/root/RTL88x2BU-Linux-Driver/88x2bu.ko] undefined!
CC /root/RTL88x2BU-Linux-Driver/88x2bu.mod.o
LD [M] /root/RTL88x2BU-Linux-Driver/88x2bu.ko
make[1]: Leaving directory '/root/rockchip-kernel'
root@b99b3ad5dab3:~/RTL88x2BU-Linux-Driver#
Hi, it looks to me like the kernel does not have WiFi support enabled. Check
grep 80211 /root/rockchip-kernel/.config
Yes, I modified the kernel configuration and now it can be compiled, but when I insmod on the target host, an error "disagrees about version of symbol XXXX" appears. I modified the CRC in the kernel Module.symvers file according to the existing module, but I can't find the crc of the following symbol in the existing module: dmesg
[10020.633203] wlan: disagrees about version of symbol del_timer
[10020.633248] wlan: Unknown symbol del_timer (err -22)
[10020.633396] wlan: disagrees about version of symbol __platform_driver_register
[10020.633405] wlan: Unknown symbol __platform_driver_register (err -22)
[10020.633685] wlan: disagrees about version of symbol cfg80211_ch_switch_notify
[10020.633730] wlan: Unknown symbol cfg80211_ch_switch_notify (err -22)
[10020.634383] wlan: disagrees about version of symbol cfg80211_ch_switch_started_notify
[10020.634458] wlan: Unknown symbol cfg80211_ch_switch_started_notify (err -22)
[10020.634662] wlan: disagrees about version of symbol __vfs_write
[10020.634681] wlan: Unknown symbol __vfs_write (err -22)
[10020.634985] wlan: disagrees about version of symbol ethtool_op_get_link
[10020.634996] wlan: Unknown symbol ethtool_op_get_link (err -22)
[10020.635053] wlan: disagrees about version of symbol kthread_stop
[10020.635065] wlan: Unknown symbol kthread_stop (err -22)
[10020.635384] wlan: disagrees about version of symbol platform_get_resource_byname
[10020.635406] wlan: Unknown symbol platform_get_resource_byname (err -22)
[10020.635528] wlan: disagrees about version of symbol mutex_lock
[10020.635543] wlan: Unknown symbol mutex_lock (err -22)
[10020.635734] wlan: disagrees about version of symbol single_open_size
[10020.635746] wlan: Unknown symbol single_open_size (err -22)
[10020.635954] wlan: disagrees about version of symbol netdev_set_default_ethtool_ops
[10020.635971] wlan: Unknown symbol netdev_set_default_ethtool_ops (err -22)
[10020.636202] wlan: disagrees about version of symbol platform_driver_unregister
[10020.636221] wlan: Unknown symbol platform_driver_unregister (err -22)
[10020.636280] wlan: disagrees about version of symbol kern_path
[10020.636292] wlan: Unknown symbol kern_path (err -22)
My goal is to install the drivers for the 8812bu wireless card on a RockChip RK3399 based Android device. It runs Linux kernel version 4.4.126.
You need to reboot to your new compiled kernel, even they are the same kernel version, the internal structs maybe different. Which why kernel not allowed you to use them.
I tested it after rebooting and it still had the same effect:
1|rk3399:/sdcard/rtl_module # insmod wlan.ko
insmod: failed to load wlan.ko: Invalid argument
1|rk3399:/sdcard/rtl_module #
[ 78.190992] init: Service 'startApp' (pid 232) exited with status 0
[ 171.891189] wlan: loading out-of-tree module taints kernel.
[ 171.901844] wlan: disagrees about version of symbol del_timer
[ 171.901894] wlan: Unknown symbol del_timer (err -22)
[ 171.902034] wlan: disagrees about version of symbol __platform_driver_register
[ 171.902153] wlan: Unknown symbol __platform_driver_register (err -22)
[ 171.902376] wlan: disagrees about version of symbol cfg80211_ch_switch_notify
[ 171.902385] wlan: Unknown symbol cfg80211_ch_switch_notify (err -22)
[ 171.902435] wlan: disagrees about version of symbol cfg80211_ch_switch_started_notify
[ 171.902448] wlan: Unknown symbol cfg80211_ch_switch_started_notify (err -22)
[ 171.902559] wlan: disagrees about version of symbol __vfs_write
[ 171.902568] wlan: Unknown symbol __vfs_write (err -22)
[ 171.902785] wlan: disagrees about version of symbol ethtool_op_get_link
[ 171.902805] wlan: Unknown symbol ethtool_op_get_link (err -22)
[ 171.902854] wlan: disagrees about version of symbol kthread_stop
[ 171.902872] wlan: Unknown symbol kthread_stop (err -22)
[ 171.903129] wlan: disagrees about version of symbol platform_get_resource_byname
[ 171.903166] wlan: Unknown symbol platform_get_resource_byname (err -22)
[ 171.903269] wlan: disagrees about version of symbol mutex_lock
[ 171.903281] wlan: Unknown symbol mutex_lock (err -22)
[ 171.903453] wlan: disagrees about version of symbol single_open_size
[ 171.903465] wlan: Unknown symbol single_open_size (err -22)
[ 171.903620] wlan: disagrees about version of symbol netdev_set_default_ethtool_ops
[ 171.903641] wlan: Unknown symbol netdev_set_default_ethtool_ops (err -22)
[ 171.903923] wlan: disagrees about version of symbol platform_driver_unregister
[ 171.903952] wlan: Unknown symbol platform_driver_unregister (err -22)
[ 171.903989] wlan: disagrees about version of symbol kern_path
[ 171.903999] wlan: Unknown symbol kern_path (err -22)
rk3399:/sdcard/rtl_module #
I can't get the kernel configuration of the original device, I can only compile it with the kernel source code of the same version. Maybe there is something in the Makefile of RTL88x2BU-Linux-Driver that needs to be modified? Platform Related, Android, Interface,Features, etc.
Maybe there is something in the Makefile of RTL88x2BU-Linux-Driver that needs to be modified?
None of those functions are defined in the driver, they all Linux kernel functions used by other kernel modules, in this case it used by wlan.
disagrees about version of symbol means the linux kernel found the kernel modules are built with different configurations, which cannot be used.
You do not need original kernel configurations, but the kernel and the kernel modules must be come from same build. Did you copied kernel but not the new kernel modules (not this driver)?
Maybe I didn't explain it clearly enough. I bought a product with RK3399 processor, which uses kernel version 4.4.126 and runs Android 7.1.2. I want to use ASUS USB-AC53 Nano network card, but it only has RTL8188eu driver (ko file as follows). I can't get the kernel source code when the product is manufactured. I can only get the parameters of the existing ko file from Android system and build it with the same version of open source kernel source code.
root@b99b3ad5dab3:~/rockchip-kernel# grep 80211 /root/rockchip-kernel/.config
CONFIG_CFG80211=y
# CONFIG_NL80211_TESTMODE is not set
# CONFIG_CFG80211_DEVELOPER_WARNINGS is not set
# CONFIG_CFG80211_REG_DEBUG is not set
CONFIG_CFG80211_DEFAULT_PS=y
# CONFIG_CFG80211_INTERNAL_REGDB is not set
CONFIG_CFG80211_CRDA_SUPPORT=y
# CONFIG_CFG80211_WEXT is not set
# CONFIG_LIB80211 is not set
# CONFIG_MAC80211 is not set
CONFIG_MAC80211_STA_HASH_MAX_SIZE=0
root@b99b3ad5dab3:~/rockchip-kernel#
I assume you cannot change the kernel in this case?
In that Android device, check if /proc/config.gz or /proc/config exists.
I checked and found no /proc/config.gz or /proc/config.
rk3399:/ # ls /proc/
1 119 1380 1532 167 208 246 44 70 fb schedstat
10 12 1381 154 168 21 247 45 706 filesystems scsi
103 120 1384 155 17 215 248 46 709 fs self
1034 1206 1385 156 171 217 25 47 71 ftxxxx-debug softirqs
104 121 139 1560 173 219 252 48 724 iep stat
105 122 14 1563 174 22 26 49 738 interrupts swaps
1052 123 140 1567 175 220 27 5 755 iomem sys
106 1239 141 157 177 221 28 50 758 ioports sysrq-trigger
107 124 1414 1570 178 223 29 52 768 irq thread-self
1086 125 142 1572 179 224 3 573 792 kallsyms timer_list
109 126 144 1582 18 227 31 583 8 key-users timer_stats
11 1261 146 159 180 23 32 596 820 keys tty
110 127 147 16 184 231 33 623 9 kmsg uid_cputime
1100 1275 1473 160 185 233 336 624 asound kpagecgroup uid_io
111 128 148 161 189 234 34 625 buddyinfo kpagecount uid_procstat
112 129 149 162 19 235 36 626 bus kpageflags uptime
1125 13 15 1626 190 236 364 627 cgroups loadavg version
113 130 150 163 192 237 37 628 cmdline locks vmallocinfo
114 131 151 1630 193 239 38 629 consoles meminfo vmstat
115 132 152 1631 194 24 39 630 cpuinfo misc zoneinfo
116 133 1522 1632 2 240 40 659 crypto modules
1160 134 1525 1634 200 241 41 661 device-tree mounts
117 135 1526 1635 203 242 414 67 devices net
1171 136 1528 1636 204 243 42 68 diskstats pagetypeinfo
118 137 153 1637 205 244 428 69 driver partitions
1187 138 1531 164 206 245 43 7 execdomains sched_debug
rk3399:/ #
Try use this build your kernel. Rename it to .config and put it in the kernel source dir.
Using the .config you provided, I got an error when compiling the kernel. Before make, I executed make menuconfig and saved it.
root@b99b3ad5dab3:~/rockchip-kernel# make
CHK include/config/kernel.release
CHK include/generated/uapi/linux/version.h
CHK include/generated/utsrelease.h
CHK include/generated/bounds.h
CHK include/generated/timeconst.h
CHK include/generated/asm-offsets.h
CALL scripts/checksyscalls.sh
make[1]: 'include/generated/vdso-offsets.h' is up to date.
CHK scripts/mod/devicetable-offsets.h
CHK include/generated/compile.h
CHK kernel/config_data.h
CC drivers/gpu/arm/midgard/mali_kbase_mem.o
drivers/gpu/arm/midgard/mali_kbase_mem.c: In function 'kbase_jd_user_buf_map':
drivers/gpu/arm/midgard/mali_kbase_mem.c:2192:7: warning: passing argument 7 of 'get_user_pages' from incompatible pointer type [-Wincompatible-pointer-types]
error, forbidden warning:mali_kbase_mem.c:2192
2192 | 0, pages, NULL);
| ^~~~~
| |
| struct page **
In file included from include/linux/scatterlist.h:7,
from include/linux/dma-buf.h:29,
from drivers/gpu/arm/midgard/mali_kbase_mem.c:25:
include/linux/mm.h:1240:31: note: expected 'struct vm_area_struct **' but argument is of type 'struct page **'
1240 | struct vm_area_struct **vmas);
| ~~~~~~~~~~~~~~~~~~~~~~~~^~~~
drivers/gpu/arm/midgard/mali_kbase_mem.c:2188:17: error: too many arguments to function 'get_user_pages'
2188 | pinned_pages = get_user_pages(NULL, mm,
| ^~~~~~~~~~~~~~
In file included from include/linux/scatterlist.h:7,
from include/linux/dma-buf.h:29,
from drivers/gpu/arm/midgard/mali_kbase_mem.c:25:
include/linux/mm.h:1237:6: note: declared here
1237 | long get_user_pages(struct task_struct *tsk, struct mm_struct *mm,
| ^~~~~~~~~~~~~~
make[4]: *** [scripts/Makefile.build:278: drivers/gpu/arm/midgard/mali_kbase_mem.o] Error 1
make[3]: *** [scripts/Makefile.build:484: drivers/gpu/arm/midgard] Error 2
make[2]: *** [scripts/Makefile.build:484: drivers/gpu/arm] Error 2
make[1]: *** [scripts/Makefile.build:484: drivers/gpu] Error 2
make: *** [Makefile:1036: drivers] Error 2
root@b99b3ad5dab3:~/rockchip-kernel#
I compiled the linux-4.4.126.tar.gz downloaded from the linux kernel. But I saw the same error in dmesg.
you still need ARCH=arm64 and CROSS_COMPILE etc. when run make
Same error, I'm using ubuntu host and target machine with the same architecture, the default gcc is aarch64-linux-gnu-, so I can ignore the parameters after make. MacBook M1 pro, docker + Ubuntu arm 20.04 work machine:
root@b99b3ad5dab3:~/rockchip-kernel# uname -a
Linux b99b3ad5dab3 6.10.14-linuxkit #1 SMP Mon Feb 24 16:35:16 UTC 2025 aarch64 aarch64 aarch64 GNU/Linux
root@b99b3ad5dab3:~/rockchip-kernel#
target machine:
rk3399:/sdcard/rtl_module # uname -a
Linux localhost 4.4.126 #81 SMP PREEMPT Thu Dec 28 17:22:31 CST 2023 aarch64
rk3399:/sdcard/rtl_module #
hmmm, try follow this https://ess-wiki.advantech.com.tw/view/Android_BSP_User_Guide_for_rk3399_series_7.1.2
The kernel maybe different than the standard 4.4.126.
Where did you get the .config you provided?
Perhaps the manufacturer of this product has made additional configurations to the rockchip kernel.
Where did you get the
.configyou provided? Perhaps the manufacturer of this product has made additional configurations to the rockchip kernel.
Got from the link I posted above repo, which seems official default config for RK3399 and Android 7.1.2.
Thank you for your quick response, I will try more and update here if there is any progress.
I compiled the default kernel configuration provided in https://ess-wiki.advantech.com.tw/view/Android_BSP_User_Guide_for_rk3399_series_7.1.2 and got the same result, which may be as you said: "The kernel maybe different than the standard 4.4.126."
root@b99b3ad5dab3:~/RTL88x2BU-Linux-Driver-2# modprobe --dump-modversions 88x2bu.ko | grep module_layout
0xe19b6684 module_layout
root@b99b3ad5dab3:~/RTL88x2BU-Linux-Driver-2# modprobe --dump-modversions ../8188eu.ko | grep module_layout
0x7b41a4c1 module_layout
rk3399:/sdcard/rtl_module # insmod 88x2bu.ko
insmod: failed to load 88x2bu.ko: Exec format error
rk3399:/sdcard/rtl_module # dmesg | grep 88x2
[ 198.178860] 88x2bu: disagrees about version of symbol module_layout
rk3399:/sdcard/rtl_module #
maybe you had to try old gcc version?
You can try change the module_layout to match that, but that also can crash the kernel, a very risky move if you want to try.
I tried to modify module_layout before, but there are more functions with crc mismatch. Like this: https://github.com/RinCat/RTL88x2BU-Linux-Driver/issues/258#issuecomment-2749730975
The kernel checks all symbols.
Then there is not much I can help. You can try search the device and see if you are able to download the manufacturer source code / config. Without it, this will very hard to do. Also someone else may have open source ROM you can flash if you do not need use the manufacturer ROM.
I searched on Google and found this: https://sven.killig.de/android/DHO/
This looks like what I need.
it is working:
127|rk3399_rigol:/sdcard/rtl_module # insmod 88x2bu.ko
rk3399_rigol:/sdcard/rtl_module # dmesg | grep 88x2
[ 198.178860] 88x2bu: disagrees about version of symbol module_layout
[ 323.713533] 88x2bu: disagrees about version of symbol module_layout
[ 336.091527] 88x2bu: disagrees about version of symbol module_layout
[ 3328.599519] 88x2bu: loading out-of-tree module taints kernel.
[ 3328.630967] RTW: rtl88x2bu v5.8.7.4_37264.20200922_COEX20191120-7777
[ 3328.630982] RTW: rtl88x2bu BT-Coex version = COEX20191120-7777
[ 3328.631491] usbcore: registered new interface driver rtl88x2bu
rk3399_rigol:/sdcard/rtl_module #
If you build your own kernel it will work. But since I do not know what kind of device it is, I generally don't recommend users compile their own. It could brick it if you unable to use recovery system.
The ko file provided here can be used. https://sven.killig.de/android/DHO/
OK, that is good. You also need try and see if it does included your USB WiFi ID.
I don't know what the USB WIFI ID is you're talking about, but the network card does work. I can now connect to 5G network.
Are you talking about this:
rk3399/ # lsusb
Bus 002 Device 003: ID 0b05:184c
ifconfig:
wlan0 Link encap:Ethernet HWaddr 08:bf:b8:49:48:92
inet addr:192.168.1.9 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::abf:b8ff:fe49:4892/64 Scope: Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:4 errors:0 dropped:0 overruns:0 frame:0
TX packets:10 errors:0 dropped:2 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1574 TX bytes:1764