Now we know how to read a device tree file and how to manage it in userspace. In this recipe, we will see how we can extract the configuration settings it holds within the kernel.
Getting application-specific data from a device tree
Getting ready
To do our job, we can use all the data stored in the DTB to boot our ESPRESSObin and then use the ESPRESSObin as a system test.
As we know, ESPRESSObin's DTS file is stored in kernel sources at linux/arch/arm64/boot/dts/marvell/armada-3720-espressobin.dts or it can be extracted from the running kernel by executing the dtc command as presented in the following code:
# dtc -I fs -o espressobin-reverted.dts /proc/device-tree/
Now let's take this file apart since we can use...