Skip to contentSkip to conversation

env: Provide another work-around for unquoting fdtfile

PATCH In review [email protected] 2 participants 4 messages Jan 30 – Feb 11

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/2 env: Provide another work-around for unquoting fdtfile

From: Vagrant Cascadian <[email protected]>

Some boards use CONFIG_DEFAULT_FDT_FILE to specify the value of fdtfile, althugh the quotes get embedded in the value.

Provide DEFAULT_FDT_FILE with the quotes stripped.

This is a similar work-around to the one provided in commit d085e692c98d0d7b57cc577ed9befda159cd4a40 for CONFIG_DEFAULT_DEVICE_TREE.

---
 Makefile | 1 +
 1 file changed, 1 insertion(+)
Makefile +1 -0
index 435a4bf372d..75d407a24f5 100644
@@ -2138,6 +2138,7 @@ quiet_cmd_gen_envp = ENVP    $@
 			-D__ASSEMBLY__ \
 			-D__UBOOT_CONFIG__ \
 			-DDEFAULT_DEVICE_TREE=$(subst ",,$(CONFIG_DEFAULT_DEVICE_TREE)) \
+			-DDEFAULT_FDT_FILE=$(subst ",,$(CONFIG_DEFAULT_FDT_FILE)) \
 			-I . -I include -I $(srctree)/include \
 			-include linux/kconfig.h -include include/config.h \
 			-I$(srctree)/arch/$(ARCH)/include \
Signature · 1 line
2.47.3
#1 lore raw

PATCH 2/2 board: sifive: unmatched: set fdtfile with unquoted variable.

From: Vagrant Cascadian <[email protected]>

The fdtdfile variable contains quotes:

printenv fdtfile
fdtfile="sifive/hifive-unmatched-a00.dtb"

But this leads to issues which booting with an extlinux.conf format file failing to find the .dtb file:

Retrieving file: /usr/lib/linux-image-6.12.63+deb13-riscv64/"sifive/hifive-unmatched-a00.dtb" Skipping fdtdir /usr/lib/linux-image-6.12.63+deb13-riscv64/ for failure retrieving dts

Use the DEFAULT_FDT_FILE variable which has the quotes removed.

---
 board/sifive/unmatched/unmatched.env | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
board/sifive/unmatched/unmatched.env +1 -1
index 34425dc9efa..f309229481b 100644
@@ -16,4 +16,4 @@ partitions=
     name=loader1,start=17K,size=1M,type=${type_guid_gpt_loader1};
     name=loader2,size=4MB,type=${type_guid_gpt_loader2};
     name=system,size=-,bootable,type=${type_guid_gpt_system};
-fdtfile=CONFIG_DEFAULT_FDT_FILE
+fdtfile=DEFAULT_FDT_FILE
Signature · 1 line
2.47.3
Reviewed-by on v1 1/2
#2 lore raw
In reply to [email protected]
Quoted 5 lines · On Thu, Jan 29, 2026 at 08:04:23PM -0800, [email protected] wrote:

From: Vagrant Cascadian <[email protected]>

Some boards use CONFIG_DEFAULT_FDT_FILE to specify the value of fdtfile, althugh the quotes get embedded in the value.

Quoted 7 lines

Provide DEFAULT_FDT_FILE with the quotes stripped.

This is a similar work-around to the one provided in commit d085e692c98d0d7b57cc577ed9befda159cd4a40 for CONFIG_DEFAULT_DEVICE_TREE.

Signature · 1 line
Tom
#3 lore raw
In reply to [email protected]
Quoted 10 lines · On Thu, 29 Jan 2026 20:04:23 -0800, [email protected] wrote:

Some boards use CONFIG_DEFAULT_FDT_FILE to specify the value of fdtfile, althugh the quotes get embedded in the value.

Provide DEFAULT_FDT_FILE with the quotes stripped.

This is a similar work-around to the one provided in commit d085e692c98d0d7b57cc577ed9befda159cd4a40 for CONFIG_DEFAULT_DEVICE_TREE.

[...]

Applied to u-boot/next, thanks!

[1/2] env: Provide another work-around for unquoting fdtfile

      commit: b3087d21f022e29678e396b425e4a78ff7cf0912
[2/2] board: sifive: unmatched: set fdtfile with unquoted variable.
      commit: 03d2d5fc003f355515e202c14aee8cc543b730e4
Signature · 1 line
Tom