]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
fit: load all fragments from the extra configurations
authorPeter Ujfalusi <peter.ujfalusi@ti.com>
Wed, 6 Mar 2019 13:52:27 +0000 (15:52 +0200)
committerTom Rini <trini@konsulko.com>
Mon, 22 Apr 2019 22:13:23 +0000 (18:13 -0400)
Currently only the first fdt is loaded from the extra configuration of
FIT image.
If the configuration have multiple fdt, load them all as well.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>
common/image-fit.c

index ac901e131ca1edca2b9d7ebc0d18bf1c75060859..a74b44f2982cdcfb197569e5e0c9659de0dd788d 100644 (file)
@@ -2118,6 +2118,18 @@ int boot_get_fdt_fit(bootm_headers_t *images, ulong addr,
                        if (next_config)
                                *next_config++ = '\0';
                        uname = NULL;
+
+                       /*
+                        * fit_image_load() would load the first FDT from the
+                        * extra config only when uconfig is specified.
+                        * Check if the extra config contains multiple FDTs and
+                        * if so, load them.
+                        */
+                       cfg_noffset = fit_conf_get_node(fit, uconfig);
+
+                       i = 0;
+                       count = fit_conf_get_prop_node_count(fit, cfg_noffset,
+                                                            FIT_FDT_PROP);
                }
 
                debug("%d: using uname=%s uconfig=%s\n", i, uname, uconfig);