[PATCH 0/2] tools/kexec: Introduce utility to build zboot image with bpf section
Pingfan Liu
piliu at redhat.com
Tue Jun 10 19:26:44 PDT 2025
The series '[PATCHv3 0/9] kexec: Use BPF lskel to enable kexec to load PE
format boot image' [1] makes the kernel ready to load PE files with .bpf
sections. These two patches integrate the zboot-bpf image builder into
the kernel source tree, so users can conveniently generate the final image
with the command:
make -C tools/kexec zboot
Later, the infrastructure for UKI can also be organized here.
To facilitate the review, I have pushed the whole series, including the kernel part,
to GitHub [2]. There is a slight difference from [PATCHv3 8/9]
"kexec: Integrate bpf light skeleton to load zboot image" in [1]. This
difference is made in the function get_symbol_from_elf() to accommodate
clang's behavior, which combines the section header string table and normal
string table into one.
[1]: https://lore.kernel.org/bpf/20250529041744.16458-1-piliu@redhat.com/
[2]: https://github.com/pfliu/linux/tree/kexec_bpf_v3%2B
Pingfan Liu (2):
tools/kexec: Introduce a bpf-prog to parse zboot image format
tools/kexec: Add a zboot image building tool
tools/kexec/Makefile | 89 ++++++++++
tools/kexec/pe.h | 177 +++++++++++++++++++
tools/kexec/zboot_image_builder.c | 279 ++++++++++++++++++++++++++++++
tools/kexec/zboot_parser_bpf.c | 157 +++++++++++++++++
4 files changed, 702 insertions(+)
create mode 100644 tools/kexec/Makefile
create mode 100644 tools/kexec/pe.h
create mode 100644 tools/kexec/zboot_image_builder.c
create mode 100644 tools/kexec/zboot_parser_bpf.c
--
2.49.0
More information about the kexec
mailing list