Note that if your running system results in a “uname -r” output of “4.4.38-tegra”, then CONFIG_LOCALVERSION must be “-tegra”, otherwise the module won’t be found:
To explain, the base kernel version is “4.4.38”, and CONFIG_LOCALVERSION is appended to this and embedded into the running kernel. The “uname -r” command with “-tegra” reflects this kernel’s settings at the time of its compile. Modules are searched for at:
Even if you compiled your module correctly it will mismatch the “uname -r”.
For your actual compile command, if you only specify ARCH=arm64, and don’t specify the cross tool chain prefix which works with that architecture, then the wrong compiler will be used. You can specify this in an environment variable, but most likely this did not occur. You will need to specify the prefix to the cross tool chain and assign it to “CROSS_COMPILE=”. Example from a Fedora system (path will differ for you):
make ARCH=arm64 <b>CROSS_COMPILE</b>=/usr/lib64/ccache/<b>aarch64-linux-gnu-</b>
Note that this is the path because I have this file for the cross architecture version of gcc:
When the compiler looks for “gcc” it prefixes “CROSS_COMPILE”.