module hbi: unsupported RELA relocation: 275

Hi nvidia,

Recently I try to porting the Microsemi ZL38051 audio processor driver to run in the tx2 jetson board.
I use the kernel source r28.1 (kernel 4.4.38) and toolchain is gcc-4.8.5-aarch64.
After building out the hbi.ko, I use insmod command to loading the driver. However,it always show below error messages.
“insmod: ERROR: could not insert module hbi.ko: Invalid module format”

And I can also see another error message “module hbi: unsupported RELA relocation: 275” by using dmesg command.

After I google the “Invalid module format”, I found many people said that it is because the kernel version on the target platform
is not the same as the kernel with which the module was built. But I did use the same kernel source to build the driver, so I exclude
the possibility.

I also ever try to build the driver in the TX2 board by gcc version 5.3.1 20160413 (Ubuntu/Linaro 5.3.1-14ubuntu2.1)
However,it din not have any help.

So my problem is what may cause the “module hbi: unsupported RELA relocation: 275” problem?
Would you please give me some advice,Thanks!

BR,
Blake

It is just a guess, but it sounds like perhaps the cross compile environment was not fully set up and compiled not with the cross compiler, but instead as the native PC format. What were your environment variables set up as prior to build? If you are in the directory with the module, what does the command “file <whatever_file_it_is.ko>” say?

Hi hsp83u,

Please also try the steps on L4T document. See if cross-compile can work or not.

https://developer.nvidia.com/embedded/dlc/l4t-documentation-28-1