qemu-arm: Add persistent environment support

Currently on qemu-arm platforms environment is kept in RAM. Instead
use pflash device 1 to provide persistent environment support across
device reset.

Also (optionally) provide support for persistent environment across
qemu machine OFF/ON using following instructions:

- Create envstore.img using qemu-img:
    qemu-img create -f raw envstore.img 64M
- Add a pflash drive parameter to the command line:
    -drive if=pflash,format=raw,index=1,file=envstore.img

Signed-off-by: Sumit Garg <sumit.garg@linaro.org>
This commit is contained in:
Sumit Garg
2018-11-26 16:50:17 +05:30
committed by Tom Rini
parent 5266db16ee
commit 03fb0958c9
4 changed files with 27 additions and 1 deletions

View File

@@ -21,7 +21,8 @@
#define CONFIG_SYS_HZ 1000
/* Environment options */
#define CONFIG_ENV_SIZE SZ_64K
#define CONFIG_ENV_ADDR 0x4000000
#define CONFIG_ENV_SIZE SZ_256K
#define BOOT_TARGET_DEVICES(func) \
func(SCSI, scsi, 0) \
@@ -43,4 +44,9 @@
#define CONFIG_SYS_CBSIZE 512
#define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_TEXT_BASE
#define CONFIG_SYS_FLASH_BASE 0x0
#define CONFIG_SYS_MAX_FLASH_BANKS 2
#define CONFIG_SYS_MAX_FLASH_SECT 256 /* Sector: 256K, Bank: 64M */
#endif /* __CONFIG_H */