Hi,
Let me explain my issues in detail. My requirement is to change the value of the u-boot environment variable in Linux user space, which should be reflected back in the u-boot on LA1224RDB using SDK 2.2. In which, I have added a new environment variable named slot=1 in the file include/configs/lx2160a_common.h in the u-boot source code. But, I need to change the variable in linux user space. So further I tried to create a file to store the u-boot environment variable, so I enabled the file in tools/env/fw_env.config to save the u-boot environment variables, as below.
#cat /etc/fw_env.config
# On a block device a negative offset is treated as a backwards offset from the
# end of the device/partition, rather than a forwards offset from the start.
# Block device example
/dev/mmcblk1 0x500000 0x2000
/dev/mmcblk1 0x500000 0x2000
# VFAT example
/uboot.env 0x0000 0x4000
My issue is that when i try to store the u-boot environment variable in a file named uboot.env, i couldn’t be able to create the file that stores the variable. I tried to enable the file to store the u-boot environment variable in deconfig file and but i couldn’t find the uboot.env file in linux user space.
Changes in kernel and u-boot:
In include/configs/lx2160a_common.h,
#define CONFIG_SYS_MMC_ENV_DEV 0 —-> 1
In configs/la1224rdb_tfa_defconfig
CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
CONFIG_ENV_IS_IN_EXT4=y
CONFIG_ENV_EXT4_INTERFACE="mmc"
CONFIG_ENV_EXT4_DEVICE_AND_PART="1:2"
CONFIG_ENV_EXT4_FILE="/uboot.env"
You could execute the following command to save u-boot env in /uboot.env.
# fw_printenv -c /etc/fw_env.config>/uboot.env