Default u-boot environment value for ${soc}

It seems to me that the default u-boot environment includes a wrong value for ${soc}. It should be ‘imx7d’ but is ‘imx7’ and because of that my system is not able to load the correct .dtb file.
I cannot find the exact location where the default environment value for soc is specified (not in include/configs/colibri_imx7_emmc.h). Do i miss something? Thanks in advance.


The variable is set dynamically at each boot. This has been added with this commit.
I expect this to work in a U-Boot build from the default configuration for colibri_imx7_emmc_defconfig.

Did you change anything in U-Boot?

What git hash does your U-Boot have?

Did you manually set the variable?
Does reverting to the defaults help? (in U-Boot: ‘env default -a’)


Default U-Boot environment setting ${soc} is “imx7d”. I just verified it using TEZI v 2.7 image from Toradex website.

Ok, i can confirm that the “soc” is set correctly at each boot (which means imx7d in my case). My u-boot has the git hash: U-Boot 2016.11-2.7.5+g52259cf and i modified the default environment by changing the ‘m4boot’ variable. However, when i execute “env default -a” the soc variable is set to imx7…


My bad. “env default -a” sets soc to mx7 since ‘soc=mx7’ is compiled into the defaults in the U-Boot binary, so that test did not shed any light on the issue.

So this is how it is expected to work:

  • U-Boot loads the environment from eMMC, if its checksum is wrong it then loads the defaults from its binary. (soc may now be soc=mx7)
  • The code referenced in above commits runs and sets soc to ‘imx7d’ or ‘imx7s’ depending on the detected SoC.
  • The rest of U-Boot is executed, i.e. you stop booting and go into cmdline mode or whatever is in bootcmd gets run.

So for further debugging:

  • Is the soc variable really ‘imx7’ in your case? (and not ‘mx7’)
  • What happens if you power the module, stop in U-Boot and do a ‘print soc’ as the first command?
  • Did you change bootcmd or one of the called commands in a way that on each boot ‘env default -a’ is executed?


I have to correct myself, ‘env default -a’ sets soc=mx7 and not imx7. After each reboot the soc variable is set to imx7d like it should but only after reset. Just as background unformation: In our update process the u-boot environment is always resetted after the image/u-boot etc was sucessfully flashed.

So is it working now?

Yes its working. I will edit my update process to include a reboot after reseting the u-boot environment. Thanks for yoru help.

you are welcome. Thanks for the feedback.