Skip to content

Linux Devicetree

skravats edited this page Mar 17, 2022 · 22 revisions

In computing, a Device Tree is a data structure describing the hardware components of a particular computer so that the operating system's kernel can use and manage those components, including the CPU or CPUs, the memory, the buses and the peripherals.

Useful reference material for Device Tree implementation can be found here

This is not intended to be a guide to understanding the complexities of Device Tree usage. Please consult the references provided in this text to gain familiarity with this subject.

Specific Linux Device Trees are published by board providers and can be found in the linux/arch/arm/boot/dts directory.

The following steps assume the user has cloned the linux repository, checked out the altera_4.19 branch and setup the environment as described in the section on building the Kernel.

View and build the Device Tree

  1. View the arch/arm/boot/dts/socfpga_cyclone5_tei0022_arrow_ghrd.dts Device Tree.

     $ gedit /home/soceds/datastorm_daq/linux/arch/arm/boot/dts/socfpga_cyclone5_tei0022_03_arrow_ghrd.dts &
    

Make note of the hps_bridge from the HPS to the FPGA on line 213. This allows FPGA peripherals to be mapped to the Hard Processor System (HPS) map. The Cyclone V HPS Technical reference manual shows details of the bridges in sections 2.2 and 2.4. This design uses the Lightweight HPS-to-FPGA bridge for control plane access of FPGA slaves and the FPGA-to-HPS-bridge for data plane transfers from FPGA masters.

  1. Build the device tree blob

     $ make socfpga_cyclone5_tei0022_03_arrow_ghrd.dtb 
    

Next - Build Root Filesystem

Return - GSRD

Clone this wiki locally