From: Bohdan Chubuk <chbgdn@gmail.com>
To: Andre Przywara <andre.przywara@arm.com>,
Jagan Teki <jagan@amarulasolutions.com>
Cc: Hans de Goede <hdegoede@redhat.com>,
Jernej Skrabec <jernej.skrabec@gmail.com>,
u-boot@lists.denx.de, Bohdan Chubuk <chbgdn@gmail.com>
Subject: [PATCH] sunxi: avoid double vendor prefix when CONFIG_OF_UPSTREAM is enabled
Date: Sun, 23 Nov 2025 22:43:46 +0200 [thread overview]
Message-ID: <20251123204346.1847095-1-chbgdn@gmail.com> (raw)
When CONFIG_OF_UPSTREAM is enabled, the device tree name provided by SPL
already includes the vendor directory (e.g., "allwinner/board-name").
The existing logic in misc_init_r() unconditionally prepends "allwinner/"
for ARM64 builds, resulting in an incorrect path like
"allwinner/allwinner/board-name.dtb".
This patch modifies the logic to only prepend the vendor prefix if
CONFIG_OF_UPSTREAM is NOT enabled. This ensures compatibility with both
legacy builds and the new upstream devicetree structure.
Signed-off-by: Bohdan Chubuk <chbgdn@gmail.com>
---
board/sunxi/board.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/board/sunxi/board.c b/board/sunxi/board.c
index 2929bc17f08..c68b51d370d 100644
--- a/board/sunxi/board.c
+++ b/board/sunxi/board.c
@@ -834,7 +834,10 @@ int misc_init_r(void)
/* Set fdtfile to match the FIT configuration chosen in SPL. */
spl_dt_name = get_spl_dt_name();
if (spl_dt_name) {
- char *prefix = IS_ENABLED(CONFIG_ARM64) ? "allwinner/" : "";
+ const char *prefix = "";
+
+ if (IS_ENABLED(CONFIG_ARM64) && !IS_ENABLED(CONFIG_OF_UPSTREAM))
+ prefix = "allwinner/";
char str[64];
snprintf(str, sizeof(str), "%s%s.dtb", prefix, spl_dt_name);
--
2.52.0
next reply other threads:[~2025-11-24 0:56 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-23 20:43 Bohdan Chubuk [this message]
2026-01-19 23:09 ` [PATCH] sunxi: avoid double vendor prefix when CONFIG_OF_UPSTREAM is enabled Andre Przywara
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=20251123204346.1847095-1-chbgdn@gmail.com \
--to=chbgdn@gmail.com \
--cc=andre.przywara@arm.com \
--cc=hdegoede@redhat.com \
--cc=jagan@amarulasolutions.com \
--cc=jernej.skrabec@gmail.com \
--cc=u-boot@lists.denx.de \
/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