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 ?
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.
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 ?
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); }) ?