[PATCH 0/9] x86: Move zboot state into struct bootm_info

Simon Glass sjg at chromium.org
Tue May 26 15:09:06 CEST 2026


Most of the x86 zboot command keeps its state in a file-scope struct,
separate from the bootm code. Move this state into struct bootm_info so
the rest of the bootm logic can reach it directly, then drop the
now-redundant base_ptr argument from zimage_dump()

The series also includes some small clean-updates: making
do_zboot_states() static, renaming zboot_run() to make its purpose
clearer, and dropping a duplicate zimage_dump() declaration.

The kernel-version display is wrong in bootstd when the bzImage address
is not known, so a fix for this is included.

Also use strlcpy() in label_boot() for safer string handling.

Note: this series was split from an earlier, larger series originally
sent in late 2024. The eventual goal is to support booting without
CONFIG_CMDLINE and with Boot Loader Specification (BLS).


Simon Glass (9):
  x86: Make do_zboot_states() static
  x86: Rename zboot_run() to zboot_run_args()
  x86: Drop duplicate definition of zimage_dump()
  x86: Move x86 zboot state into struct bootm_info
  x86: Rename state to bmi
  x86: Move the bootm state for zimage into cmd/
  x86: boot: Correct display of kernel version
  x86: Drop the unnecessary base_ptr argument to zboot_dump()
  boot: Use strlcpy() in label_boot()

 arch/x86/include/asm/zimage.h | 57 +++++-----------------
 arch/x86/lib/zimage.c         | 91 ++++++++++++++++++-----------------
 boot/bootmeth_cros.c          |  6 +--
 boot/pxe_utils.c              |  2 +-
 cmd/bootflow.c                |  8 ++-
 cmd/x86/zboot.c               | 33 +++++++------
 include/bootm.h               | 48 +++++++++++++++---
 7 files changed, 131 insertions(+), 114 deletions(-)

---
base-commit: 8d5f30b52f7c800c2177188fc4d331fb7af2c46a
branch: stb5a

-- 
2.43.0



More information about the U-Boot mailing list