[Solved] How to build my very own device tree (and if I need to)

Priya Bansal Asks: How to build my very own device tree (and if I need to)
Let me preface this by saying I don’t know much about device trees. I do know a bit about ATAGs, since I’m working with this operating system that currently only uses ATAGs.

I’m modifying the operating system to work on the Raspberry Pi 3s, and the stack address that the kernel gets from the ATAGs seems to be off, since I can’t, for example, print out what’s in saddr[0]. I’ve found that ATAGs are becoming obsolete, so instead of figuring out what’s wrong with the ATAGs, I’m thinking about switching the OS over to using device trees.

Problem is, I don’t even know where to start. My team tried adding a .dtb file taken from here: Raspberry Pi 3 UART Overlay Workaround to our SD card but said it “didn’t work.” To be fair, we had no idea what we were doing when we added that file. We hadn’t modified the operating system to work with device trees, and we were focusing on a different problem when we added that file (so the thing that “didn’t work” was that we couldn’t get any input from PL011 UART driver, and there are so many things that could have caused that to not work).

So if I want the operating system to use device trees, where do I start? Do I have to make my own or is there one already available that I can use? Are dtb files specific to specific platforms, operating systems, or processors? I can’t find much documentation for this online, so if you could give me something to read that’d be great.

Ten-tools.com may not be responsible for the answers or solutions given to any question asked by the users. All Answers or responses are user generated answers and we do not have proof of its validity or correctness. Please vote for the answer that helped you in order to help others find out which is the most helpful answer. Questions labeled as solved may be solved or may not be solved depending on the type of question and the date posted for some posts may be scheduled to be deleted periodically. Do not hesitate to share your response here to help other visitors like you. Thank you, Ten-tools.