Book Image

Embedded Linux Projects Using Yocto Project Cookbook

By : Alex Gonzalez
Book Image

Embedded Linux Projects Using Yocto Project Cookbook

By: Alex Gonzalez

Overview of this book

Table of Contents (13 chapters)
Embedded Linux Projects Using Yocto Project Cookbook
Credits
Foreword
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Debugging device tree issues


This recipe will show some techniques to debug common problems with the device tree.

How to do it...

As mentioned before, problems with the syntax of device tree files usually result in the kernel crashing early in the boot process. Other type of problems are more subtle and usually appear once a driver is making use of the information provided by the device tree. For both types of problems, it is helpful to be able to look not only at the device tree syntax file, but also at the device tree blob, as it is read by both U-Boot and the Linux kernel. It may also be helpful to modify the device tree on the fly using the tools that U-Boot offers.

How it works...

Looking at the device tree from U-Boot

The U-Boot bootloader offers the fdt command to interact with a device tree blob. On the Wandboard's default environment, there are two variables related to the device tree:

  • fdt_file: This variable contains the name of the device tree file used

  • fdt_addr: This variable contains...