Hi All,
I'm trying to figure out how to program uboot environment parameters in emmc when programming the board for the first time. I'm using "UUU" tool to program the image. The build system is YOCTO. This is a custom board based on i.MX8mp.
This is required for integrating SWUpdate using the dual copy strategy. I'm planning to update the "mmcroot" parameter in Uboot environment once the update is successful. Previously uboot was configured with CONFIG_ENV_IS_NOWHERE=y setting, and it was using default environment on every powerup. Now I have made the following changes to uboot defconfig -
-CONFIG_ENV_IS_NOWHERE=y
+# CONFIG_ENV_IS_NOWHERE is not set
+CONFIG_ENV_IS_IN_MMC=y
+CONFIG_SYS_MMC_ENV_DEV=2
+CONFIG_SYS_MMC_ENV_PART=0
+CONFIG_ENV_SIZE=0x4000
+CONFIG_ENV_OFFSET=0x400000
+CONFIG_ENV_SECT_SIZE=0x10000
After the build, I have "u-boot-imx-initial-env-sd" file getting created which will be programmed to the emmc. I can't figure out how to do this using the UUU tool.
I'm wondering if I have to create a separate partition for uboot environment in emmc device and provide the below command in wks.in file of meta-freescale/wic/
part u-boot-env --source rawcopy --sourceparams="file=u-boot-imx-initial-env-sd" --ondisk mmcblk --no-table --align 8192
Let me know if anybody has looked into this or the best way to get this done.
Thanks
Did this technique work out? Were you able to save the environment variables?
Hi @vin_imd
Yes, you can create a separate partition for uboot environment in the wks.in meta-freescale/wic/.