From a892cde653d40e39d399b1bc4c438e3dc2d00cd6 Mon Sep 17 00:00:00 2001 From: Patrick Rudolph Date: Thu, 19 Apr 2018 14:39:07 +0200 Subject: lib: Add FIT payload support * Add support for parsing and booting FIT payloads. * Build fit loader code from depthcharge. * Fix coding style. * Add Kconfig option to add compiletime support for FIT. * Add support for initrd. * Add default compat strings * Apply optional devicetree fixups using dt_apply_fixups Starting at this point the CBFS payload/ can be either SELF or FIT. Tested on Cavium SoC: Parses and loads a Linux kernel 4.16.3. Tested on Cavium SoC: Parses and loads a Linux kernel 4.15.0. Tested on Cavium SoC: Parses and loads a Linux kernel 4.1.52. Change-Id: I0f27b92a5e074966f893399eb401eb97d784850d Signed-off-by: Patrick Rudolph Reviewed-on: https://review.coreboot.org/25019 Tested-by: build bot (Jenkins) Reviewed-by: Philipp Deppenwiese --- payloads/Kconfig | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) (limited to 'payloads/Kconfig') diff --git a/payloads/Kconfig b/payloads/Kconfig index 2a329ac08f..782f3e0cf9 100644 --- a/payloads/Kconfig +++ b/payloads/Kconfig @@ -8,6 +8,17 @@ choice default PAYLOAD_NONE if NO_DEFAULT_PAYLOAD || !ARCH_X86 default PAYLOAD_SEABIOS if ARCH_X86 +config PAYLOAD_FIT + bool "A FIT payload" + select PAYLOAD_FIT_SUPPORT + help + Select this option if you have a payload image (a FIT file) which + coreboot should run as soon as the basic hardware initialization + is completed. + + You will be able to specify the location and file name of the + payload image later. + config PAYLOAD_NONE bool "None" help @@ -44,8 +55,9 @@ source "payloads/bayou/Kconfig" config PAYLOAD_FILE string "Payload path and filename" - depends on PAYLOAD_ELF - default "payload.elf" + depends on PAYLOAD_ELF || PAYLOAD_FIT + default "payload.elf" if PAYLOAD_ELF + default "uImage" if PAYLOAD_FIT help The path and filename of the ELF executable file to use as payload. @@ -82,6 +94,16 @@ config PAYLOAD_IS_FLAT_BINARY Add the payload to cbfs as a flat binary type instead of as an elf payload +config PAYLOAD_FIT_SUPPORT + bool "FIT support" + default n + default y if PAYLOAD_LINUX && (ARCH_ARM || ARCH_ARM64) + select FLATTENED_DEVICE_TREE + help + Select this option if your payload is of type FIT. + Enables FIT parser and devicetree patching. The FIT is non + self-extracting and need to have a compatible compression format. + config COMPRESS_SECONDARY_PAYLOAD bool "Use LZMA compression for secondary payloads" default y -- cgit v1.2.3