Device tree file

Hi all,

I’m new here and not used to Yocto. I hope you understand.

I’m currently working on a colibri IMX6 following this reference: Build a Reference Image with Yocto Project/OpenEmbedded | Toradex Developer Center

After running:
$ mkdir ${HOME}/oe-core
$ cd ${HOME}/oe-core
$ repo init -u git://git.toradex.com/toradex-manifest.git -b kirkstone-6.x.y -m tdxref/default.xml
$ repo sync
$. export

I expected to find the .dts files inside the /layers folder.

However, I was mistaken. I found them only after uncommenting: MACHINE ?= “colibri-imx6” and ‘bitbake core-image-minimal’.
They were located in:
build/tmp/work-shared/colibri-imx6ull/kenel-source/arch/arm/boot/dts

My questions are:
i) did it download several dts files to the ‘tmp’ folder and pick one of them to use it?
ii) which dts file am I using?
iii) to modify a dts file, should I pick such as “imx6dl-colibri-eval-v3.dts” from /tmp and use it?

thanks!

Hi, I’m the Toradex AI Assistant. I’m in early beta, and I would appreciate your feedback.
The Toradex Support team will follow up with you shortly!

Did you like my answer?

:+1: :-1:


Hello,

It’s great to hear you’re diving into the world of Yocto and working with the Colibri iMX6. Let’s address your questions one by one:

i) Yes, during the build process, Yocto downloads and compiles several Device Tree Source (.dts) files. The specific .dts file used for your build is determined by the MACHINE configuration (colibri-imx6 in your case) and any customizations you’ve made in your layer configurations or local.conf file. The build process generates these files in the tmp directory as part of its task to compile the kernel and its associated Device Tree Blobs (.dtb).

ii) The .dts file you are using is typically specified in the machine configuration (conf/machine/colibri-imx6.conf in the meta-layer for your device). This file includes a line that specifies the default Device Tree to be used for the build, often through a variable like KERNEL_DEVICETREE. This variable points to the .dts file(s) that will be compiled into .dtb files and included in your image. To confirm which .dtb file is being used, you can look at the build logs or the output directory where the .dtb files are placed after compilation.

iii) To modify a .dts file, it’s not recommended to directly edit files in the tmp directory, as these changes will be lost the next time you run a clean build. Instead, you should create a custom layer or use an existing one where you can add or modify .dts files. You can then use the bbappend file mechanism to override the default Device Tree file with your customized version. This involves copying the .dts file you wish to modify into your layer, making your changes there, and then instructing the build system to use your modified version instead of the default one. This approach ensures your changes are preserved and version-controlled.

For detailed guidance on creating a custom layer and using bbappend to modify a .dts file, the Yocto Project documentation and Toradex developer resources provide comprehensive instructions and examples.

Best regards,
Toradex AI Assistant

Please, also check if these links can help you solve your problem:

Basic Linux Commands | Toradex Developer Center.

Hi @sami ,

Did @ToradexAI provide enough answers to answer your doubts?

Best regards,
Daniel Morais