[PATCH] bootm: include origin of device tree in verbose output

Ahmad Fatoum a.fatoum at pengutronix.de
Tue Jun 23 23:06:47 PDT 2026


To make it easier to see at a glance if the device tree to be passed to
Linux is barebox' own or an externally provided DT, include this
information into verbosity level 1.

Previously we only printed "using internal devicetree" at verbosity
level 2, but that's the same level we dump the whole DT, so we bump it
down a level and rename it to make it clear what the DT is internal to
(e.g. it's not a FIT-internal DT).

Signed-off-by: Ahmad Fatoum <a.fatoum at pengutronix.de>
---
 common/bootm.c | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/common/bootm.c b/common/bootm.c
index 26465875ad94..de1b87fe2072 100644
--- a/common/bootm.c
+++ b/common/bootm.c
@@ -328,13 +328,19 @@ void *bootm_get_devicetree(struct image_data *data)
 			return ERR_PTR(-EINVAL);
 		}
 
+		if (bootm_verbose(data))
+			printf("using %s as devicetree\n", data->oftree->name);
+
 	} else {
 		data->of_root_node = of_dup_root_node_for_boot();
-		if (!data->of_root_node)
+		if (!data->of_root_node) {
+			if (bootm_verbose(data))
+				printf("using no devicetree\n");
 			return NULL;
+		}
 
-		if (bootm_verbose(data) > 1)
-			printf("using internal devicetree\n");
+		if (bootm_verbose(data))
+			printf("using barebox's internal devicetree\n");
 	}
 
 	if (data->initrd_res) {
-- 
2.47.3




More information about the barebox mailing list