Replies: 1 comment 3 replies
-
With the L4T R32 series, the answer may depend on which SoC you're targeting, but NVIDIA has a way to modify the device tree at boot-time by including an EEPROM either on your camera module or on your carrier board. It's somewhat documented in the developer guide. I used it on a TX2-based project some year back to handle differences between revisions of our hardware, and it worked fine. Otherwise you could probably hack cboot (for T186/T194) or u-boot (for T210) to use some other mechanism to distinguish between your different hardware models and make modifications in a similar way to NVIDIA's 'plugin manager'. |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello,
I am using a custom distribution based on "kirkstone-l4t-r32.7.x".
I am using A/B layout with mender.
I use a custom hardware that provides a connector where cameras can be plugged.
The camera and the respective serializer / deserializer needs to be part of the device tree.
The machine itself is always the same the device trees just differ what cameras are connected.
I could define different machine configurations and every one uses its separate device tree but I am thinking of another approach.
I already created a device tree without camera specific parts and an overlay with the camera relevant parts.
The base device tree is setup in the Yocto machine configuration and built. I flashed the image and all is working -- for sure without the camera specific parts.
Now, for further testing I used the extlinux.conf mechanism to provide kernel + initrd + device tree from file system.
First I setup the configuration, put the files into the FS and restarted the system to check if the extlinux.conf mechanism works.
It did.
After that I used
dtc -O dtb ... overlay-with-camera-stuff.dts to generate a dtbo from my DT overlay source file.
and ftdoverlay -v -i the-dtb-created-by-yocto-build.dtb -o dtb-with-cam.dtb dtbo-generated-by-command-above.dtbo
I copied that file on the target and modified the extlinux.conf to use that device tree.
After rebooting the system all is working as expected and also the cameras are working.
My next test has been to load the overlay at runtime using a kernel patch that can be found at several places that provides a mechanism in configfs. Loading the overlay works, also the modules are loaded automatically but the v4l devices are not created. As this mechanism is not supported by mainline kernel and also have known bugs, I would prefer another mechanism.
What I am thinking about:
Questions:
I know that writing to the DTB and a power loss is critical but I assume the time slot is very short.
Are there better approaches without generating a machine for every possible camera variant?
-- update --
I read https://github.com/OE4T/meta-tegra/wiki/Using-device-tree-overlays but for "Runtime application of overlay" the used L4T version is to old.
Beta Was this translation helpful? Give feedback.
All reactions