You only need to think about adding Device Tree support under following conditions:
- you know how to write operating systems
- you are currently in the process of writing an operating system
- your operating system has to run on multiple different ARM devices, not only the Raspberry Pi
- your devices do not offer ACPI and have devicesperipherals which cannot be enumerated over an bus (unlike PCI and USB devices)
- you want to leverage code and work which is mainly Linux-focused
Device Tree was invented so that Linux users don't need to compile a different kernel for each different ARM board out there. The idea is that the same kernel reads different DTB files and loads the appropriate drivers instead. On the x86 platform Linux could rely on the high degree of standardization which simply doesn't exist in the ARM world.
So far i know the only operating systems using device tree are Linux and FreeBSD.
If your OS doesn't support flattened device trees, you must add the support yourself. DTB files are specific to a board and describe the CPU, memory map, on-board peripherals and in the case of the Pi things connected via GPIO too.
DTB files are compiled from DTS files via dtc, the device tree compiler. The dtc project also maintains libfdt , which can parse DTB files.
The most experience on ATAG parsing on the Pi is probably concentrated in the bare metal forum on raspberrypi.org , along with people versed in OS development for the Raspberry Pi.
Most documentation on device tree will be for Linux.
- official Raspberry Pi documentation
- official device tree specification courtesy of devicetree.org
- source files (.dts) of Raspberry Pi-specific DTB files: Example
- the device tree compiler and flattened device tree library (libfdt) project