Generating the Linux Device Tree
How to generate the device tree source and how to compile it to a device tree blob file that Linux needs

28 Oct 2016 - 07:15 | Version 5 |



Important Note: This page refers to the Linux Device Tree, that is required by Linux in order to boot. On Arria 10 there are two different Device Trees: one required by Bootloader (U-Boot) and this one, required by the Linux kernel.

Reference Information

For detailed information about the Device Tree Generator see Device Tree Generator User Guide.


The following items are required:
  • Host PC running Linux (CentOS 6.6 was used for testing)
  • Altera SoC EDS based on Release Tags


1. Compile the GHRD as described in Compiling the Hardware Design to obtain the .sopcinfo file. Or simply use the pre-compiled GHRD.

2. Start an Embedded Command Shell and go to GHRD folder (assumed here to be saved in the home folder):
$ ~/altera/16.1/embedded/
$ cd ~/a10_soc_devkit_ghrd 

3. Run the Device Tree Generator
$ sopc2dts --input ghrd_10as066n2.sopcinfo --output ghrd_10as066n2.dts  --board hps_a10_common_board_info.xml --board hps_
a10_devkit_board_info.xml --board ghrd_10as066n2_board_info.xml --bridge-removal all --clocks

This will generate the file ~/a10_soc_devkit_ghrd/ghrd_10as066n2.dts which a text representation of the Device Tree.

5. Use the Device Tree Compiler (dtc) to convert the device tree source to the binary format required to build Linux
$ dtc -I dts -O dtb -o socfpga_arria10_socdk_sdmmc.dtb ghrd_10as066n2.dts

This will generate the file ~/a10_soc_devkit_ghrd/socfpga_arria10_socdk_sdmmc.dtb required by Linux to boot.

Give us your feedback

© 1999-2018 by the contributing authors. All material on this collaboration platform is the property of the contributing authors. Privacy.