This patch series is part of a larger effort to get linux to boot really fast alongside a secure OS. One piece of the puzzle is getting Linux and OP-TEE to boot straight from SPL. This is where the FIT image comes in.
The "simple" fit code was mostly ready for this, although it was quite difficult to navigate. As I was figuring out the required changes, I realized I had also managed to do some major refactoring. In fact, of the eight changes, (6) are refactoring patches, and (2) are functional changes. I wish I could have written this with a negative line count. I have unfortunately failed at that, and this series will be adding 11 lines to u-boot. The takeaway is that the following type FIT can be loaded from SPL directly: images { optee@1 { type = "tee"; os = "tee"; ... }; kernel@1 { type = "kernel"; os = "linux"; ... }; f...@devicetree.dtb { ... } f...@overlay.dto { ... }; }; configurations { conf@quickboot { kernel = "optee@1"; fdt = "f...@stm32mp157c-ev1.dtb", "f...@overlay.dto"; loadables = "kernel@1"; }; }; This series is designed to apply to u-boot/next: * 8351a29d2d Merge tag 'dm-pull-14dec20' of git://git.denx.de/u-boot-dm into next Changes since v1: * Added struct comments (Simon Glass) * Added comment do describe args of board_spl_fit_post_load() (Simon Glass) * Fixed predicate of if clause on spl_load_simple_fit() (me) Changes since v2: * Fixed embarrasing rebase mishap on one of the patches. Alexandru Gagniuc (8): spl: fit: Drop 'length' argument to board_spl_fit_post_load() spl: fit: Factor out FIT parsing and use a context struct spl: fit: Pass FIT context via a structure pointer spl: fit: Remove useless loop in spl_fit_get_image_name() spl: fit: Only look up FIT configuration node once image: Do not #if guard board_fit_config_name_match() prototype spl: fit: Replace #ifdef blocks with more readable constructs spl: fit: Load devicetree when a Linux payload is found arch/arm/mach-imx/spl.c | 5 +- common/spl/spl_fit.c | 261 +++++++++++++++++++++------------------- include/image.h | 3 - include/spl.h | 4 +- 4 files changed, 141 insertions(+), 132 deletions(-) -- 2.26.2