fit: Add overlay support

This patch adds support to boot FIT image configurations consisting of
a base device tree and one or more overlays. Since extracting the right
compatible string from overlay FDTs is problematic, we'll only support
this for FIT images that have the compatible string pulled out into the
config node.

This patch was adapted from depthcharge's http://crosreview.com/1555293

Change-Id: I0943f9a1869c9e416887c7ff16e33f7d91b74989
Signed-off-by: Julius Werner <jwerner@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/32873
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
Julius Werner
2019-05-16 16:12:04 -07:00
committed by Patrick Georgi
parent fec4206299
commit 21b0b1adec
3 changed files with 55 additions and 5 deletions

View File

@ -24,8 +24,7 @@
#include <list.h>
#include <program_loading.h>
struct fit_image_node
{
struct fit_image_node {
const char *name;
void *data;
uint32_t size;
@ -34,11 +33,11 @@ struct fit_image_node
struct list_node list_node;
};
struct fit_config_node
{
struct fit_config_node {
const char *name;
struct fit_image_node *kernel;
struct fit_image_node *fdt;
struct list_node overlays;
struct fit_image_node *ramdisk;
struct fdt_property compat;
int compat_rank;
@ -48,6 +47,11 @@ struct fit_config_node
struct list_node list_node;
};
struct fit_overlay_chain {
struct fit_image_node *overlay;
struct list_node list_node;
};
/*
* Updates the cmdline in the devicetree.
*/