How to install aarch64 cross compiler in the TX1?

Hello,

I tried to compile a ‘helloworld’ module for the TX1 (in the TX1), and eventually found out that the gcc in there only works for 32-bit (the current userspace), and the kernel is 64-bit. How to install a cross-compiler so that I can compile the module and test it right away, as opposed to building on a host?
Installation steps and a simple example would be great.

Thank you.

ps.
I tried ‘$ sudo apt-get install gcc-aarch64-linux-gnu’ but it says “Package gcc-aarch64-linux-gnu is not available…”

Currently this is not supported.

However …

If you look at: https://github.com/jetsonhacks/TX1FTDIModule

You’ll see a script which will install the arm64 compiler extensions for gcc:

You may have to reflash the Jetson TX1 after compiling the module (make sure you save the module, of course).

All very experimental, use at your own risk, etc.

Thank you @Kungalow.