Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

1. What problem were device trees invented to solve? (2 points) 2. What register

ID: 3741653 • Letter: 1

Question

1. What problem were device trees invented to solve? (2 points) 2. What registers are used in load Linux when device trees are used? (2 points) 3. List the advantages of using a device tree (2 points). 4. Is a device tree capable uboot necessary to use device trees and why or why not? 5. What is the formal definition of the device tree? (3 points) 6. Think about the syntax of a device tree, what does every device tree have? 7. Where is the device tree binary on your pine64? 8. Is the device tree used to describe the hardware resources and if those resources will be used or not Find the URL of the device tree source files for the pine64 board by longsleep (hint: on Github.com https://github.com/longsleep/linux-pine64/). 9.

Explanation / Answer

What problem where device trees invented to solve?

Linux kernel requires description of hardware. Before device tree, all these information use to be set in a huge cluster of board files. The solution is device trees.

The reason for the existence of Device Tree in Linux is to provide a way to describe non-discoverable hardware. This information was previously hard coded in source code.

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.

Device Tree is used to dynamically describe the hardware to the kernel. This makes the kernel a multi-platform binary.

Device Tree collect the platform specific details, and makes the kernel re-usable across platforms.

What registers are used in load Linux when device tress are used?

Register R2(ARM).

The bootloader passes the DTB(Device tree blob ) address through R2

List the advantages of using a device tree

Easy to change the configuration of the system without recompiling the source code.

Support for new hardware can be easily added

Can reuse existing device tree include files

Provides easy to read and understand descriptions of hardware

Is a device tree capable uboot necessary to use device trees and why or why not?

Not necessary

Linux kerenel maintain their DTS files. Uboot will only be concerned about few aspects of the DTS such as arch type, memory, storage mechanism etc;

The u-boot source uses the u-boot DTB while Linux uses Linux DTB when kernel boots

What is the formal definition of the device tree?

A device tree is a tree data structure with nodes that describe the physical devices in a system