We have upgraded our project from Jetson 35.4.1 to 36.3, including new rootfs and new bootlin toolchain from the download page.
Moving from Linux kernel 5.10 to 5.15 has deprecated the sysfs GPIO interface (/sys/class/gpio/export etc). We’ve updated our code to use the new “GPIO Character Device Userspace API”, we are using version 2 of the API which was added to the Linux kernel in version 5.10 according to the documentation (GPIO Character Device Userspace API — The Linux Kernel documentation).
error: 'GPIO_V2_GET_LINE_IOCTL' was not declared in this scope; did you mean 'GPIO_GET_LINEINFO_IOCTL'?
Headers that do support GPIO user space API v2 can be found in the rootfs and kernel source code from the download page so it is possible to run applications using the API on the board, just not build them using the toolchain.
Do you have an updated bootlin toolchain archive available?
Yes, an updated version of the bootlin toolchain would be very good.
There are ways to work around the problem, e.g. by using headers from the generated board;
symlinking from rootfs instead of the included sysroot folder and also subfolders in usr/include/aarch64-linux-gnu folder into usr/include (like asm, sys, gnu, and bits), but it’s hacky and doesn’t work well with our build system.
I’ve checked using gcc toolchain 11.3 in Jetson Linux Toolchain and the steps in Kernel Customization to build kernel image/dtb can work as expected on AGX Orin with R36.3.0.
Yes, there are workarounds, and we did end up compiling our own toolchain.
However the toolchain (Bootlin Toolchain gcc 11.3) that is available on Jetson Linux | NVIDIA Developer does not have kernel header files matching the rootfs available on the same page (missing support for GPIO API v2).
So it would be good if you could update that. :)