Compiling with /proc/devicetree



WHich option at compilation time are necessary to have /proc/devicetree or equivalent under /sys/firmeare ?

Thank you



Are you already on a DTS-based target?

If you’re on ar71xx, as far as I know, you’d need to move to the DTS-based ath79 target to “reveal” the device tree.



actually trying to get it under a ar71xx to get the DTS file (otherwise, how to get it ???)



The device tree structure on a running system is an artifact of the DTB that was supplied to the kernel (and possibly any DTOs later applied). Kernels that use mach-based configuration (like the ar71xx target) don't generally have a DTB and don't know "what to make of it" if they were provided one.

"How to get [the DTS]?"

You need to either get lucky and be working on a carbon-copy of a board with a functional DTS, or through examining the mach files, DTS files of similar devices, looking at the boot logs under a running, functional, non-DTS kernel and those of your not-quite-complete DTS-based kernel.

If there were a trivial way to accomplish this, the thread you posted in, Porting guide ar71xx to ath79?, wouldn't have nearly 1000 posts and ar71xx would already be removed from master and v19.