From 7ee05eddf184764de8aa1e015936a42d069893f2 Mon Sep 17 00:00:00 2001 From: Patrick Rudolph Date: Thu, 26 Apr 2018 09:35:13 +0200 Subject: util/cbfstool: Support FIT payloads In order to support booting a GNU/Linux payload on non x86, the FIT format should be used, as it is the defacto standard on ARM. Due to greater complexity of FIT it is not converted to simple ELF format. Add support for autodecting FIT payloads and add them as new CBFS_TYPE 'fit'. The payload is included as is, with no special header. The code can determine the type at runtime using the CBFS_TYPE field. Support for parsing FIT payloads in coreboot is added in a follow on commit. Compression of FIT payloads is not supported, as the FIT sections might be compressed itself. Starting at this point a CBFS payload/ can be either of type FIT or SELF. Tested on Cavium SoC. Change-Id: Ic5fc30cd5419eb76c4eb50cca3449caea60270de Signed-off-by: Patrick Rudolph Reviewed-on: https://review.coreboot.org/25860 Tested-by: build bot (Jenkins) Reviewed-by: Julius Werner --- payloads/coreinfo/cbfs_module.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'payloads/coreinfo/cbfs_module.c') diff --git a/payloads/coreinfo/cbfs_module.c b/payloads/coreinfo/cbfs_module.c index ee759352bf..275c84e986 100644 --- a/payloads/coreinfo/cbfs_module.c +++ b/payloads/coreinfo/cbfs_module.c @@ -29,6 +29,7 @@ #define COMPONENT_CBFSHEADER 0x02 #define COMPONENT_STAGE 0x10 #define COMPONENT_SELF 0x20 +#define COMPONENT_FIT 0x21 #define COMPONENT_OPTIONROM 0x30 #define COMPONENT_RAW 0x50 #define COMPONENT_MICROCODE 0x53 @@ -190,6 +191,9 @@ static int cbfs_module_redraw(WINDOW * win) case COMPONENT_SELF: mvwprintw(win, row++, 38, "simple ELF"); break; + case COMPONENT_FIT: + mvwprintw(win, row++, 38, "FIT"); + break; case COMPONENT_OPTIONROM: mvwprintw(win, row++, 38, "optionrom"); break; -- cgit v1.2.3