Skip to contentSkip to conversation

Which dts is being compiled?

DISCUSSION David Novak 3 participants 3 messages Oct 17, 2020 – Oct 18, 2020

lore
Share & tools
lore
#0 lore raw

Hi all. I've found the device tree files and I'm fairly certain I know which one is being used in out image, but I want to be certain.

What process is used by Yocto to determine which top level dts file to compile?

Thanks,
David

#1 lore raw

Hello David,

Not sure if your question has anything to do with YOCTO (in contrary, I this is has nothing to do with it). I see kerne's .dtb from U-BOOT messages while booting the system:

debug: [enable_uboot_overlays=1] ...
debug: [enable_uboot_cape_universal=1] ...
debug: [uboot_base_dtb_univ=am335x-boneblack-uboot-univ.dtb] ...
uboot_overlays: [uboot_base_dtb=am335x-boneblack-uboot-univ.dtb] ... <<======= .dtb used
uboot_overlays: Switching too: dtb=am335x-boneblack-uboot-univ.dtb ... loading /boot/dtbs/5.7.4-bone10/am335x-boneblack-uboot-univ.dtb ... <<======= .dtb loaded
210649 bytes read in 183 ms (1.1 MiB/s)
uboot_overlays: [fdt_buffer=0x60000] ...
uboot_overlays: loading /lib/firmware/BB-SPI0-SC16IS740-00A0.dtbo ... 2291 bytes read in 698 ms (2.9 KiB/s)

You can also stop in U-BOOT monitor and issue: printenv, then search for dtb variables.

In my case it gives me the following:
...
uboot_base_dtb=am335x-boneblack-uboot.dtb <<======= This one is probably one which U-BOOT uses for its purposes uboot_base_dtb_univ=am335x-boneblack-uboot-univ.dtb <<======= One used by the kernel
...

Hope this helps.

Best Regards,
Zoran
_______

Quoted 15 lines · David Novak

Hi all. I've found the device tree files and I'm fairly certain I know which one is being used in out image, but I want to be certain.

What process is used by Yocto to determine which top level dts file to compile?

Thanks,
David

#2 lore raw

Hi,

The kernel compiles every DTS exists in the Makefile which is located with DTS files. (arch/arm/boot/dts/Makefile) or (arch/arm64/boot/dts/[VENDOR]/Makefile)

In order to see what device tree is deployed into your image, please see the value of this variable : KERNEL_DEVICETREE:

$ bitbake -e | grep ^KERNEL_DEVICETREE=

You can specify your machine also : $ bitbake -e | grep ^KERNEL_DEVICETREE_[MACHINE]=

Generally this variable is used in your MACHINE configuration file.

If you want to understand how DTS is used in Yocto , you can take a look at poky/meta/classes/devicetree.bbclass

Best Regards, Talel