Problem compiling kernel modules under ubuntu


#1

I’m getting an error unsupported RELA relocation: 275 when I try to load kernel modules compiled from the kernel.

I have a fresh installation of Ubuntu 15.09 and am following the kernel compile directions here: http://builds.96boards.org/releases/dragonboard410c/linaro/ubuntu/15.09/

However trying to insert the module gives the above error.

The solution is to apply this patch: https://patches.linaro.org/53727/ which is a workaround to fix erratum #843419

I’ve validated this on the Ubuntu 15.09 build but I think it effects more than that.

Note: I added a menuconfig step to enable the kernel module I wanted to build. And to the end of the make line, I added “modules”. There’s also one typo in the make command. The KERNELRELEASE version should be 4.2.4 not 4.2.0 for 15.09.


#2

hi tfoote,

thanks for the detailed finding…

This patch was merged in mainline kernel in 4.3. So it is safe to use it, I believe. Note that there was another related patch in mainline (which should not impact you though):

b6dd8e0 arm64: errata: use KBUILD_CFLAGS_MODULE for erratum #843419
df057cc arm64: errata: add module build workaround for erratum #843419

Our current release is based on 4.2.4 kernel which has this fix already (it was backported to stable kernel), and our next release will be based on 4.3 which has it too.

And we are not planning any update on 15.09 release, nor are we planning any more Ubuntu releases.

Also for 15.09, the release was based on 4.2.0, not 4.2.4.