[PATCH v3 00/14] env: ext4: corrections and add test for env in ext4

Patrick Delaunay patrick.delaunay at st.com
Thu Jun 25 09:59:44 CEST 2020


Hi,

V3 of the serie [1].

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

This serie depends on previous env test introduced in [2]
"cmd: env: add option for quiet output on env info"

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=183620
[2] http://patchwork.ozlabs.org/project/uboot/list/?series=184539

Regards

Patrick


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                      |   9 +++
 env/sf.c                           |   2 +-
 include/env.h                      |  15 +++-
 include/env_internal.h             |   3 +-
 test/py/tests/test_env.py          | 113 ++++++++++++++++++++++++++++-
 15 files changed, 341 insertions(+), 20 deletions(-)

-- 
2.17.1



More information about the U-Boot mailing list