Hi
How can I extract device tree blob build from yocto?
I have found *.dtsi files from under build/tmp -folder and want quickly test some dts setting and build new dtb with dtc compiler directly. Dtc does not understand C preprocessor directives so there must be some precompiler phase first? How can I call that preprocessor directly with proper defines?
Ari
Hello Ari Savolainen,
The .dsi generally contain SoC-level definitions.
To generate a .dtb (binary) file, so basically compiling, you would need to initialize the toolchain and then use:
make ARCH=arm dtbs
The device tree files, including the source files (.dts) are located in the case of our Yocto BSP on:
<BSP_DIR>/<BUILD_DIR>/tmp/work/<MACHINE>-poky-linux-gnueabi/linux-imx/3.14.28-r0/git/ach/arm/boot/dts
The following very informative document may also be of help.
https://community.freescale.com/docs/DOC-329664
I hope this information helps!
OK thanks, Here is (bash) command to do precompile dts files before calling dtc.
cpp -nostdinc -I include -undef -x assembler-with-cpp $SRC > $TMP
Hello Ari Savolainen,
You should be able to compile without the extra parsing - as long as you're using NXP's BSP.
However, I would recommend looking at the link below, where there is an option for the precompiling you're looking for.
arm - Device Tree Blob (binary) - Unix & Linux Stack Exchange
I hope this helps!