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

Overview

linux-devicetree-flow.png

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.

Prerequisites

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

Procedure

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):
$ ~/intelFPGA/17.1/embedded/embedded_command_shell.sh
$ cd ~/a10_soc_devkit_ghrd 

3. Run the Device Tree Generator
$ sopc2dts --input ghrd_10as066n2/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-2017 RocketBoards.org by the contributing authors. All material on this collaboration platform is the property of the contributing authors. Privacy.