Wireguard on jetpack 5.0.2

I have a functioning system based on Jetpack 4.4, and now I’m working on the transition to Jetpack 5.0.2.

My first immediate issue is with Wireguard.
it appears to install correctly with

apt install -y wireguard

But wg-quick down wg0, results in:

wg-quick: `wg0’ is not a WireGuard interface

I don’t know if my issue is related to this topic or not:
Wireguard Support on Jetson ORIN in Jetpack 5.0.

Did anyone manage to install Wireguard on AGX Xavier with Jetpack 5.0.2?

I know nothing about wireguard, but the message “wg-quick: 'wg0’ is not a WireGuard interface” is the result of not having the kernel feature/driver. Examine this, which checks for that feature in the kernel configuration (“/proc/config.gz” is not a real file, it lives in RAM, and is a reflection of the kernel publishing its configuration):
zcat /proc/config.gz | grep -i wireguard

Many kernel features can be built as a module. Some cannot. You’d try to build this as a module if possible, and then install is a simple file copy. The main kernel install (integrated features, versus the modular features of a kernel module) can be simple, but usually involves also building and installing all modules. Often, install instructions use flash to install the feature/driver, but this is not necessarily needed. It depends.

When you have kernel source and want to add a module, then you have to start with the existing kernel configuration if you want to build a compatible module or a new kernel which stands a chance of using the existing modules. Then you use a kernel feature “menu editor” which understands dependencies to change the configuration by adding just your CONFIG_WIREGUARD. If you can use the “m” key to enable this, then it is possible to build as a module. This simplifies life. If not, then you must use the “y” key to enable as an integrated feature, and you should then consider building both the kernel Image file and the modules and installing it all (this might not be needed, but if a feature is so invasive that it cannot be built as a module, then everything must be rebuilt; sometimes the author of the code just didn’t add the content for module loading).

The release version of JetPack/SDK Manager (the flash frontend GUI) is tied to the L4T release (L4T is what actually flashes, and is pure Ubuntu plus NVIDIA drivers). You can see your current L4T release with:
head -n 1 /etc/nv_tegra_release

You can find documentation and kernel source for building kernels and modules here:

The instructions there for kernel customization are the official ones. Follow those for build. Instead of flashing, ask here for where to copy files instead of flashing (for when that is possible; this is not always possible, and sometimes flashing is the better choice).

More information about configuration and build are here, although it tends to be about native build on the Jetson rather than cross compile on the host PC (which is what official instructions are for):

Note that the software you are interested makes calls to drivers in the kernel by way of the wg0 interface. The kernel driver makes it possible to have that interface. After that it is a matter of configuration. Perhaps configuration will be easy, or perhaps difficult, but without the kernel driver you cannot succeed.

1 Like

Thank you

@mjau I just want to confirm that I was able to re-build the kernel with Wireguard enabled.
Thank you!
Now zcat /proc/conf.gz | grep WIREGUARD returns CONFIG_WIREGUARD=y
To do this I followed the steps of Building the Kernel
To sync the Kernel Source you need to Download the BSP

The way to enable WIREGUARD is to edit tegra_defconfigprior to executing nvbuild.sh just like you said.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.