0

I am currently generating a specialized Yocto image for a Beaglebone device. In the resulting /tmp/deploy/images folder I can see the resulting image, plus alot of device tree files .dtb for different hardware

Does it mean that all of these device trees will be enabled in the image? Where can I confirm this? If one device tree file that I need there is not enabled , how would I enable this before booting the image? Thanks in advance

2
  • I'm not sure whether I understand you correctly, but you'll get a dtb for each dts you provide. The actual dtb to be used is typically defined by a u-boot environment variable. Commented Nov 21, 2022 at 13:31
  • @Philippos Thanks for your reply. Yes the dts gets compiled into a dtb. I understand that I could halt the bootloader and then use setenv to activate a dtb that is not already activated? How would I enable the particular dtb when building the image so that it is included and enabled by default on bootup and I don't need to do anything with the bootloader? Commented Nov 21, 2022 at 13:41

1 Answer 1

1

To manually select your favorite device tree blob, stop your booting at the U-Boot prompt and find out how your device tree is selected by searching th output of printenv for some dtb path. Depending on your U-Boot, there may be an environment variable like fdtfile or fdt_file (for flattened device tree) or some script to identify the board and generate a kernel command line. Anyhow, it should be easy to reverse-engineer it and setenv what you need.

If this works, you can add the variable setting to CONFIG_EXTRA_ENV_SETTINGS inside your board configuration file.

2
  • Thanks for your reply. Which file would this normally be in a Yocto build tree? Commented Nov 21, 2022 at 17:12
  • Typically, you have a recipes-bsp/u-boot recipe in your custom layer which patches the default configuration. You can add your patch there. If you don't have the recipe yet, you seem to use the default by the board vendor (or whatever); I can't guess the name, but your should find it in the U-Boot recipe of the meta-your-vendor layer. Just don't edit it there, better do your own bbappend. Commented Nov 22, 2022 at 9:35

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.