Skip to contentSkip to conversation

boot/fit: print name of config node not found

PATCH In review Frank Wunderlich 3 participants 3 messages Jan 16 – Jan 28

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 boot/fit: print name of config node not found

From: Frank Wunderlich <[email protected]>

Show name of configuration node which was not found.

current state gives no hint if fit image is wrong or the requested name.

Could not find configuration node
load of <NULL> failed

After this patch we see name like this:

Could not find configuration node '#ov-test'
load of <NULL> failed

---
v2
- handle null

---
 boot/image-fit.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
boot/image-fit.c +2 -1
index 2d040e38d97b..85026c2d1d02 100644
@@ -2125,7 +2125,8 @@ int fit_image_load(struct bootm_headers *images, ulong addr,
 		if (ret < 0 && ret != -EINVAL)
 			ret = fit_conf_get_node(fit, fit_uname_config);
 		if (ret < 0) {
-			puts("Could not find configuration node\n");
+			printf("Could not find configuration node '%s'\n",
+			       fit_uname_config ? fit_uname_config : "(null)");
 			bootstage_error(bootstage_id +
 					BOOTSTAGE_SUB_NO_UNIT_NAME);
 			return -ENOENT;
Signature · 1 line
2.43.0
Reviewed-by on v2 1/1
#1 lore raw

Hi Frank,

Quoted 27 lines · Frank Wunderlich

From: Frank Wunderlich <[email protected]>

Show name of configuration node which was not found.

current state gives no hint if fit image is wrong or the requested name.

Could not find configuration node
load of <NULL> failed

After this patch we see name like this:

Could not find configuration node '#ov-test'
load of <NULL> failed

---
v2
- handle null

---
  boot/image-fit.c | 3 ++-
  1 file changed, 2 insertions(+), 1 deletion(-)
boot/image-fit.c +0 -0
index 2d040e38d97b..85026c2d1d02 100644

boot/image-fit.c int fit_image_load(struct bootm_headers *images, ulong addr, · line 2129

Quoted 6 lines
boot/image-fit.c +2 -1
@@ -2125,7 +2125,8 @@ int fit_image_load(struct bootm_headers *images, ulong addr,
  		if (ret < 0 && ret != -EINVAL)
  			ret = fit_conf_get_node(fit, fit_uname_config);
  		if (ret < 0) {
-			puts("Could not find configuration node\n");
+			printf("Could not find configuration node '%s'\n",
+			       fit_uname_config ? fit_uname_config : "(null)");

Given that DT node names cannot contain parentheses according to the Device Tree specification, "(null)" should hopefully not confuse users?

Thus,

Thanks!
Quentin

#2 lore raw
In reply to Frank Wunderlich
Quoted 8 lines · Frank Wunderlich

Show name of configuration node which was not found.

current state gives no hint if fit image is wrong or the requested name.

Could not find configuration node
load of <NULL> failed

[...]

Applied to u-boot/master, thanks!

[1/1] boot/fit: print name of config node not found

      commit: 09cc6788683172a5588eca2cb7536a20a600faa9
Signature · 1 line
Tom