Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How do DTS, DTC and DTB understand

2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/01 Report--

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!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report