8

In linux, what is difference between Open firmware device tree and flattened device tree. How to identify the linux kernel is using which Device tree OF DT or FDT.

Spyder
  • 894
  • 2
  • 14
  • 18

2 Answers2

19

From here:

Open Firmware is a firmware interface specification designed by Sun in the late 1980's, and ported to many architectures. It specifies a runtime OS client interface, an cross platform device interface (FCode), a user interface, and the Device Tree layout for describing the machine.

FDT is to Open Firmware what DSDT is to ACPI. The FDT reuses Open Firmware's established device tree layout. In fact, Linux PowerPC support uses the same codebase to support both Open Firmware and FDT platforms.

As you can see, Flattened Device Tree (FDT) is a part of Open Firmware. So basically "Open Firmware Device Tree" and "Flattened Device Tree" is the same thing.

Take a look at drivers/of/base.c. It was added back in 1996, but functions from it are used for nowadays ARM device tree. So FDT is just a part of OF. That's why all functions for device tree begin with of_ prefix.

If you need more details, next articles may be useful:

Community
  • 1
  • 1
Sam Protsenko
  • 14,045
  • 4
  • 59
  • 75
0

From the same link posted above

I see that

Other names for Flattened Device Tree (FDT) are "binary blob" and ".dtb". 

dtc (Device Tree Compiler) - converts between the human editable device tree source "dts" format and the compact device tree blob "dtb" representation usable by the kernel or assembler source. dtc is also a dtb decompiler. 

And device tree is human readable source in the format .dts or .dtsi

Hope this is more clear and right.

thanks.

  • Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Dec 04 '22 at 17:08