Hi,
How to build fw_printenv and fw_setenv for LS1012AFRWY OpenWrt-19.04?
Thanks
Solved! Go to Solution.
Please execute "make menuconfig", then select select the following option and run "make" to regenerate rootfs image.
Utilities ---> Boot Loaders ---> <*> uboot-envtools................. read/modify U-Boot bootloader environment
Please execute "make menuconfig", then select select the following option and run "make" to regenerate rootfs image.
Utilities ---> Boot Loaders ---> <*> uboot-envtools................. read/modify U-Boot bootloader environment
After build with above option selected.
How to modify U-boot environment variables from Linux use these two tools?
Should I config below config file for ls1012afrwy NOR flash memory map 0x001D_0000 for env space?
/etc/fw_env.config
# NOR example
# MTD device name Device offset Env. size Flash sector size Number of sectors
/dev/mtd0 0x001D0000 0x10000 0x4000
On the target, please create a configuration file /etc/fw_env.config, the content like this
/dev/mtd5 0x60000 0x2000 0x100000
MTD device name Device Offset Environment Size Flash sector size
Then execute "fw_printenv" and "fw_setenv" to read and write u-boot environment
Please refer to the following definition in include/configs/ls1012afrwy.h
#undef CONFIG_ENV_OFFSET
#define CONFIG_ENV_OFFSET 0x1D0000
#undef FSL_QSPI_FLASH_SIZE
#define FSL_QSPI_FLASH_SIZE SZ_16M
#undef CONFIG_ENV_SECT_SIZE
#define CONFIG_ENV_SECT_SIZE 0x10000 /*64 KB*/
#undef CONFIG_ENV_SIZE
#define CONFIG_ENV_SIZE 0x10000 /*64 KB*/