I would like to use the SPI device /dev/spidev0.0 inside my container. But sadly Nvidia does not support these in the base image by default. Therefore users needs to modify their device tree in order to access the /dev/spidev0.0 device.
Any clues on how i could modify the the BalenaOS for the Jetson Nano accordingly?
Here is a great GitHub project that describes how the device tree can be modified.
Furthermore eLinux describes it in more detail for the similar TX1 station
It seems like the tx-2 has already a patch in place. So the changes probably need to be made similarly. Sadly i have only a rough understanding of the yocto project, therefore i highly appreciate some help
I’m sorry but it’s unclear which similar changes need to be made. spi0 is already available on the jetson-nano. Is this the board you’re using? what device is still missing when using balenaOS?
Hmm, i will flash a fresh image provided by balena.io maybe i was just running an old prebuild OS and the yocto toolchain provides something different.
Furthermore, I build a fresh balena OS image yesterday with the yocto tool chain and i could not find any /dev/spi* device when i used ssh to access the host system on the Jetson Nano.
Its running
SUPERVISOR VERSION: 10.3.7
OS VERSION: balenaOS 2.45.1+rev3
In order to get it working with the stock Nvidia image i needed to do a couple of changes in the device tree. Nvidia uses the default SPI GPIOs (similar to the Raspberry PI SPI GPIOs) for a different purpose and therefore changes to the device tree are needed.
I used the changed device tree in order to create a patch in the yocto build pipeline. Similar to what you did for the JN30B board (Jetson Nano distribution), but the build fails. As a side note it fails for a fresh repo clone for the JN30B, too. Therefore i am confident, that the approach might work, but my setup might be broken
We are using the Jetson Nano 180-13449-DAAF-A02 dev board. The one that is available in Europe and can be purchased through nvidia resellers such as silicon highways.
Hi Frederic, I was just looking through the Forums, and found this great news! I am glad to see you got this working, and thanks for submitting a PR, we’ll review it and let you know the results.
I referenced the patch in layers/meta-balena-jetson/recipes-kernel/linux/linux-tegra_%.bbappend by appending it to the SRC_URI
Since it is kind of urgend for us to fix this quickly i would highly appreciate, if someone could guide me into the right direction on how to reference the c lib correctly.
9+gitAUTOINC+3dcbed5d27-r0/recipe-sysroot-native/etc/quiltrc push' exited with 0 Output:
Applying patch 0001-spi-patch-linux-drivers-gpio-tegra.patch
can't find file to patch at input line 4
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff a/drivers/gpio/gpio-tegra.c b/drivers/gpio/gpio-tegra.c
|--- drivers/gpio/gpio-tegra.c
|+++ drivers/gpio/gpio-tegra_new.c
--------------------------
No file to patch. Skipping patch.