How to modify kernel DTB file

Deadly 提交于 2019-12-03 07:14:43

Why don't you generate new dtb?

DTB(Device tree blob/binary), is hardware database which represents the hardware components of the board.

U-boot pass the board information struct to the kernel, that is derived from the header file in U-Boot.

DTB is compiled by the special compiler that produces the binary in the proper form for U-Boot and Linux to understand.


DTC (Device Tree Compiler) it translates device tree file to the machine-readable binary that U-Boot and Linux kernel can understand.

The straightforward way to use DTC.

$ dtc -O dtb -o arm_board.dtb -b 0 arm_board.dts

to get the device tree in text from the dtb.

dtc -I dtb -O dts arm_board.dtb

board.dts is binary created by the above command. -O specifies the output format. -o flag is output file. -b 0 specifies physical boot CPU.

Then do

$ make ARCH=arm arm_board.dtb

Another approach might be just use make dtbs this will call dtc. arch/arm/boot/dts/Makefile lists which DTBs should be generated at build time This another way to compile it. make will put that in this location of kernel tree /arch/arm/boot/dts

Have a look at this Device Tree for Dummies

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!