Kernel header/source problem on Xavier AGX

I’m trying to compile Wireguard on a Xaveir AGX device. However the following error is reported when I try to build the kernel module:

$ make -C wireguard-linux-compat/src -j$(nproc)
make: Entering directory '/home/imperiumdrive/javad/wireguard/wireguard-linux-compat/src'
make[1]: Entering directory '/home/imperiumdrive/javad/wireguard/wireguard-linux-compat/src'
make[1]: *** /lib/modules/4.9.253-tegra/build: No such file or directory. Stop.
make[1]: Leaving directory '/home/imperiumdrive/javad/wireguard/wireguard-linux-compat/src'
Makefile:26: recipe for target 'module' failed
make: *** [module] Error 2

I found this thread that works on Jetson Nano, but not on Xavier AGX

Please provide the following info (check/uncheck the boxes after creating this topic):
Software Version
DRIVE OS Linux 5.2.6
DRIVE OS Linux 5.2.6 and DriveWorks 4.0
DRIVE OS Linux 5.2.0
DRIVE OS Linux 5.2.0 and DriveWorks 3.5
NVIDIA DRIVE™ Software 10.0 (Linux)
NVIDIA DRIVE™ Software 9.0 (Linux)
other DRIVE OS version

Target Operating System

Hardware Platform
NVIDIA DRIVE™ AGX Xavier DevKit (E3550)
NVIDIA DRIVE™ AGX Pegasus DevKit (E3550)

SDK Manager Version

Host Machine Version
native Ubuntu 18.04

This forum is exclusively for developers who are part of the NVIDIA DRIVE™ AGX SDK Developer Program. To post in the forum, please use an account associated with your corporate or university email address. This helps us ensure that the forum remains a platform for verified members of the developer program. Thanks.

If you want to ask question for Jetson AGX Xavier platform, please open topic at Latest Jetson & Embedded Systems/Jetson AGX Xavier topics - NVIDIA Developer Forums to get the support. Thanks

OK, Thanks,
Please delete this thread

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