NETGEAR is aware of a growing number of phone and online scams. To learn how to stay safe click here.

Forum Discussion

will3b's avatar
will3b
Aspirant
May 07, 2020

problem building kernel modules for 6.10.3

Hi all,

 

I am facing a problem as I'm trying to build wireguard as a kernel module for my ReadyNAS 102, on a 6.10.3 firmware.

I searched the forum a bit and found a related issue here : https://community.netgear.com/t5/New-ReadyNAS-Users-General/6-9-5-GPL-not-posted/m-p/1711456) but unfortunately the solution posted by WhoCares_ does not work for me and I am not able to load the compiled module.

 

I followed the steps listed in the thread:

- got the firmware sources (ReadyNASOS_V6.10.3_WW_src.zip)

- installed the linux-image-extra package on my NAS, loaded the configs module and dumped the running config from /proc/config.gz

- compiled the kernel using this .config

- compiled the wireguard module from git sources

 

Everything compiles just fine, but when I try to insmod the wireguard.ko module against the running Netgear stock kernel (4.4.190.armada.1), I get the following error:

insmod: ERROR: could not insert module wireguard.ko: Invalid module format

 

dmesg shows the following error :

[3668461.294231] wireguard: disagrees about version of symbol module_layout

 

I tried building the module on both the dev VM and the NAS itself, unfortunately with the same result...

 

Has anyone figured out how to successfully compile and load a custom kernel module on 6.10.x firmwares ?

 

 

 

4 Replies

Replies have been turned off for this discussion
  • The problem is that since GPL 6.9.4 NTGR "forgot" to ship their Alpine patches with the kernel sources. This essentially means that all the stuff that makes the kernel run on RN1xx and RN2xx boards is missing. What I'm currently trying is to build a working patch by adapting the diff from the NTGR supplied kernel sources 4.4.116 (the last version that contains their patches) to kernel 4.4.190 (the one shipping with 6.10.3.

     

    -Stefan

    • will3b's avatar
      will3b
      Aspirant

      Thanks for your answer.

      My RN102 is based on a Marvel armada 370 CPU, so I thought I didn't need the alpine kernel source tree. A few alpine kernel modules indeed lie on the file system of my NAS (in /lib/modules/4.4.190.alpine.1/) but they seem unused and cannot be loaded on my system :

       

      # insmod /lib/modules/4.4.190.alpine.1/kernel/kernel/configs.ko
      insmod: ERROR: could not insert module /lib/modules/4.4.190.alpine.1/kernel/kernel/configs.ko: Invalid module format

      Are you sure these sources are needed to build a working module for RN102? Or do you mean we are missing a few patches originally coming from the alpine source tree that were backported to the arm kernel for the official NTGR firmware release but not present in the provided sources?

       

       

      • WhoCares_'s avatar
        WhoCares_
        Mentor

        Sorry, I was a bit unclear there. The patches from NTGR also include stuff targeted at Marvell 370 and 380 chipsets. Looks like they changed their build pipeline in such a way that only the x86 code (which I suspect is the main focus anyway) comes out correct whereas ARM and Alpine are broken.

         

        -Stefan

NETGEAR Academy

Boost your skills with the Netgear Academy - Get trained, certified and stay ahead with the latest Netgear technology! 

Join Us!

ProSupport for Business

Comprehensive support plans for maximum network uptime and business peace of mind.

 

Learn More