
Hi,
V4 of the serie [1]: rebase on master branch and solve the SPL size issue for board with SPL_ENV_IS_NOWHERE=y (pointed by Tom Rini in [2])
The buildman result for these boards are:
------------------------------------------------- tools/buildman/buildman -b sssddsqqs T1042RDB_PI_NAND_SECURE_BOOT am335x_guardian am335x_guardian am335x_evm j721e_evm_r5 ls1021atwr_sdcard_ifc_SECURE_BOOT ls1043ardb_nand_SECURE_BOOT ls1043ardb_sdcard_SECURE_BOOT ls1046ardb_qspi_spl ls1088ardb_sdcard_qspi_SECURE_BOOT T1042RDB_PI_NAND_SECURE_BOOT -sS
Summary of 25 commits for 13 boards (12 threads, 1 job per thread) 01: Merge https://gitlab.denx.de/u-boot/custodians/u-boot-spi aarch64: w+ ls1043ardb_sdcard_SECURE_BOOT ls1046ardb_sdcard_SECURE_BOOT ls1088ardb_sdcard_qspi_SECURE_BOOT arm: w+ am335x_guardian j721e_evm_r5 ls1021atwr_sdcard_ifc_SECURE_BOOT powerpc: w+ T1042RDB_PI_NAND_SECURE_BOOT 02: env: mmc: allow support of mmc_get_env_dev with OF_CONTROL arm: (for 7/7 boards) all +4534.9 bss -4.6 data +4537.1 text +2.3 03: env: mmc: correct the offset returned by mmc_offset_try_partition arm: (for 7/7 boards) bss +1.1 text -1.1 04: env: mmc: add redundancy support in mmc_offset_try_partition 05: stm32mp1: board: add support of CONFIG_ENV_IS_IN_MMC 06: stm32mp1: use a specific SD/eMMC partition for U-Boot enviromnent 07: configs:stm32mp1: activate env config in SPL aarch64: (for 5/5 boards) all -1.8 rodata -1.8 arm: (for 7/7 boards) all +0.9 bss +3.4 rodata -2.6 08: cmd: env: add option for quiet output on env info aarch64: (for 5/5 boards) all +1.8 rodata +1.8 arm: (for 7/7 boards) all -0.9 bss -3.4 rodata +2.6 09: cmd: env: check real location for env info command 10: configs: sandbox: Enable sub command 'env info' 11: test: env: add test for env info sub-command 12: env: add absolute path at CONFIG_ENV_EXT4_FILE 13: env: ext4: set gd->env_valid 14: env: sf: avoid space in backend name aarch64: (for 5/5 boards) all -0.2 rodata -0.2 15: env: correctly handle env_load_prio aarch64: (for 5/5 boards) all -8.0 spl/u-boot-spl:all -1.6 spl/u-boot-spl:text -1.6 text -8.0 arm: (for 7/7 boards) all -2.3 bss +3.4 spl/u-boot-spl:all -1.7 spl/u-boot-spl:text -1.7 text -5.7 16: env: nowhere: add .load ops 17: env: the ops driver load becomes mandatory in struct env_driver 18: cmd: env: add env load command 19: cmd: env: add env select command 20: configs: sandbox: activate env in ext4 support 21: configs: sandbox: activate command env select and env load 22: test: environment in ext4 23: env: ext4: introduce new function env_ext4_save_buffer 24: env: ext4: add support of command env erase 25: test: sandbox: add test for erase command -------------------------------------------------
In this serie, I add sandbox test with CONFIG_ENV_IS_NOWHERE activated with EXT4 location: load, save and erase.
To test this feature, I add 2 new commands to change the ENV location: - env select [target] - env load
To be able to test invalid file (bad CRC), I also add the support of the command "env erase" for EXT4 env location.
[1] http://patchwork.ozlabs.org/project/uboot/list/?series=185725 [2] http://patchwork.ozlabs.org/project/uboot/patch/20200625075958.9868-6-patric...
Regards
Patrick
Changes in v4: - don't use env_import in SPL to avoid to increase its size as it is only required for 'env load' command
Changes in v3: - new - new - new: add load ops in nowhere - new: load operation becomes mandatory - new: add 'env load' command - new: add 'env select' command - change env_get_location to avoid gd->env_load_prio modification - replace specific sandbox command by generic command 'env select' and 'env load' - change title "sandbox: support the change of env location" - replace specific sandbox command by generic command 'env select' and 'env load' - update after Stephen Warren comments - replace sandbox command by generic command 'env load' in test_env
Changes in v2: - change cmd_tbl_t to struct cmd_tbl - use CONFIG_IS_ENABLED to set .erase (same as .save)
Patrick Delaunay (14): env: add absolute path at CONFIG_ENV_EXT4_FILE env: ext4: set gd->env_valid env: sf: avoid space in backend name env: correctly handle env_load_prio env: nowhere: add .load ops env: the ops driver load becomes mandatory in struct env_driver cmd: env: add env load command cmd: env: add env select command configs: sandbox: activate env in ext4 support configs: sandbox: activate command env select and env load test: environment in ext4 env: ext4: introduce new function env_ext4_save_buffer env: ext4: add support of command env erase test: sandbox: add test for erase command
board/sandbox/sandbox.c | 15 ++++ cmd/Kconfig | 11 +++ cmd/nvedit.c | 29 ++++++++ configs/sandbox64_defconfig | 7 ++ configs/sandbox_defconfig | 7 ++ configs/sandbox_flattree_defconfig | 7 ++ configs/sandbox_spl_defconfig | 7 ++ env/Kconfig | 2 +- env/env.c | 80 ++++++++++++++++++-- env/ext4.c | 54 ++++++++++++-- env/nowhere.c | 17 +++++ env/sf.c | 2 +- include/env.h | 15 +++- include/env_internal.h | 3 +- test/py/tests/test_env.py | 113 ++++++++++++++++++++++++++++- 15 files changed, 349 insertions(+), 20 deletions(-)