From 169043d826e6b0db3c67a60acbedfc72c43aae5d Mon Sep 17 00:00:00 2001 From: Pantelis Antoniou Date: Mon, 4 Sep 2017 23:12:16 +0300 Subject: fit: Introduce methods for applying overlays on fit-load Introduce an overlay based method for constructing a base DT blob to pass to the kernel. It is based on a specific method now to get the FDT from a FIT image named boot_get_fdt_fit(). Signed-off-by: Pantelis Antoniou Acked-by: Simon Glass --- include/image.h | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'include') diff --git a/include/image.h b/include/image.h index 339f79c6dc0..af98ed9f25c 100644 --- a/include/image.h +++ b/include/image.h @@ -593,6 +593,31 @@ int boot_get_loadable(int argc, char * const argv[], bootm_headers_t *images, int boot_get_setup_fit(bootm_headers_t *images, uint8_t arch, ulong *setup_start, ulong *setup_len); +/** + * boot_get_fdt_fit() - load a DTB from a FIT file (applying overlays) + * + * This deals with all aspects of loading an DTB from a FIT. + * The correct base image based on configuration will be selected, and + * then any overlays specified will be applied (as present in fit_uname_configp). + * + * @param images Boot images structure + * @param addr Address of FIT in memory + * @param fit_unamep On entry this is the requested image name + * (e.g. "kernel@1") or NULL to use the default. On exit + * points to the selected image name + * @param fit_uname_configp On entry this is the requested configuration + * name (e.g. "conf@1") or NULL to use the default. On + * exit points to the selected configuration name. + * @param arch Expected architecture (IH_ARCH_...) + * @param datap Returns address of loaded image + * @param lenp Returns length of loaded image + * + * @return node offset of base image, or -ve error code on error + */ +int boot_get_fdt_fit(bootm_headers_t *images, ulong addr, + const char **fit_unamep, const char **fit_uname_configp, + int arch, ulong *datap, ulong *lenp); + /** * fit_image_load() - load an image from a FIT * -- cgit v1.3.1