How to compile the Device Tree Source Code

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to compile the Device Tree Source Code

4,987 Views
adityanagal
Contributor III

Hi ,

I am working over IMX6 quad based target board , How to compile the Device Tree Source code . Which compiler to use ,

as per my understanding , device tree has the system hardware information  and has the hardware dependent code . How to compile this.  Kindly suggest.

Regards,

Aditya Nagal

0 Kudos
2 Replies

1,952 Views
Carlos_Musich
NXP Employee
NXP Employee

Hi Adytia,

- If you are building an image using Yocto the default image must provide the dtb files.

- If you want to build a specific file you can use the following commands

$ cd <build dir>/tmp/workshared/<machine>/kernel-source/
$ export ARCH=arm
$ export CROSS_COMPILE=arm-linux-gnueabihf-
$ make imx_v7_defconfig
$ make file_name.dtb

- Or

$ cd <build dir>/tmp/workshared/<machine>/kernel-source/
$ ./scripts/dtc/dtc -I dts -O dtb -o ./file_name.dtb <path>/file-name.dts

Please note that dts is the file with the hardware description in code while dtb is the compiled binary file.

Something similar is odne in chapter 6 here: https://community.nxp.com/docs/DOC-332807 


Regards,
Carlos

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

1,456 Views
VinithNama
Contributor III

The Above Linux script is throwing errror  make:*** No rule to make target 'imx_v7_deconfig'. stop

0 Kudos