Skip to contentSkip to conversation

fit: load all fragments from the extra configurations

PATCH In review Peter Ujfalusi 3 participants 3 messages Mar 6, 2019 – Apr 24, 2019

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fit: load all fragments from the extra configurations

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.

---
 common/image-fit.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)
common/image-fit.c +12 -0
index ac901e131ca1..a74b44f2982c 100644
@@ -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);
Signature · 4 lines
Peter

Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki.
Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki
#1 lore raw

PATCH 1/1 fit: load all fragments from the extra configurations

Quoted 19 lines · Peter Ujfalusi

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.

---
 common/image-fit.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)
common/image-fit.c +2 -0
index ac901e131ca1..a74b44f2982c 100644
@@ -2118,6 +2118,18 @@ int boot_get_fdt_fit(bootm_headers_t *images, ulong addr,
 			if (next_config)
 				*next_config++ = '\0';
 			uname = NULL;
+
+			/*

common/image-fit.c int boot_get_fdt_fit(bootm_headers_t *images, ulong addr, · line 2132

Quoted 10 lines
common/image-fit.c +10 -0
+			 * 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);

This is a nice extension to the extra configs.

Thanks and regards,
Lokesh

#2 lore raw
In reply to Peter Ujfalusi
Quoted 6 lines · Peter Ujfalusi

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.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20190424/e361f33d/attachment.sig>