Hi There!
I am new to embbeded linux. I want to edit a device tree file .dts in order to fix a bug on my system.
I read lots of articles, and did the Toradex Webinar on Device Trees.
my setup is a verdin board together with a dahlia carrier board.
Torizon:[upload|cuyCWoKWnJKtTcHVn+dc/lTxTKU=]
Kernel:
[upload|zlei15BuV4laX+y8ftRClLarBtM=]
I just followed the Quick Start Guide Quick Start Guide to set my system up.
I don’t understand the folowing:
1.) why are there multiple dtb directories on my system?
[upload|vOymJTb/m5/XUVljvJJMZXqw568=]
2.) why is there no dts directoriy?
[upload|Ga5IqI2EjjBzmStMS3aOFPc+oiY=]
3.) I was looking on the toradex linux git repo website to find a .dts for my setup. Somehow my Filesystem structure is not the same like the one on git (e.g i don’t have an arch directory)? Why?
**4.) The Toradex Git website is for apalis and colibri modules, i couldn’t find any for verdin modules?
Can you tell me where to look? **
Thank you very much for taking the time to read this. If these questions appear stupid or too easy to you i am sorry. I honestly spent a lot of time trying to figure the stuff out myself. My problem is that for every question i try to answer i am getting 2 more. I feel like i opened pandoras box. Thanks for helping me
Have a nice day
Hi @tadegiac,
To change Device Tree files for a given device with Torizon, we recommend you to use the TorizonCore Builder, which will compile the sources in a given Development Computer, not in the Target development board/module.
It’s not a good practice to compile sources directly in the embedded target device. Always use your computer for it.
Please have a look at this article:
So, answering 1) and 2):
That’s why you see a bunch of DTB directories, which are the compiled Device-Tree Blobs, but not the DTS, which are the Device Tree Sources, on the target embedded device.
There are multiple DTBs due to the OSTree reference mechanism, which is part of TorizonCore.
3):
Again, I think your “misunderstanding” is about “where” to develop:
- When you are on target (the embedded module), things are already compiled, you’ll not see the sources.
- You need to setup your environment for development, like instructed here Build U-Boot and Linux Kernel from Source Code. But that does not apply for TorizonCore, only for Yocto BSP Builds.
4):
That’s wrong, there are all the references for Verdin there. Search for “verdin” here, for example.
Best regards,
André Curvello.
Hi @tadegiac,
Just wanted to clear up a few things.
There are multiple devicetree files on my system due to the “OSTree reference mechanism”, right?
By default we ship our software with multiple device trees. This is because we have multiple carrier boards and sometimes a different device tree is required fore each. On top of that if you have done updates with OSTree then there might be multiple device trees revisions of the “same” device tree. But if you haven’t done any updates then there should only be 1 revision of each device tree by default.
So if i want to change the device tree to activate some hw module like rpmsg, can i just exchange the .dtb files in the /boot directory path? Or should i try to use the OStree mechanism to “update my devicetree?”
You technically can just replace the binary on the device then reboot to reload it. However I personally wouldn’t recommend this. Typically you always want to build both the kernel and device tree in sync. By building them stand-alone like this you might risk them falling out of sync. Which is why we usually suggest Yocto since it builds everything together and keeps the version of everything in sync.
You can also do OSTree updates but usually this comes later in development.
Well I don’t want to mess with Yocto BSP builds or opend Embedded.
As suggested by André the alternative would be using our TorizonCore Builder tool. It does a decent job of making sure the versions of things match properly.
Best Regards,
Jeremias
Hi @andrecurvello.tx
Thank you very much for your answers, you really helped me out! Sorry for the late answer, i didn’t mean to be rude or ungrateful.
1.)There are multiple devicetree files on my system due to the “OSTree reference mechanism”, right? So if i want to change the device tree to activate some hw module like rpmsg, can i just exchange the .dtb files in the /boot directory path? Or should i try to use the OStree mechanism to “update my devicetree?” Could i do both?
2.)Alright, only the compiled files are on my system, got it, thank you.
3.)Well I don’t want to mess with Yocto BSP builds or opend Embedded. I was just asking because i wanted to modify my devicetree. Good to know that now.
4.)Thank you very much for the link!! I was looking for that, it helped me really out !!!
Thank you 1000 times for your help! I really appreciate it!
Have a nice day