Kernel module compile (load) problems

Hi!

On Ubuntu 20.04 I installed the build system, set it up for my router ( target-mips_24kc_musl/linux-ath79_generic , it is a Netgear WNDR3700v2) and then issued: make

If I copy a built kernel module (from build_dir/target-mips_24kc_musl/root-ath79/lib/modules/4.14.171/) to the router and load it, two curious things happen:

  • in the output of lsmod, the new module is marked as [permanent]
  • when used, it works for a few seconds, then the router crashes

It is the pppoe.ko module. First I remove the old version with rmmod.
"using it" means ifup wan

I need a few changes in pppoe.ko to analyse a local problem (just a few printk's).

The version I use is 19.07.2

Regards,
David

You'll have to build the complete firmware and flash it, the versioning between kernel and its modules is very strict and strong, tiny variations will change the versioned dependency hash and are very likely to crash your device.

How to get the same config as existing official build?
With using https://downloads.openwrt.org/releases/19.07.2/targets/ath79/generic/config.buildinfo as .config ?

EDIT: OK, that seems to be the answer. I got the exact same *.ko files as on my router from official install.

1 Like