**If your OS doesn't support flattened device trees, you must add the support from scratch.** 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][1].
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][2] , along with people versed in OS development for the Raspberry Pi.


**Most documentation on device tree will be for Linux.**

 - official [Raspberry Pi documentation][5] 
 - official [device tree specification][6] courtesy of devicetree.org
 - [source files (.dts)][3] of Raspberry Pi-specific DTB files: [Example][4]
 - [the device tree compiler and flattened device tree library (libfdt) project][1]


  [1]: https://git.kernel.org/pub/scm/utils/dtc/dtc.git
  [2]: https://www.raspberrypi.org/forums/viewforum.php?f=72
  [3]: https://github.com/raspberrypi/linux/tree/rpi-4.9.y/arch/arm/boot/dts
  [4]: https://github.com/raspberrypi/linux/blob/rpi-4.9.y/arch/arm/boot/dts/bcm2708-rpi-b.dts
  [5]: https://www.raspberrypi.org/documentation/configuration/device-tree.md
  [6]: http://www.devicetree.org/specifications-pdf