[U-Boot] [PATCH 00/37] binman: Add CBFS support
Simon Glass
sjg at chromium.org
Fri Jun 28 14:08:42 UTC 2019
CBFS (Coreboot Filesystem) is a simple ROM-based filesystem used for
locating data needed during booting. It has particular features for x86
such as defining a boot block at the top of the ROM image. At run-time,
boot loaders can locate files in the ROM by searching for a header and
magic strings in the ROM.
It is common to have multiple, separate CBFSs in the ROM.
Binman provides its own way of locating data, typically with a device
tree built into the image, or linker symbols when space is short. But it
is useful to be able to create images containing CBFSs with binman, since
it allows all image structure to defined in one place, rather than spread
out over multiple cbfstool invocations, etc.
The approach taken here is to directly create the CBFS in binman rather
than calling out to cbfstool. The latter is quite slow for multiple
invocations and the tool itself has no tests.
Also included is ifwitool lifted from coreboot, which is needed to package
images for Intel apollo lake SoCs. This seems easier than implementing
this functionality in binman.
Tests are provided for new binman functionality, although ifwitool has no
tests and is tested only by invocation from binman.
This series does not support all CBFS features, just raw binaries and Elf
files (called 'stages' in CBFS).
Simon Glass (37):
x86: Add ifwitool for Intel Integrated Firmware Image
cbfs: Add an enum and comment for the magic number
cbfs: Rename checksum to attributes_offset
tools: Drop duplicate raise_on_error argument
binman: Fix comment in bsection.GetEntries()
binman: Correct two typos in function names in ftest
binman: Add coverage tools info for Python 3
patman: Add a way to set the search path for tools
binman: Add a --toolpath option to set the tool search path
binman: Add missing comments to bsection
binman: Add missing comments toentry
binman: Tidy up help for --indir
binman: Use a better error for missing Intel descriptor
binman: Detect skipped tests
binman: Add a function to create a sample ELF file
binman: Add a function to decode an ELF file
binman: Ensure that coverage has access to site packages
binman: Assume Intel descriptor is at the start of the image
binman: Don't assume there is an ME region
binman: Update entry.SetOffsetSize to be optional
binman: Allow text directly in the node
patman: Add functions to compress and decompress data
binman: Use the tools.Decompress method
binman: Drop unnecessary debug handling
binman: Use tools compression function for blob handling
binman: Correct comment in u_boot_spl_elf
binman: Support ELF files for TPL
binman: Fix up the _DoTestFile() function -u argument
binman: Allow verbosity control when running tests
binman: Allow preserving test directories
binman: Pass the toolpath to tests
patman: Add a function to write ifwitool
binman: Add a utility library for coreboot CBFS
binman: Add support for CBFS entries
binman: Add support for Intel IFWI entries
binman: Pad empty areas of the CBFS with files
binman: Add support for fixed-offset files in CBFS
.travis.yml | 2 +-
fs/cbfs/cbfs.c | 4 +-
include/cbfs.h | 16 +-
test/run | 9 +-
tools/Makefile | 3 +
tools/binman/README | 25 +-
tools/binman/README.entries | 204 +-
tools/binman/binman.py | 52 +-
tools/binman/bsection.py | 42 +-
tools/binman/cbfs_util.py | 861 ++++++
tools/binman/cbfs_util_test.py | 577 ++++
tools/binman/cmdline.py | 8 +-
tools/binman/control.py | 3 +
tools/binman/elf.py | 174 ++
tools/binman/elf_test.py | 41 +
tools/binman/entry.py | 38 +-
tools/binman/etype/blob.py | 16 +-
tools/binman/etype/cbfs.py | 205 ++
tools/binman/etype/intel_descriptor.py | 16 +-
tools/binman/etype/intel_ifwi.py | 100 +
tools/binman/etype/intel_me.py | 2 +
tools/binman/etype/text.py | 23 +-
tools/binman/etype/u_boot_spl_elf.py | 2 +-
tools/binman/etype/u_boot_tpl_elf.py | 24 +
tools/binman/ftest.py | 247 +-
tools/binman/test/066_text.dts | 5 +
tools/binman/test/096_elf.dts | 2 +
tools/binman/test/102_cbfs_raw.dts | 20 +
tools/binman/test/103_cbfs_raw_ppc.dts | 21 +
tools/binman/test/104_cbfs_stage.dts | 19 +
tools/binman/test/105_cbfs_raw_compress.dts | 26 +
tools/binman/test/106_cbfs_bad_arch.dts | 15 +
tools/binman/test/107_cbfs_no_size.dts | 13 +
tools/binman/test/108_cbfs_no_contents.dts | 17 +
tools/binman/test/109_cbfs_bad_compress.dts | 18 +
tools/binman/test/110_cbfs_name.dts | 24 +
tools/binman/test/111_x86-rom-ifwi.dts | 29 +
tools/binman/test/112_x86-rom-ifwi-nodesc.dts | 28 +
tools/binman/test/113_x86-rom-ifwi-nodata.dts | 29 +
tools/binman/test/114_cbfs_offset.dts | 26 +
tools/binman/test/fitimage.bin.gz | Bin 0 -> 8418 bytes
tools/binman/test/ifwi.bin.gz | Bin 0 -> 1884 bytes
tools/ifwitool.c | 2314 +++++++++++++++++
tools/patman/command.py | 4 +-
tools/patman/tools.py | 141 +-
45 files changed, 5366 insertions(+), 79 deletions(-)
create mode 100644 tools/binman/cbfs_util.py
create mode 100755 tools/binman/cbfs_util_test.py
create mode 100644 tools/binman/etype/cbfs.py
create mode 100644 tools/binman/etype/intel_ifwi.py
create mode 100644 tools/binman/etype/u_boot_tpl_elf.py
create mode 100644 tools/binman/test/102_cbfs_raw.dts
create mode 100644 tools/binman/test/103_cbfs_raw_ppc.dts
create mode 100644 tools/binman/test/104_cbfs_stage.dts
create mode 100644 tools/binman/test/105_cbfs_raw_compress.dts
create mode 100644 tools/binman/test/106_cbfs_bad_arch.dts
create mode 100644 tools/binman/test/107_cbfs_no_size.dts
create mode 100644 tools/binman/test/108_cbfs_no_contents.dts
create mode 100644 tools/binman/test/109_cbfs_bad_compress.dts
create mode 100644 tools/binman/test/110_cbfs_name.dts
create mode 100644 tools/binman/test/111_x86-rom-ifwi.dts
create mode 100644 tools/binman/test/112_x86-rom-ifwi-nodesc.dts
create mode 100644 tools/binman/test/113_x86-rom-ifwi-nodata.dts
create mode 100644 tools/binman/test/114_cbfs_offset.dts
create mode 100644 tools/binman/test/fitimage.bin.gz
create mode 100644 tools/binman/test/ifwi.bin.gz
create mode 100644 tools/ifwitool.c
--
2.22.0.410.gd8fdbe21b5-goog
More information about the U-Boot
mailing list