Hi Nvidia team,
I am currently developing an AGX Orin board based on Jetpack 6.0dp, and I found that the ‘/sys/class/gpio directory’ is missing. I added ‘CONFIG_GPIO_SYSFS=y’ in ‘arch/arm64/configs/defconfig’, but there is no ‘CONFIG_GPIO_SYSFS=y’ in the .config generated during compilation, and the generated Image still does not have ‘/sys/class/gpio’ after running. How should I configure it to generate ‘/sys/class/gpio’?
It also depends on other configs:
https://cateee.net/lkddb/web-lkddb/GPIO_SYSFS.html
Anyway, we don’t suggest using sysfs for controlling GPIO anymore, and we disable it on purpose on rel-36.
Users should use libgpiod instead.
Hi DaveYYY,
Thank you for your reply. The reason I use sysfs to control gpio is that our product has widely adopted this method. If we update to libgpio, it will bring a lot of porting workload.
I followed the instructions in the above link, added CONFIG_EXPERT=y, CONFIG_SYSFS=y, and CONFIG_GPIO_SYSFS=y in defconfig, and recompiled. Then /sys/class/gpio appeared, but there were a lot of errors (the attachment file) during system startup. Are these errors caused by the modifications to defconfig? If so, how can I solve this problem?
log_with_gpio_sysfs_on.log (168.3 KB)
Did you also install kernel modules after kernel compilation?
No, I didn’t do that at first. Then I installed the kernel modules, but still got the same errors.
And I use the original Image (no CONFIG_EXPERT=y, CONFIG_SYSFS=y, and CONFIG_GPIO_SYSFS=y ) and the new compiled kernel modules, still got the same errors.
Hi,
Please make sure you are following every step mentioned in the document:
https://docs.nvidia.com/jetson/archives/r36.2/DeveloperGuide/SD/Kernel/KernelCustomization.html
You may also do this to strip these modules of unused symbols, so file sizes get shrunk largely:
sudo su
find Linux_for_Tegra/rootfs/usr/lib/modules/($uname -r)/ -iname *.ko | xargs /bin/aarch64-buildroot-linux-gnu-strip’ --strip-unneeded
In case you are flashing to NVMe/USB, please also do this, or you may fail to mount the rootfs upon booting:
Hi DaveYYY,
I followed every step mentioned in this document:
https://docs.nvidia.com/jetson/archives/r36.2/DeveloperGuide/SD/Kernel/KernelCustomization.html
And the symbol errors were less than before,but still got some like:
[ 12.967398] nvidia: Unknown symbol fget (err -22)
[ 12.967440] nvidia: disagrees about version of symbol fd_install
[ 12.967441] nvidia: Unknown symbol fd_install (err -22)
[ 12.967662] nvidia: disagrees about version of symbol iterate_fd
[ 12.967663] nvidia: Unknown symbol iterate_fd (err -22)
and the GUI can not displayed on the monitor (the hardware I used was AGX ORIN Dev kit).
Any advice ? Thanks.
Better learn how to build kernel first.
I’m sure following steps on the document will do it.
We don’t support anything about GPIO sysfs on rel-36, and this is the work you have to do.
Hi DaveYYY,
I tried to build the kernel twice, with same steps from the link you gave. The first time I let CONFIG_EXPERT=y, CONFIG_SYSFS=y, and CONFIG_GPIO_SYSFS=y, and got "nvidia:… " errors while system booting. The second time I deleted the CONFIG_EXPERT=y, CONFIG_SYSFS=y, and CONFIG_GPIO_SYSFS=y, and there wasn’t any “nvidia:…” errors while system booting.
Dose this mean the steps I followed was correct, and the errors were caused by the compilation options?
Maybe you can compare the default kernel config of K5.10/JetPack 5 and K5.15/JetPack 6 to know what is really required.
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.