From: Simon Glass <sjg@chromium.org> This series prepares the bootstd infrastructure for supporting multiple bootflows from a single partition. Formats like extlinux can define several labels in one configuration file, and BLS installations can have multiple .conf files in loader/entries/ A follow-up series will add the actual multi-entry scanning. In summary: - Fix two iter->err inconsistencies in the bootflow scanning code that would prevent multi-entry iteration from working correctly - Add a free_bootflow() method to bootmeth_ops so bootmeths can properly clean up bflow->bootmeth_priv. Fix memory leaks in the cros, android and rauc drivers - Refactor the extlinux bootmeth to pass the PXE context explicitly and move it from platform data to a new private data struct - Convert the single PXE context to an alist of contexts, indexed by a new bootmeth_id field on the bootflow. This allows multiple parsed configurations to coexist - Add alist_add_placeholder() zeroing and suppress PXE parser warnings during non-interactive parsing Simon Glass (14): mcheck: Increase registry size alist: Zero new entries in alist_add_placeholder() bootstd: Set iter->err before BOOTFLOWIF_ALL early return bootstd: Clear iter->err on successful bootflow check pxe: Allow the parser to suppress warning messages bootstd: Add free_bootflow() method for bootmeths cros: Implement free_bootflow to fix memory leak android: Implement free_bootflow to fix memory leak rauc: Implement free_bootflow to fix memory leak extlinux: Pass pxe_context to extlinux_boot() and extlinux_read_all() extlinux: Move pxe_context to new extlinux_priv struct extlinux: Add remove() to fix pxe_context leak bootstd: Add bootmeth_id to struct bootflow extlinux: Convert pxe_context to an alist with bootmeth_id lookup boot/bootflow.c | 11 ++++-- boot/bootmeth-uclass.c | 10 ++++++ boot/bootmeth_android.c | 9 +++++ boot/bootmeth_cros.c | 9 +++++ boot/bootmeth_extlinux.c | 51 ++++++++++++++++++++++++--- boot/bootmeth_pxe.c | 27 ++++++++++++--- boot/bootmeth_rauc.c | 13 ++++++- boot/ext_pxe_common.c | 54 ++++++++++++++++++++--------- boot/pxe_parse.c | 27 +++++++++------ boot/pxe_utils.c | 1 + boot/vbe_abrec.h | 4 +++ boot/vbe_abrec_os.c | 13 ++++--- common/mcheck_core.inc.h | 2 +- doc/develop/bootstd/overview.rst | 12 ++++++- include/alist.h | 7 ++-- include/bootflow.h | 8 ++++- include/bootmeth.h | 24 +++++++++++++ include/extlinux.h | 59 ++++++++++++++++++++++++++++---- lib/alist.c | 8 ++++- test/boot/bootflow.c | 2 ++ test/lib/alist.c | 10 ++++++ 21 files changed, 299 insertions(+), 62 deletions(-) -- 2.43.0 base-commit: db6764b499965b88191ecd2419282087fdfe36c9 branch: bood