All of lore.kernel.org
 help / color / mirror / Atom feed
From: Patrick Delaunay <patrick.delaunay@st.com>
To: u-boot@lists.denx.de
Subject: [PATCH v4 00/14] env: ext4: corrections and add test for env in ext4
Date: Tue, 28 Jul 2020 11:51:13 +0200	[thread overview]
Message-ID: <20200728095128.2363-1-patrick.delaunay@st.com> (raw)


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-patrick.delaunay at st.com/

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(-)

-- 
2.17.1

             reply	other threads:[~2020-07-28  9:51 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-28  9:51 Patrick Delaunay [this message]
2020-07-28  9:51 ` [PATCH v4 01/14] env: add absolute path at CONFIG_ENV_EXT4_FILE Patrick Delaunay
2020-07-31 21:40   ` Tom Rini
2020-07-28  9:51 ` [PATCH v4 02/14] env: ext4: set gd->env_valid Patrick Delaunay
2020-07-31 21:40   ` Tom Rini
2020-07-28  9:51 ` [PATCH v4 03/14] env: sf: avoid space in backend name Patrick Delaunay
2020-07-31 21:40   ` Tom Rini
2020-07-28  9:51 ` [PATCH v4 04/14] env: correctly handle env_load_prio Patrick Delaunay
2020-07-31 21:40   ` Tom Rini
2020-07-28  9:51 ` [PATCH v4 05/14] env: nowhere: add .load ops Patrick Delaunay
2020-07-31 21:41   ` Tom Rini
2020-07-28  9:51 ` [PATCH v4 06/14] env: the ops driver load becomes mandatory in struct env_driver Patrick Delaunay
2020-07-31 21:41   ` Tom Rini
2020-07-28  9:51 ` [PATCH v4 07/14] cmd: env: add env load command Patrick Delaunay
2020-07-31 21:41   ` Tom Rini
2020-07-28  9:51 ` [PATCH v4 08/14] cmd: env: add env select command Patrick Delaunay
2020-07-31 21:41   ` Tom Rini
2020-07-28  9:51 ` [PATCH v4 09/14] configs: sandbox: activate env in ext4 support Patrick Delaunay
2020-07-31 21:41   ` Tom Rini
2020-07-28  9:51 ` [PATCH v4 10/14] configs: sandbox: activate command env select and env load Patrick Delaunay
2020-07-31 21:41   ` Tom Rini
2020-07-28  9:51 ` [PATCH v4 11/14] test: environment in ext4 Patrick Delaunay
2020-07-31 21:41   ` Tom Rini
2020-08-03 15:43   ` Stephen Warren
2020-08-03 15:51     ` Tom Rini
2020-08-03 16:57       ` Stephen Warren
2020-08-03 17:11         ` Tom Rini
2020-07-28  9:51 ` [PATCH v4 12/14] env: ext4: introduce new function env_ext4_save_buffer Patrick Delaunay
2020-07-31 21:41   ` Tom Rini
2020-07-28  9:51 ` [PATCH v4 13/14] env: ext4: add support of command env erase Patrick Delaunay
2020-07-31 21:41   ` Tom Rini
2020-07-28  9:51 ` [PATCH v4 14/14] test: sandbox: add test for erase command Patrick Delaunay
2020-07-31 21:42   ` Tom Rini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200728095128.2363-1-patrick.delaunay@st.com \
    --to=patrick.delaunay@st.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.