How do I tell which device tree blob (dtb file) I'm using?

When U-Boot executes the boot command, it provides a memory address for the kernel and a memory address for the device tree blob. Therefore, prior to this command, it must load these files into memory. Based on the messages you provided we see that two files failed to be loaded from the eMMC/SD card:

/boot/boot.ub
/boot/imx6dl-ts4900-13.dtb

Its possible that either these files simply weren't present, their path is wrong or the incorrect device:partition was given to the U-Boot load command. In any case, the command fails. At this point, it appears that the bootloader tries to load a "default" device tree - possibly stored on the same medium as the bootloader itself.

To find out exactly what is happening, you'll want to halt the boot process at the bootloader and access the U-Boot command prompt. From here, you may enter:

printenv

This will print out the U-boot environment variables. Many of these variables reference other variables. Some of these variables are often executed like scripts, so you may see boot scripts, kernel & fdt load scripts, etc. To figure out the boot sequence, look for a variable called bootcmd (or something similar). This is usually what is ultimately run at boot time. You'll need to trace the boot sequence out from this point through multiple variables, but you should see where load commands are used to load the FDT into memory. If you'd like to post the output of printenv, we can identify the exact logic used here.


I'm way late on this, but I implemented this script and I'll address this for anyone who finds this using an internet search engine.

This computer on module can be put on almost any off the shelf TS or custom baseboard, and we wanted it to automatically work without users having to adjust the device tree used. We have an 8-input shift register on any given carrier board with a unique id for the baseboard. On the TS-8550, this is 0x13. http://wiki.embeddedarm.com/wiki/TS-4900#Baseboard_ID

So in U-Boot the bbdetect command we added reads the GPIO connected to this shift register and sets a $baseboardid environment variable. U-Boot will first attempt to load a baseboard specific device tree at /boot/imx6${cpu}-ts4900-${baseboardid}.dtb. If it fails to find one, it will use the fallback device tree at /boot/imx6${cpu}-ts4900.dtb. This latter file has sane defaults that will work on any carrier board. The TS-8550 doesn't need a baseboard specific carrier board so it falls back to the standard device tree and continues to boot.

To answer your original question,

cat /proc/device-tree/model

All of our device trees will have a slightly different model in the device tree.
For example, the safe fallback is:

  • "Technologic Systems i.MX6 Quad TS-4900 (Default Device Tree)"

Or the TS-TPC-8390 carrier board with a specific device tree:

  • "Technologic Systems i.MX6 Quad TS-4900 (TS-TPC-8390)"