Compiling a Kernel Module for TX1


For two days, I am trying to compile a simple kernel module for TX1 which runs L4T 24.1 32-bit. I have tried to compile the module directly on the board, but it gives me some weird errors. I have read that since the kernel is 64-bit and the user space applications are 32-bit, we need to do cross compilation. However, my version is 32-bit so I would not need to do that. There are some guides to compile the module for 64-bit system, but I could not find any guide for 32-bit L4T 24.1. Can you please tell what I need to do?

The CPU involved supports ARMv8-a 64-bit instruction set, and in compatibility mode, ARMv8 32-bit instruction set (essentially ARMv7 with certain features like NEON and hardware floating point runs directly on 32-bit ARMv8). Regardless of user space, the kernel will require compiler support for both 64-bit and 32-bit. Since the ARM compilers do not support both 64-bit and 32-bit compatibility in a single compiler, two compilers are needed for kernel build (if this were a desktop PC you can use a single compiler because i386 compatibility and x86_64 exist together in a single compiler…else desktop would also require two compilers).

The dual compiler requirement means you are better off compiling kernels via cross compiler instead of using native compile. User space programs are best built natively on the Jetson. More information on the topic is here: