Can not load new module when using insmod

Hi all,

Currently, I meet the strange problem.

I tried to modify (add some log debugs) in the cfg80211 module. After that I tried overwrite cfg80211.ko in /lib/modules/5.4.55/cfg80211.ko. I checked again by "strings" tool to make sure that new module was overwrote successfully. The next step, I reboot my device but when the device booting, I still load old module although I checked cfg80211.ko in lib/module, it was new module.

I tried to use modinfo cfg80211. The result is below:

root@OpenWrt:/# modinfo cfg80211
module:         /lib/modules/5.4.55/cfg80211.ko
version:        backported from Linux (v6.5-0-g2dde18cd1d8f) using backports v5.15.92-1-56-g5fb2ccb6b9e8
alias:          net-pf-16-proto-16-family-nl80211
description:    wireless configuration support MTKhehe
license:        GPL
author:         quang anh 
firmware:       regulatory.db
srcversion:     533BB7E5866E52F63B9ACCB
depends:        compat
name:           cfg80211
vermagic:       5.4.55 SMP mod_unload aarch64

Quite strange because the module information in modinfo still match /lib/modules/5.4.55/cfg80211.ko (new module) but it still load previous module.
I assume that my device use /rom/lib/modules/5.4.55/cfg80211.ko.

Could you help me to explain exactly what happend?

How can I make clear the booting sequence in OpenWRT system when loading the kernel modules?

Based on this, it would seem that you're running some vendor provided fork of OpenWrt 21.02 (which has been EOL and unsupported for many years already.

What is the output of:

ubus call system board

this is based on latest Mediatek/Airoha chipset

root@OpenWrt:/# ubus call system board
{
        "kernel": "5.4.55",
        "hostname": "OpenWrt",
        "system": "ARMv8 Processor rev 4",
        "board_name": "airoha,an7583",
        "release": {
                "distribution": "OpenWrt",
                "version": "21.02.1",
                "revision": "r16325-88151b8303",
                "target": "airoha/an7583",
                "description": "OpenWrt 21.02.1 r16325-88151b8303"
        }
}

The firmware on that device did not come from the official OpenWrt project -- this target and device is not supported here. You'll need to ask the vendor for help since it is clearly a fork developed for their specific hardware.

Thanks @psherman
But do you know the process load kernel module when booting the embedded device based on OpenWRT?

All bets are off because the firmware on your device contains major modifications relative to the official openwrt. We have no idea what those changes are and how it affects the system— this is information that only the vendor will know. That is why you need to ask them for help.

1 Like