From 21b0b1adec23d2f67e51a47207e691fb41f576dd Mon Sep 17 00:00:00 2001 From: Julius Werner Date: Thu, 16 May 2019 16:12:04 -0700 Subject: 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 Reviewed-on: https://review.coreboot.org/c/coreboot/+/32873 Reviewed-by: Hung-Te Lin Tested-by: build bot (Jenkins) --- src/include/fit.h | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'src/include/fit.h') diff --git a/src/include/fit.h b/src/include/fit.h index 758ee70c9c..1c90aca1ff 100644 --- a/src/include/fit.h +++ b/src/include/fit.h @@ -24,8 +24,7 @@ #include #include -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. */ -- cgit v1.2.3