Get the App
SLTechnology News&Howtos  ›  Internet Technology  › 

How do DTS, DTC and DTB understand

Shulou Source: shulou.com Published: 2022-06-01 02:56:29 11月14日 Update

Today I will show you how to understand DTS, DTC and DTB. The content of the article is good. Now I would like to share it with you. Friends who feel in need can understand it. I hope it will be helpful to you. Let's read it along with the editor's ideas.

In the current linux kernel, the device tree is used to manage resource allocation and module loading to reduce dependency. in the raspberry kernel system, the device tree is actually the description file of the hardware resource, representing the node of the hardware configuration, and each node can include child nodes and attributes. Device tree files are generally suffixed with .dts text files, that is, we often say DTS (Device TreeSource), the syntax is a bit like C language, but there are differences, we should pay attention to. For example, the following file is a DTS file

/ dts-v1/

/ include/ "common.dtsi"

/ {

Node1 {

A-string-property = "A string"

A-string-list-property = "first string", "secondstring"

A house property = [0x01 0x23 0x34 0x56]

Cousin: child-node1 {

First-child-property

Second-child-property =

A-string-property = "Hello, world"

}

Child-node2 {

}

}

Node2 {

An-empty-property

A-cell-property =; / * each number (cell) is a uint32 * /

Child-node1 {

My-cousin =

}

}

}

/ node2 {

Another-property-for-node2

}

Note here that 1.1 DTS files can contain other DTS files, such as / include/ "common.dtsi" in the image above; this is a bit like a header file in C language.

Then the DTS file is compiled by DTC (DeviceTree Compiler) and becomes a DTB (DeviceTree Blob) file.

For more information on the syntax and usage of DTS, you can refer to the booting-without-of.txt and usage-model.txt files in the kernel documentation. You can refer to the documentation in the bindings file for details on how the nodes and attributes in the device tree describe the hardware. The understanding and application of the device tree is also a difficulty. I hope everyone will understand and master it.

This is all about how DTS, DTC and DTB understand. For more information about how DTS, DTC and DTB understand, you can search the previous articles or browse the following articles to learn! I believe the editor will add more knowledge to you. I hope you can support it!

Tags: Files devices content nodes kernels that is articles more hardware attributes documents grammar language resources facets references good representatives dependencies suffixes Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno MySQL Shulou Tech Info MariaDB Shulou Information Microsoft