All I want for the holidays is a working Windows share (aka how to cross-compile the CIFS module for a Nano)

This might seem trivial, but I’ve been trying to get a Windows file share into a Jetson Nano for the best part of a week. I am in total despair. Any help anyone could provide me with, I’ll take.

Here’s the situation.

  1. Samba installs, but the kernel module doesn’t support SMB2/3. My NAS only supports SMB2/3. So evidently the kernel module needs compiling.
  2. Tries to find how get the sources needed. Couldn’t find any, so gave up.
  3. Decides the best way to get ./ to run is to update the Nano to Jetpack 4.6.3
  4. After a long saga, six installs of Ubuntu on different systems, I finally managed to refresh the Nano and it’s up again. So it’s now on Jetpack 4.6.3 (Nano’s won’t go higher AFAICT).
  5. Eventually managed to download the sources, when I reverse engineered the code to figure the undocumented tag tegra-l4t-r32.7.3
  6. Set up something that appears to be a viable cross compile toolchain (gcc 4.8.5 one)
  7. Added export LANG=C because without it everything core dumps

Now the compile fails after about three files with “sorry, unimplemented function profiling”, “Error 1”, in scripts/mod/devicetable-offsets.o, recipe for target scripts/mod/devicetable-offsets.s failed.

I am completely confused, and it feels that what ought to be a simple thing (accessing SMB2 file shares on a Jetson) is just insanely over-complex. I’ve looked very carefully, and I cannot find a single example of a module rebuild that might work.

I am sure it ought not to be this complex. Does anyone have an actual recipe for rebuilding a vanilla kernel module that stands a chance of working?