DTS & Ar71xx->Ath79


First, why DTS file is needed ? (there is no such concept in a PC under Linux, why so for OpenWrt)
Second, where to get a proper documentation of the DST file (objectives, syntax, how to , etc..)
Third, why none of my attemps of creating a ath79 (based on DTS) support does boot, whereas the ar71xx counterpart boots very nicely ?

Thank you

Try the wiki


1 Like

Needed because there is no standard for hardware self-discovery and BIOS like there is on the x86 platform. Replaces mach files. Linux thing, not an OpenWrt thing.

Your last question? Well, given the information provided, “it’s probably wrong” is the best answer possible.

@mbo2o : partitions is the really easy part.
the problem comes with other parameter

is there a proper documentation somewhere ?

I can tell you didn’t read the linked page or even look at it. The same way you didn’t read the source you were spoon fed in the other thread.

There is much more on that page than the URL indicates.

1 Like

@jeff : please clarify
WHere is described the syntax ad all the parameters of each paragraph in teh DTS ?

The spec is linked on that page, as well as some explanatory pages and tutorials from various sources.

The explanation of each "section" is, as described on that page

Linux binding defintions, in source or online at https://www.kernel.org/doc/Documentation/devicetree/bindings/

For more details on specific devices, looking at what wulfy23 suggested to you

may help you.

I am probably entirely dumb, but the command from wulfy23 gives me a list of files (thank you, but yes, I am able to copy paste existing files, and I did that already for the PR pending, but it obviosuly does not work) ( see https://github.com/openwrt/openwrt/pull/1966 for instance )

Still wondering where do all the syntax of the DTS comes from ? adn all the numbers ? Are these coming from the sky ? :wink:

Is there a way to generate a DTS file from a running hardware ?

The numbers come from the hardware/firmware configuration of the device itself. You need to know/guess what they are, either from original sources or from similar devices. Things like mach files, DTS files are where they might be found. That is why wulfy23 gave you the list.

The only "easy" way I know to get it from a running device is if it is already running a kernel with a dtb. The device tree is then exposed at /proc/device-tree and dtb (on another system) can de-compile it.

Again, the syntax is called out in the linked documents.

I found the syntax thanks
Now, how to know in advance the DTS file requires such or such paragraph ?
For the value of the fields, if no /proc/device-tree, how to determine them (while(!ok) { try(random); }) ?

while devicenotwork {

read error
find oldconfig && insertinto newconfig

    check newsyntax();


Already spent hours doing that without any results