mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: barebox@lists.infradead.org
Cc: Ahmad Fatoum <a.fatoum@pengutronix.de>
Subject: [PATCH] blspec: drop explicit devicetree "none" handling
Date: Fri, 28 Mar 2025 09:34:24 +0100	[thread overview]
Message-ID: <20250328083424.512384-1-a.fatoum@pengutronix.de> (raw)

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@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




             reply	other threads:[~2025-03-28  8:36 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-28  8:34 Ahmad Fatoum [this message]
2025-03-31  6:57 ` Sascha Hauer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250328083424.512384-1-a.fatoum@pengutronix.de \
    --to=a.fatoum@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox