[PATCH] blspec: drop explicit devicetree "none" handling

Ahmad Fatoum a.fatoum at pengutronix.de
Fri Mar 28 01:34:24 PDT 2025


The bootloader spec mentions only that the devicetree key is optional
and doesn't list none as special value. THe barebox behavior on none
is completely bonkers as it attempts to delete barebox' own device
tree, which nowadays fails with an error message.

Drop that special handling altogether.

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

diff --git a/common/blspec.c b/common/blspec.c
index 1cbadf8963af..77ae3dc21951 100644
--- a/common/blspec.c
+++ b/common/blspec.c
@@ -98,16 +98,8 @@ static int blspec_boot(struct bootentry *be, int verbose, int dryrun)
 
 	data.os_file = basprintf("%s/%s", abspath, linuximage);
 
-	if (devicetree) {
-		if (!strcmp(devicetree, "none")) {
-			struct device_node *node = of_get_root_node();
-			if (node)
-				of_delete_node(node);
-		} else {
-			data.oftree_file = basprintf("%s/%s", abspath,
-						       devicetree);
-		}
-	}
+	if (devicetree)
+		data.oftree_file = basprintf("%s/%s", abspath, devicetree);
 
 	if (overlays)
 		of_register_fixup(blspec_overlay_fixup, entry);
-- 
2.39.5




More information about the barebox mailing list