Which dts is being compiled?


David Novak <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


Zoran
 

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
_______

On Sun, Oct 18, 2020 at 12:16 AM David Novak <david.novak@...> wrote:

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






Bel Hadj Salem Talel <bhstalel@...>
 

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