public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [PATCH v2 00/31] bootstd: Support recording images
@ 2024-10-19 15:21 Simon Glass
  2024-10-19 15:21 ` [PATCH v2 01/31] alist: Mention the error condition in alist_add_placeholder() Simon Glass
                   ` (31 more replies)
  0 siblings, 32 replies; 36+ messages in thread
From: Simon Glass @ 2024-10-19 15:21 UTC (permalink / raw)
  To: U-Boot Mailing List
  Cc: Tom Rini, Simon Glass, AKASHI Takahiro, Alexander Gendin,
	Caleb Connolly, Dragan Simic, Eddie James, Emil Kronborg,
	Francis Laniel, Guillaume La Roque, Heinrich Schuchardt,
	Hou Zhiqiang, Igor Opaniuk, Ilias Apalodimas, Ion Agorria,
	Jerome Forissier, Jonas Karlman, Julien Masson, Marek Vasut,
	Marek Vasut, Mark Kettenis, Martyn Welch, Mattijs Korpershoek,
	Michael Trimarchi, Michal Simek, Nam Cao, Neil Armstrong,
	Oliver Gaskell, Pavel Herrmann, Peter Robinson, Quentin Schulz,
	Rasmus Villemoes, Robert Marko, Sam Protsenko, Sean Edmond,
	Sebastian Reichel, Shantur Rathore, Stefan Roese, Sughosh Ganu,
	Sumit Garg, Svyatoslav Ryhel, Thomas Weißschuh, Tim Harvey,
	Tom Fitzhenry, Tony Dinh, Vincent Stehlé

This series provides a way to keep track of the images used in bootstd,
including the type of each image.

At present this is sort-of handled by struct bootflow but in quite an
ad-hoc way. The structure has become quite large and is hard to query.
Future work will be able to reduce its size.

Ultimately the 'bootflow info' command may change to also show images as
a list, but that is left for later, as this series is already fairly
long. So for now, just introduce the concept and adjust bootstd to use
it, with a simple command to list the images.

This series includes various alist enhancements, to make use of this new
data structure a little easier.

Changes in v2:
- Add an image type extension in bootflow.h
- Add new patch to put myself as maintainer of alist
- Change the tag to bootmeth_efi
- Drop patches which add new image types
- Update to use a new image-type enum in bootflow.h
- Use the word 'feature' instead of 'hack'

Simon Glass (31):
  alist: Mention the error condition in alist_add_placeholder()
  alist: Add a comment for alist_init_struct()
  alist: Expand the comment for alist_get()
  alist: Add a way to get the next element
  alist: Add for-loop helpers
  alist: Add a function to empty the list
  alist: Add a way to efficiently filter an alist
  alist: Add maintainer
  dm: core: Add a function to see if a device exists
  test: boot: Use a consistent name for the script bootmeth
  bootstd: Move bootflow-adding to bootstd
  bootstd: Move bootflow-clearing to bootstd
  bootstd: Add a function to get bootstd only if available
  bootstd: Drop the bootdev-specific list of bootflows
  bootstd: Move the bootflow list into an alist
  test: Expand implementation of ut_list_has_dm_tests()
  test: Drop the duplicate line in setup_bootmenu_image()
  test: boot: Update bootflow_iter() for console checking
  bootstd: cros: Correct the x86-setup address
  bootstd: Maintain a list of images
  bootstd: Update bootmeth_alloc_file() to record images
  boot: pxe: Drop the duplicate comment on get_pxe_file()
  bootmeth_efi: Simplify reading files by using the common function
  bootmeth: Update the read_file() method to include a type
  bootmeth_efi: Check the filename-allocation in the network path
  boot: Update extlinux pxe_getfile_func() to include type
  boot: Update pxe bootmeth to record images
  Update bootmeth_alloc_other() to record images
  bootstd: Avoid showing an invalid buffer address
  bootstd: Update cros bootmeth to record images
  bootstd: Add a simple command to list images

 MAINTAINERS                      |   7 +
 boot/bootdev-uclass.c            |  76 +++-------
 boot/bootflow.c                  |  56 +++++--
 boot/bootmeth-uclass.c           |  54 ++++++-
 boot/bootmeth_android.c          |   3 +-
 boot/bootmeth_cros.c             |  33 +++-
 boot/bootmeth_efi.c              |  16 +-
 boot/bootmeth_efi_mgr.c          |   3 +-
 boot/bootmeth_extlinux.c         |   7 +-
 boot/bootmeth_pxe.c              |  21 ++-
 boot/bootmeth_qfw.c              |   3 +-
 boot/bootmeth_sandbox.c          |   3 +-
 boot/bootmeth_script.c           |   7 +-
 boot/bootstd-uclass.c            |  59 ++++++-
 boot/pxe_utils.c                 |  36 ++---
 boot/vbe_simple.c                |   5 +-
 cmd/Kconfig                      |   9 ++
 cmd/Makefile                     |   1 +
 cmd/bootdev.c                    |   2 +-
 cmd/bootflow.c                   |  13 +-
 cmd/bootstd.c                    |  65 ++++++++
 cmd/pxe.c                        |   2 +-
 cmd/sysboot.c                    |   6 +-
 doc/develop/bootstd/overview.rst |  21 ++-
 doc/usage/cmd/bootstd.rst        |  79 ++++++++++
 doc/usage/index.rst              |   1 +
 drivers/core/uclass.c            |  11 ++
 include/alist.h                  | 139 ++++++++++++++++-
 include/bootdev.h                |  27 ----
 include/bootflow.h               |  72 +++++++--
 include/bootmeth.h               |  22 ++-
 include/bootstd.h                |  50 +++++-
 include/dm/uclass.h              |  11 ++
 include/pxe_utils.h              |  14 +-
 lib/alist.c                      |  41 +++++
 test/boot/bootflow.c             | 110 +++++++++++++-
 test/dm/core.c                   |  22 +++
 test/lib/alist.c                 | 253 +++++++++++++++++++++++++++++++
 test/py/tests/test_ut.py         |   5 +-
 test/test-main.c                 |  18 ++-
 40 files changed, 1191 insertions(+), 192 deletions(-)
 create mode 100644 cmd/bootstd.c
 create mode 100644 doc/usage/cmd/bootstd.rst

-- 
2.34.1


^ permalink raw reply	[flat|nested] 36+ messages in thread

end of thread, other threads:[~2024-10-22 13:56 UTC | newest]

Thread overview: 36+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-19 15:21 [PATCH v2 00/31] bootstd: Support recording images Simon Glass
2024-10-19 15:21 ` [PATCH v2 01/31] alist: Mention the error condition in alist_add_placeholder() Simon Glass
2024-10-19 15:21 ` [PATCH v2 02/31] alist: Add a comment for alist_init_struct() Simon Glass
2024-10-19 15:21 ` [PATCH v2 03/31] alist: Expand the comment for alist_get() Simon Glass
2024-10-19 15:21 ` [PATCH v2 04/31] alist: Add a way to get the next element Simon Glass
2024-10-19 15:21 ` [PATCH v2 05/31] alist: Add for-loop helpers Simon Glass
2024-10-19 15:21 ` [PATCH v2 06/31] alist: Add a function to empty the list Simon Glass
2024-10-19 15:21 ` [PATCH v2 07/31] alist: Add a way to efficiently filter an alist Simon Glass
2024-10-19 15:21 ` [PATCH v2 08/31] alist: Add maintainer Simon Glass
2024-10-19 15:21 ` [PATCH v2 09/31] dm: core: Add a function to see if a device exists Simon Glass
2024-10-19 15:21 ` [PATCH v2 10/31] test: boot: Use a consistent name for the script bootmeth Simon Glass
2024-10-22 13:51   ` Mattijs Korpershoek
2024-10-19 15:21 ` [PATCH v2 11/31] bootstd: Move bootflow-adding to bootstd Simon Glass
2024-10-19 15:21 ` [PATCH v2 12/31] bootstd: Move bootflow-clearing " Simon Glass
2024-10-19 15:21 ` [PATCH v2 13/31] bootstd: Add a function to get bootstd only if available Simon Glass
2024-10-19 15:21 ` [PATCH v2 14/31] bootstd: Drop the bootdev-specific list of bootflows Simon Glass
2024-10-19 15:21 ` [PATCH v2 15/31] bootstd: Move the bootflow list into an alist Simon Glass
2024-10-19 15:21 ` [PATCH v2 16/31] test: Expand implementation of ut_list_has_dm_tests() Simon Glass
2024-10-19 15:21 ` [PATCH v2 17/31] test: Drop the duplicate line in setup_bootmenu_image() Simon Glass
2024-10-19 15:21 ` [PATCH v2 18/31] test: boot: Update bootflow_iter() for console checking Simon Glass
2024-10-19 15:21 ` [PATCH v2 19/31] bootstd: cros: Correct the x86-setup address Simon Glass
2024-10-19 15:22 ` [PATCH v2 20/31] bootstd: Maintain a list of images Simon Glass
2024-10-19 15:22 ` [PATCH v2 21/31] bootstd: Update bootmeth_alloc_file() to record images Simon Glass
2024-10-19 15:22 ` [PATCH v2 22/31] boot: pxe: Drop the duplicate comment on get_pxe_file() Simon Glass
2024-10-19 15:22 ` [PATCH v2 23/31] bootmeth_efi: Simplify reading files by using the common function Simon Glass
2024-10-21 10:25   ` Ilias Apalodimas
2024-10-19 15:22 ` [PATCH v2 24/31] bootmeth: Update the read_file() method to include a type Simon Glass
2024-10-22 13:55   ` Mattijs Korpershoek
2024-10-19 15:22 ` [PATCH v2 25/31] bootmeth_efi: Check the filename-allocation in the network path Simon Glass
2024-10-19 15:22 ` [PATCH v2 26/31] boot: Update extlinux pxe_getfile_func() to include type Simon Glass
2024-10-19 15:22 ` [PATCH v2 27/31] boot: Update pxe bootmeth to record images Simon Glass
2024-10-19 15:22 ` [PATCH v2 28/31] Update bootmeth_alloc_other() " Simon Glass
2024-10-19 15:22 ` [PATCH v2 29/31] bootstd: Avoid showing an invalid buffer address Simon Glass
2024-10-19 15:22 ` [PATCH v2 30/31] bootstd: Update cros bootmeth to record images Simon Glass
2024-10-19 15:22 ` [PATCH v2 31/31] bootstd: Add a simple command to list images Simon Glass
2024-10-19 16:31 ` [PATCH v2 00/31] bootstd: Support recording images Tom Rini

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox