coreboot/util/cbfstool
Filip Lewiński f164feba3e ifittool: allow adding files from a separate region
Allows ifittool to add FIT entries for files that are located in a
different FMAP region than the FIT table.

The region from where to source the file can be specified with -R.
If not given it defaults to using the value of the mandatory -r,
for full backwards compatibility.

Example: Tested with a custom binary with the bootblock and
corresponding FIT table in a separate region, and the microcode still
in the COREBOOT region:

λ ./ifittool -f test_ts.rom -a -n cpu_microcode_blob.bin -t 1 \
	-r BOOTBLOCK \
	-R COREBOOT \
	-s 4

Change-Id: I7e49247f280ec118e09cf173795d7602a4c0d7f6
Signed-off-by: Filip Lewiński <filip.lewinski@3mdeb.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/89608
Reviewed-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2025-11-16 18:35:12 +00:00
..
bpdt_formats util: Rename Makefiles from .inc to .mk 2024-01-26 12:43:18 +00:00
console util/cbfstool: Wrap logging macros in do - while 2022-10-13 17:07:02 +00:00
flashmap util/cbfstool: Refine type and signatures 2025-01-12 07:54:27 +00:00
fpt_formats util: Rename Makefiles from .inc to .mk 2024-01-26 12:43:18 +00:00
lz4 tree: Replace scan-build by clang-tidy 2025-07-01 01:12:32 +00:00
lzma
tests elogtool: add pytest for elogtool 2021-10-25 08:08:41 +00:00
.gitignore util/cbfstool/.gitignore: Add CSE tool executables 2021-11-29 18:44:34 +00:00
amdcompress.c util/cbfstool/amdcompress: Bail out on invalid ELF 2025-07-23 17:00:41 +00:00
cbfs-mkpayload.c cbfs: Remove broken remnants of PAYLOAD_INFO feature 2024-03-13 18:51:11 +00:00
cbfs-mkstage.c util/cbfstool: Deal with how lld organizes loadable segments 2024-11-06 04:54:22 +00:00
cbfs-payload-linux.c util/cbfstool/cbfs-payload-linux.c: Remove TODO 2025-11-06 20:48:21 +00:00
cbfs.h cbfstool: Add printing of legacy stage type 2024-03-27 14:00:56 +00:00
cbfs_glue.h cbfs/vboot: Adapt to new vb2_digest API 2022-09-02 23:51:29 +00:00
cbfs_image.c util/cbfstool: Add missing \n and use __func__ in debug messages 2025-02-27 16:24:53 +00:00
cbfs_image.h util/cbfstool: Fix truncate command error handling and cbfs_image_from_buffer() 2022-08-03 23:24:49 +00:00
cbfs_sections.c util/: Replace GPLv2 boiler plate with SPDX header 2020-05-09 21:22:08 +00:00
cbfs_sections.h cbfstool: Support CONFIG_CBFS_VERIFICATION and metadata hash anchor 2021-03-13 04:16:20 +00:00
cbfscomptool.c cbfstool: Use cbfs_serialized.h and standard vboot helpers 2020-12-03 00:00:33 +00:00
cbfstool.c cbfstool: Fix the help text 2025-03-10 05:26:46 +00:00
coff.h util/cbfstool: Add support for ARM64 UefiPayload 2021-10-04 02:31:01 +00:00
common.c treewide: Work around GCC 15 Werror=unterminated-string-initialization 2025-06-09 07:19:09 +00:00
common.h util/cbfstool/common.h Fix wrong return value doc 2024-08-05 13:10:08 +00:00
compress.c util/cbfstool: fix memory leak in compress.c 2022-11-02 21:40:25 +00:00
cse_fpt.c util/cse*: Add cse_helpers.{c,h} 2021-10-19 16:08:45 +00:00
cse_fpt.h util/cse*: Add cse_helpers.{c,h} 2021-10-19 16:08:45 +00:00
cse_helpers.c util/cse*: Add cse_helpers.{c,h} 2021-10-19 16:08:45 +00:00
cse_helpers.h util/cse*: Add cse_helpers.{c,h} 2021-10-19 16:08:45 +00:00
cse_serger.c region: Turn region_end() into an inclusive region_last() 2024-08-23 01:08:16 +00:00
cse_serger.h util/cse_serger: Replace cse_layout_regions with array of regions 2021-10-19 16:10:12 +00:00
default-x86.fmd mb/*/*/*.fmd: Start flash at 0 2025-04-09 17:11:43 +00:00
default.fmd mb/*/*/*.fmd: Start flash at 0 2025-04-09 17:11:43 +00:00
description.md
elf.h cbfstool: Add support for platform "fixups" when modifying bootblock 2021-03-13 04:17:35 +00:00
elfheaders.c cbfstool: Read XIP stage alignment requirements from ELF 2024-06-20 19:34:14 +00:00
elfparsing.h cbfstool: Read XIP stage alignment requirements from ELF 2024-06-20 19:34:14 +00:00
elogtool.c util/cbfstool/eventlog: Use LocalTime or UTC timestamps 2023-03-02 13:05:35 +00:00
eventlog.c commonlib/bsd: Add Bluetooth wake source in ELOG event data 2025-09-10 21:39:05 +00:00
eventlog.h util/cbfstool/eventlog: Use LocalTime or UTC timestamps 2023-03-02 13:05:35 +00:00
EXAMPLE
fdt.h treewide: replace GPLv2 long form headers with SPDX header 2020-05-06 22:20:57 +00:00
fit.c ifittool: allow adding files from a separate region 2025-11-16 18:35:12 +00:00
fit.h ifittool: allow adding files from a separate region 2025-11-16 18:35:12 +00:00
flashmap_tests.c util/: Replace GPLv2 boiler plate with SPDX header 2020-05-09 21:22:08 +00:00
flashrom.c util: Drop flashrom -p host alias which equals to -p internal 2023-09-25 14:06:32 +00:00
flashrom.h treewide: Unify Google branding 2022-07-04 14:02:26 +00:00
fmap_from_fmd.c util/: Replace GPLv2 boiler plate with SPDX header 2020-05-09 21:22:08 +00:00
fmap_from_fmd.h util/: Replace GPLv2 boiler plate with SPDX header 2020-05-09 21:22:08 +00:00
fmaptool.c util/cbfstool/fmaptool: Generate list of terminal sections 2020-12-08 18:59:05 +00:00
fmd.c util/: Replace GPLv2 boiler plate with SPDX header 2020-05-09 21:22:08 +00:00
fmd.h util/cbfstool/fmd: make flashmap_flags bitfield struct elements unsigned 2020-09-23 13:39:14 +00:00
fmd_parser.c_shipped util/cbfstool: Revise lex/yacc (bison) generation 2023-09-28 21:28:37 +00:00
fmd_parser.h_shipped util/cbfstool: Revise lex/yacc (bison) generation 2023-09-28 21:28:37 +00:00
fmd_parser.y util/: Replace GPLv2 boiler plate with SPDX header 2020-05-09 21:22:08 +00:00
fmd_scanner.c_shipped util/cbfstool: Revise lex/yacc (bison) generation 2023-09-28 21:28:37 +00:00
fmd_scanner.h_shipped util/cbfstool: Revise lex/yacc (bison) generation 2023-09-28 21:28:37 +00:00
fmd_scanner.l util/: Replace GPLv2 boiler plate with SPDX header 2020-05-09 21:22:08 +00:00
fv.h util/cbftool: Fix the bug in parsing Uefipayload with extended header 2021-09-02 06:07:08 +00:00
ifittool.c ifittool: allow adding files from a separate region 2025-11-16 18:35:12 +00:00
ifwitool.c util: Use C99 flexible arrays 2023-08-01 12:51:25 +00:00
linux.h util/cbfstool: Qualify struct e820entry as packed 2023-04-16 14:04:32 +00:00
linux_trampoline.c util/cbfstool/linux_trampoline: Support more e820 entries 2024-02-18 07:50:28 +00:00
linux_trampoline.h util/cbfstool/linux_trampoline.h: Fix typo in comment 2021-06-04 12:35:14 +00:00
linux_trampoline.S util/cbfstool: Fix linux_trampoline.c generation 2024-06-03 16:54:02 +00:00
Makefile util: Break up spdx identifier text in scripts & makefiles 2024-06-19 17:42:43 +00:00
Makefile.mk util: Rename Makefiles from .inc to .mk 2024-01-26 12:43:18 +00:00
option.h util/: Replace GPLv2 boiler plate with SPDX header 2020-05-09 21:22:08 +00:00
partitioned_file.c util/cbfstool: unbreak compilation on FreeBSD 2021-01-13 12:07:17 +00:00
partitioned_file.h util/: Replace GPLv2 boiler plate with SPDX header 2020-05-09 21:22:08 +00:00
platform_fixups.c cbfstool: Add multi ELF support 2025-06-26 16:56:14 +00:00
ProcessorBind.h util: Use SPDX headers 2020-05-11 19:38:40 +00:00
rmodtool.c util/: Replace GPLv2 boiler plate with SPDX header 2020-05-09 21:22:08 +00:00
rmodule.c cbfstool: Skip relocation entries pointing to undefined symbol 2023-10-20 14:32:20 +00:00
rmodule.h cbfstool: Make add-stage support multiple loadable segments 2023-09-14 21:01:56 +00:00
xdr.c util/: Replace GPLv2 boiler plate with SPDX header 2020-05-09 21:22:08 +00:00