Build kernel module out-of-tree for Jetson

Sorry for the delay, I got a chance to test finally.
The GCC-10 branch doesn’t fix building for wireguard, unfortunately.

For wireguard, the build is failing for jetson-nano, on OS version 2.88.4+rev1, as well as 2.85.2+rev4. It also fails for jetson-xavier-nx-devkit-emmc on 2.88.4+rev1, both with the above error about the missing ./arch/arm64/include/asm/xen/hypervisor.h

The other kernel modules missing were not for wireguard, but running Calico networking with kubernetes. Again only for the jetson platforms, I needed to include the src to build the ipip and tunnel4 modules from Nvidia’s L4T source.

Hey @msherman, did you try the solution offered by @jasonanderson? It looks like he found a way to manually grab the missing header.

It might be worth pulling some of the build logic out of the example kernel-module-build project to understand what each step is doing. As my colleague mentioned, the Jetson kernels have been modified by NVIDIA so out-of-tree modules that work for other platforms may not work for Jetson devices without some manual effort.

I did, you can actually see my build script here: chi-edge-workers/install-wireguard.sh at bff2c6b31f766a0aabab2c72136700c19161b946 · ChameleonCloud/chi-edge-workers · GitHub

I pulled the logic out and set it up to build the modules for several different platforms during build, and load the one thats needed at runtime.

Good to hear @msherman, did that resolve the missing header issues or are you still having trouble with Jetson NANO and Xavier NX Devkit? Is there anything else blocking you right now?

Our workaround seem to be sufficient, so we’re not blocked. Going forward, I’m happy to help make a list of workarounds might be helpful to “roll in” to the default kernels / builds though.

1 Like

Thanks for sharing that you are not blocked @msherman Feel free to share the list of workarounds you used to solve this.

Let us know if we can help you more!