Tool/software:
Hi team,
I'm trying to implement the feature of dual image in our target board based on SDK 09.02.01.09. I've created two partitions as rootfs in the SD card and have been able to switch both partitions manually in the u-boot prompt.
So the next I'd like to add some variables during run time in the environment file (uEnv.txt or uboot.env) that can be recognized by u-boot, and it can then do something like recovery actions according to the variables in that file. I save the environment file in /boot with the command in u-boot prompt:
---
Writing environment to SD card
=> env export -t $loadaddr
=> fatwrite mmc ${mmcdev} ${loadaddr} ${bootenvfile} ${filesize}
---
I've installed "fw_printenv" & "fw_setenv" to rootfs by adding "IMAGE_INSTALL:append = " u-boot-fw-utils" in build/local.conf and generated a u-boot config fragment to enable the following options:
---
CONFIG_ENV_SIZE=0x20000
CONFIG_ENV_OFFSET=0x680000
CONFIG_CMD_ASKENV=y
CONFIG_CMD_NVEDIT_INFO=y
CONFIG_ENV_IS_IN_MMC=y
CONFIG_SYS_MMC_ENV_DEV=1
CONFIG_SYS_MMC_ENV_PART=1
---
Then created a plain file "fw_env.config" with the content (I'm not sure if the offset and size are correct...):
---
/dev/mmcblk0boot0 0x680000 0x20000
---
But still can't read the environment file in Linux.
root@ti-am62xx:/# fw_printenv
Cannot read environment, using default
Cannot read default environment from file
In fact, I've been following several threads in TI E2E forums but still can't figure out where the problems are. Any tips are welcome! Thanks in advance.