Problem with modules using 5.0.y kernel

I just tried the 5.0.y kernel branch and I’m having problems with modules, I’m using the same def config as for 4.9-2.3.x-imx, but something probably changed in 5.0 kernel and I’m getting these errors while loading the modules:

[7.120647] industrialio: section 21 reloc 0 sym '': relocation 42 out of range (0x7f007664 -> 0xc0c0acb0)
[7.176089] caam: section 18 reloc 0 sym '': relocation 42 out of range (0x7f01c304 -> 0xc0a16908)
[7.187627] soundcore: section 16 reloc 0 sym '': relocation 42 out of range (0x7f02204c -> 0xc087d0ec)
[7.206099] industrialio: section 21 reloc 0 sym '': relocation 42 out of range (0x7f014664 -> 0xc0bf7cb0)

This was just few errors, every modules which system try to load shows this kind of error. I believe that there will be something I need to enable in my kernel config, but not sure what.

Does anybody have any idea what’s wrong? I would appreciate any help with this problem.

I attached my defconfig, which is working fine with 4.9-2.3.x-imx kernel - link text



You referring to 4.9-2.3.x-imx makes me assume you are talking about our regular BSP rather than Torizon with its Torizon-Core, right?
If so, I assume you checked our Build U-Boot and Linux Kernel from Source Code article, haven’t you?
May I enquire what exactly it is that you are trying to achieve with this Linux 5.0.y kernel?
What exactly makes you think this would be an easy one-to-one replacement for the 4.9-2.3.x-imx you were using?
That 5.0.y branch so far is only used in Torizon-Core which would be covered in its own articles.

So far I used 4.9-2.3.x-imx for building custom kernel using custom root file system (buildroot, external arm toolchain). Now I checked out 5.0.y branch and built custom kernel using the same defconfig as for building 4.9-2.3.x-imx and having these problems with modules. I need kernel 5.0.y because of usb wifi dongle I need to get to work, the USB support for this module was added into ath10k driver in kernel 5.0.y , that’s the reason why need that kernel. Except this problem with modules everything works fine so I believe that it can be one-to-one replacement for 4.9-2.3.x kernel.

A downstream Linux kernel configuration (e.g. the one from 4.9-2.3.x-imx resp. toradex_4.9-2.3.x-imx to be precise) may definitely not just easily be used with mainline (e.g. 5.0.y).

I, therefore, suggest for you to check out the Torizon-Core configuration and use that instead. However, be adviced that there we use kernel metadata at least for the configuration now.

Finally I solved the problem. As I expected the reason was missing config setting, particularly “CONFIG_MODULE_UNLOAD=y” in my defconfig. Not sure why it worked with 4.9-2.3.x-imx without problem, but it doesn’t work with 5.0.y. Otherwise everything works fine with my defconfig from 4.9-2.3.x-imx.

I assume you do not require any hardware accelerated graphics/multimedia and are fine with whatever limitations this 5.0.y stuff has.

Thanks for letting us know.