summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorPhilippe Reynes <philippe.reynes@softathome.com>2020-11-24 14:39:48 +0100
committerTom Rini <trini@konsulko.com>2021-01-22 16:17:52 -0500
commitedfeba7538a23fdb82e7d0784c4b75d600f3547a (patch)
tree4b84199a35a260bf84a666bdd68a6747975ef527 /tools
parent5a4116f1a21e8a53147053d1a80cc71d26b03525 (diff)
downloadu-boot-edfeba7538a23fdb82e7d0784c4b75d600f3547a.tar.gz
u-boot-edfeba7538a23fdb82e7d0784c4b75d600f3547a.tar.xz
u-boot-edfeba7538a23fdb82e7d0784c4b75d600f3547a.zip
tools: image-host: add support for several sub-images
The propoerty sign-images points to images in the configuration node. But thoses images may references severals "sub-images" (for example for images loadable). This commit adds the support of severals sub-images. Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com>
Diffstat (limited to 'tools')
-rw-r--r--tools/image-host.c36
1 files changed, 21 insertions, 15 deletions
diff --git a/tools/image-host.c b/tools/image-host.c
index ce829a8ec9..33a224129a 100644
--- a/tools/image-host.c
+++ b/tools/image-host.c
@@ -805,25 +805,31 @@ static int fit_config_get_hash_list(void *fit, int conf_noffset,
image_count = 0;
for (iname = prop; iname < end; iname += strlen(iname) + 1) {
int image_noffset;
+ int index, max_index;
- image_noffset = fit_conf_get_prop_node(fit, conf_noffset,
- iname);
- if (image_noffset < 0) {
- printf("Failed to find image '%s' in configuration '%s/%s'\n",
- iname, conf_name, sig_name);
- if (allow_missing)
- continue;
+ max_index = fdt_stringlist_count(fit, conf_noffset, iname);
- return -ENOENT;
- }
+ for (index = 0; index < max_index; index++) {
+ image_noffset = fit_conf_get_prop_node_index(fit, conf_noffset,
+ iname, index);
- ret = fit_config_add_hash(fit, conf_name,
- sig_name, node_inc,
- iname, image_noffset);
- if (ret < 0)
- return ret;
+ if (image_noffset < 0) {
+ printf("Failed to find image '%s' in configuration '%s/%s'\n",
+ iname, conf_name, sig_name);
+ if (allow_missing)
+ continue;
- image_count++;
+ return -ENOENT;
+ }
+
+ ret = fit_config_add_hash(fit, conf_name,
+ sig_name, node_inc,
+ iname, image_noffset);
+ if (ret < 0)
+ return ret;
+
+ image_count++;
+ }
}
if (!image_count) {