Bitbake target & device tree differences (BB or BBB)

I decided to try to bitbake a more streamlined image for experimental purposes for one of my BBBs – as much to learn how as anything else.

Understood is that the kernel is the same for both the BB and BBB, and that differences in the device tree is what sets them apart.

My question is: During the Bitbake build process, at what point do you vector into a BBB specific image? All I see is the generic term “beaglebone” in the build options. How do I know my image is going to have the right device tree?

I am new to this, so be kind!


Use beaglebone for bitbake. It will work on BBB too.

I’ve gathered that this must be so – as since my original post I noticed that on the demo image webpage the same image is used for both cards.

From this, I would conclude that the device trees for both cards must be present on the image, and the Kernel must have some prior knowledge about its HW environment to know which tree to load.

Does anybody know how this mechanism works?


I would start with the boot loader code.

I don't know about the kernel, but uboot actually loads the device tree
that gets passed to the kernel and I believe it can be configured to
select an appropriate choice at run-time. If you're seeing different
DTs, it's probably uboot doing the 'magic'.


You are indeed pointing me in the right direction. I’m finding that the variable “board_name” in the U-boot environment seems to direct how U-boot decides which device trees to load, whether there is an MMC disk to boot from, etc…
I found the default environ for the BBB here:

What I have not found, is how this variable is set or from where retrieved when the hardware boots from a “beaglebone” image, which is the same for either bone variant. Somehow the board_name=A335BNLT is retrieved for the BBB…

I’d kind of like to learn the mechanics of how this works and where board_name is stored.


I haven't built uboot from scratch or crawled through the code, but I'd
start by reviewing U7 (on the BBB schematic), which is an I2C EEPROM
labeled "Board ID".

There are probably some magic bits inside. :slight_smile:

Thank you sir. You are a gentleman and a scholar!