Updating Uboot default environment variables

Hi,

so i recently updated my yocto based image for the imx6 module, by calling repo sync. Apparently, between version 2.7.3 and 2.7.5, the partition of the rootfs changed from ext3 to ext4, resulting in a kernel panic when booting.

I checked the uboot environment variables and found the corresponding entry:

emmcargs=ip=off root=/dev/mmcblk0p2 rw,noatime rootfstype=ext3 rootwait

and changed it to
emmcargs=ip=off root=/dev/mmcblk0p2 rw,noatime rootfstype=ext4 rootwait

Finally, its booting again. If i use runsetupdate && run update routine, this part doesnt get updated, nor does the run update_uboot option. Why? If i reset the environment variables via ‘env default -a’, its being reset to the old ext3 value.

Cheers
Nils

so i recently updated my yocto based image for the imx6 module, by calling repo sync. Apparently, between version 2.7.3 and 2.7.5, the partition of the rootfs changed from ext3 to ext4, resulting in a kernel panic when booting.

Yes, as noted here or here.

I checked the uboot environment variables and found the corresponding entry:

emmcargs=ip=off root=/dev/mmcblk0p2 rw,noatime rootfstype=ext3 rootwait

and changed it to emmcargs=ip=off root=/dev/mmcblk0p2 rw,noatime rootfstype=ext4 rootwait

Please note that the correct settings nowadays would be as follows instead:

emmcargs=ip=off root=/dev/mmcblk0p2 ro rootfstype=ext4 rootwait

Finally, its booting again. If i use runsetupdate && run update routine, this part doesnt get updated, nor does the run update_uboot option. Why?

As noted here we do not know whether or not you have some valuable settings in your environment and therefore do not touch it by default.

If i reset the environment variables via ‘env default -a’, its being reset to the old ext3 value.

No, this should not be the case. However after doing env default -a you also have to save them using saveenv.

Thank you for the quick response. Nevertheless, env default -a does in fact reset to the old fashioned environment variable. I saved them, of course. Also i identified the corresponding lines of code in the source and found the latest one, featuring ext4, as mentioned above.

I guess it either didnt get compiled with the latest version or deployed.

My steps summarized:

  • stashed my changes to solve repo conflicts
  • use repo sync
  • use bitbake console-tdx-image to build the image
  • extract image, run update.sh to prepare SD card
  • enter bootloader
  • run setupdate, run update, run update_uboot
  • reboot into bootloader again
  • set back to defaults, env default -a
  • saveenv

Result: Old values for environment variables are being set.

Could you please paste a log file of the serial console output of the parts run on the target (e.g. starting with the step enter bootloader)?