Unable to load external modules on Jetson TX2 - unsupported RELA relocation:275

Hi,

I’m trying to work with a gigEVision camera for what I need to compile and load an external module (ebUniversalProEthernet module) to speed up communications with the camera. I’m working with the Jetson TX2, kernel version 4.4.38, Jetpack 3.1.

I managed to compile the kernel with modules_prepare. But when I try to load the kernel I get the following error:

insmod: ERROR: could not insert module ./<module_name>.ko: Invalid module format

Then I looked into the dmesg and had the following: unsupported RELA relocation:275

Could anybody help me out with this issue?

Thanks,

What does the “file” command show about the file type? E.g.:

file some_name.ko

If it says x86-64, then it is for a desktop PC and not a Jetson. If it says aarch64, then it is for a Jetson, e.g., module pci-tegra.ko shows:

pci-tegra.ko: ELF 64-bit LSB relocatable, ARM <b>aarch64</b>, version 1 (SYSV), BuildID[sha1]=cea057308d37fd2f2cbf4c9b4ef8b03a5f32fc83, with debug_info, not stripped

This is what the command “file module_name.ko” shows:

ebUniversalProForEthernet-arm.ko: ELF 64-bit LSB relocatable, ARM aarch64, version 1 (SYSV), BuildID[sha1]=cae873659fb127ba54f8712f4414936b385d84a5, not stripped

So it is for the Jetson (it was compiled with the Jetson), but I’m still unable to load it.

Hi phorstrand, please see the suggestion from this other thread with similar error message:

https://devtalk.nvidia.com/default/topic/1026085/jetson-tx2/module-hbi-unsupported-rela-relocation-275/

Are you cross-compiling?

In another case cross-compile did have incorrect mixing of host and aarch64 files. The file command does show that this is compiled for the aarch64 architecture.

What I wonder about is if it was built against a source version not compatible with this kernel. Or perhaps with options selected not being a match. Rebuilding after deleting the old build would be the logical step.What is the kernel source version and initial config you are using with this (either detail being incorrect could explain the error)? Out of tree builds work, but only if the kernel version the module comes from isn’t too far different from the installed kernel version.

There’s this topic from Ubuntu that seems related to the matter, I’m not clear on what the current status/resolution is:

https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1695093

The compiler issue would make sense. This does offer a possible workaround of using a different compiler. If this was the native compiler on the TX2 itself I would think the odds of it working are good (it’s a 4.x compiler), but there are also Linaro compilers in the 5.x, 6.x, and 7.x series out. For the compiler used, what was the version (“gcc --version”)?