@klutchell @acostach Re: this comment earlier:
Also importantly, if our kernel headers package is missing something we would love to know so we can fix them!
I am trying to adapt the out-of-tree Wireguard example to Jetson Nano myself. I get as far as this, and I believe the reason is some missing ARM (32 bit?) Xen hypervisor-related headers.
root@604da545312b:/build# make -C kernel_modules_headers M=$(pwd)/wireguard-linux-compat/src -j$(nproc)
make: Entering directory '/build/kernel_modules_headers'
CC [M] /build/wireguard-linux-compat/src/main.o
CC [M] /build/wireguard-linux-compat/src/noise.o
CC [M] /build/wireguard-linux-compat/src/device.o
CC [M] /build/wireguard-linux-compat/src/peer.o
In file included from ./arch/arm64/include/asm/dma-mapping.h:30,
from ./include/linux/dma-mapping.h:210,
from ./include/linux/skbuff.h:34,
from /build/wireguard-linux-compat/src/compat/compat.h:120,
from <command-line>:
./arch/arm64/include/asm/xen/hypervisor.h:1:10: fatal error: ../../arm/include/asm/xen/hypervisor.h: No such file or directory
#include <../../arm/include/asm/xen/hypervisor.h>
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ./arch/arm64/include/asm/dma-mapping.h:30,
from ./include/linux/dma-mapping.h:210,
from ./include/linux/skbuff.h:34,
from /build/wireguard-linux-compat/src/compat/compat.h:120,
from <command-line>:
./arch/arm64/include/asm/xen/hypervisor.h:1:10: fatal error: ../../arm/include/asm/xen/hypervisor.h: No such file or directory
#include <../../arm/include/asm/xen/hypervisor.h>
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ./arch/arm64/include/asm/dma-mapping.h:30,
from ./include/linux/dma-mapping.h:210,
from ./include/linux/skbuff.h:34,
from /build/wireguard-linux-compat/src/compat/compat.h:120,
from <command-line>:
./arch/arm64/include/asm/xen/hypervisor.h:1:10: fatal error: ../../arm/include/asm/xen/hypervisor.h: No such file or directory
#include <../../arm/include/asm/xen/hypervisor.h>
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
In file included from ./arch/arm64/include/asm/dma-mapping.h:30,
from ./include/linux/dma-mapping.h:210,
from ./include/linux/skbuff.h:34,
from /build/wireguard-linux-compat/src/compat/compat.h:120,
from <command-line>:
./arch/arm64/include/asm/xen/hypervisor.h:1:10: fatal error: ../../arm/include/asm/xen/hypervisor.h: No such file or directory
#include <../../arm/include/asm/xen/hypervisor.h>
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
compilation terminated.
compilation terminated.
make[1]: *** [scripts/Makefile.build:335: /build/wireguard-linux-compat/src/noise.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make[1]: *** [scripts/Makefile.build:335: /build/wireguard-linux-compat/src/main.o] Error 1
make[1]: *** [scripts/Makefile.build:335: /build/wireguard-linux-compat/src/device.o] Error 1
make[1]: *** [scripts/Makefile.build:335: /build/wireguard-linux-compat/src/peer.o] Error 1
make: *** [Makefile:1656: _module_/build/wireguard-linux-compat/src] Error 2
make: Leaving directory '/build/kernel_modules_headers'
When I look at that folder, all I see is the opcodes header:
root@604da545312b:/build# ls kernel_modules_headers/arch/arm/include/asm
opcodes.h
I am on v2.85.2+rev4
Is this something that can/should be included in the published headers batch, or am I trying to do something that is not supported?
Update: for the record, this incredibly hacky solution worked – fortunately only that hypervisor header is needed for Wireguard’s module to compile.
# Download missing header(s)
RUN mkdir -p kernel_modules_headers/arch/arm/include/asm/xen && \
curl -SsL -o kernel_modules_headers/arch/arm/include/asm/xen/hypervisor.h \
https://raw.githubusercontent.com/OE4T/linux-tegra-4.9/oe4t-patches-l4t-r32.6/arch/arm/include/asm/xen/hypervisor.h