Buildroot: how to modify device tree for custom board?
Asked Answered
P

1

5

I'm new to Buildroot system (I used Yocto before). I need to modify the device tree for my board, which is the best way to achieve that?

Thanks a lot, Simone

Pamulapan answered 8/11, 2021 at 10:26 Comment(1)
"I need to modify the device tree for my board ..." -- Avoid modifying the .dtsi files that describe generic hardware, such as the SoC. Since you didn't modify the SoC, there's no reason to modify its dtsi file. Make your changes to the .dts file (which describes the board), or consolidate your customizations in a new .dtsi file that is then included at the end of the .dts file. This takes advantage of the fact that the DT source is compiled in linear sequence, and you can redefine existing (or add/delete) nodes & properties in later statements.Winston
A
7

Make a copy of the dts (typically in board/<company>/<boardname>). Point to that dts in the "Out of tree custom DTS" menu entry (BR2_LINUX_KERNEL_CUSTOM_DTS_PATH) in the Buildroot menuconfig. Obviously, you need to build a kernel and enable the device tree option for this to work.

Amorphism answered 14/12, 2021 at 8:18 Comment(1)
sorry for the late answer, thanks so much! I remember that we managed to compile the kernel externally and then recreate the SD image using external crosscompiled files. However I think your solution is better and simplier if you want to keep the build in one place!Pamulapan

© 2022 - 2024 — McMap. All rights reserved.