What is the most up-to-date reference for understanding the device tree binary and how it is built?

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

What is the most up-to-date reference for understanding the device tree binary and how it is built?

跳至解决方案
1,788 次查看
EdSutter
Senior Contributor II

I'm running with SABRESDB in preparation for my custom hardware.

My custom hardware core is similar to SABRESDB; but I still wanna make sure I know how to build/modify the .dtb file.

I'm currently reading through the kernel's Documentation/devicetree/usage-mode.txt and also http://devicetree.org/Device_Tree_Usage,

are these documentation sources the correct place to be reading up on the FDT stuff used with iMX6/SabreSDB or is there

additional/other places to get better acquainted with this?

Thanks in advance,

Ed

EDIT---

Perhaps a more fundamental question is: will I need to modify the .dts file for custom iMX6 hardware or is this file something that describes the SOC/CPU and its IO independent of the circuitry around the SOC?

标签 (1)
0 项奖励
回复
1 解答
911 次查看
fabio_estevam
NXP Employee
NXP Employee

Ed,

A .dts file describes a particular board. You can start with imx6qdl-sabresd.dtsi, for example and adapt it to your own board.

You can see how other mx6  boards are supported in device tree: ls -al arch/arm/boot/dts/imx6*

Regards,

Fabio Estevam

在原帖中查看解决方案

0 项奖励
回复
3 回复数
912 次查看
fabio_estevam
NXP Employee
NXP Employee

Ed,

A .dts file describes a particular board. You can start with imx6qdl-sabresd.dtsi, for example and adapt it to your own board.

You can see how other mx6  boards are supported in device tree: ls -al arch/arm/boot/dts/imx6*

Regards,

Fabio Estevam

0 项奖励
回复
911 次查看
EdSutter
Senior Contributor II

Fabio,

Ok, I've been looking at this since I posted the question.  I see the .dts file is processed by 'dtc' (device-tree-compiler i assume?)

to generate the .dtb file.  Does this binary translate into runtime initialization in the kernel somewhere?

One other question...

I noticed an option in kernel menuconfig: "Use appended device tree blob to zImage (EXPERIMENTAL)".

Does this do what it implies; thus eliminating the need to download the separate .dtb file and using the 3-argument bootm command?

Thanks much,

Ed

0 项奖励
回复
911 次查看
fabio_estevam
NXP Employee
NXP Employee

Hi Ed,

Yes, when you run "make imx6q-sabresd.dtb' , the dts file is converted to the dtb binary.

Just replied in more details about the appended device tree in another thread.

Regards,

Fabio Estevam

0 项奖励
回复