board: unmatched: Workaround failure to find .dtb file.
Subsystems (2)
PATCH 1/1 board: unmatched: Workaround failure to find .dtb file.
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
Other platforms (e.g. rockpro64-rk3399) do not contain quotes in the fdtfile variable, and work properly out of the box.
The workaround suggested by marex is to hard-code the correct .dtb value, which works for me.
This has been present at least since version 2025.01, also present in 2026.01. I have not yet tested against git master branch.
This could probably be properly fixed by stripping the quotes in whatever processes the .env file. There are numerous other boards that have the same way of setting the fdtfile variable, which might similarly be effected by this issue.
Not sure who all to CC on this, please feel free to forward appropriately!
--- board/sifive/unmatched/unmatched.env | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
board/sifive/unmatched/unmatched.env +1 -1
@@ -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=sifive/hifive-unmatched-a00.dtb
Signature · 1 line
2.47.3
Quoted 25 lines · Vagrant Cascadian
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 dtsOther platforms (e.g. rockpro64-rk3399) do not contain quotes in the fdtfile variable, and work properly out of the box.
The workaround suggested by marex is to hard-code the correct .dtb value, which works for me.
This has been present at least since version 2025.01, also present in 2026.01. I have not yet tested against git master branch.
This could probably be properly fixed by stripping the quotes in whatever processes the .env file. There are numerous other boards that have the same way of setting the fdtfile variable, which might similarly be effected by this issue.
Quoted 4 lines
Signed-off-by Vagrant Cascadian <[email protected]>Not sure who all to CC on this, please feel free to forward appropriately!
./scripts/get_maintainer.pl -f board/sifive/unmatched/
produces a few names, added
Quoted 9 lines
--- board/sifive/unmatched/unmatched.env | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)board/sifive/unmatched/unmatched.env +0
-0
board/sifive/unmatched/unmatched.env partitions= · line 19
Quoted 5 lines
board/sifive/unmatched/unmatched.env +1
-1@@ -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=sifive/hifive-unmatched-a00.dtb
Also +CC Peng because iMX is also affected.
Tom Rini
Reviewed-byQuoted 39 lines · Marek Vasut
Quoted 25 lines · Vagrant Cascadian
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 dtsOther platforms (e.g. rockpro64-rk3399) do not contain quotes in the fdtfile variable, and work properly out of the box.
The workaround suggested by marex is to hard-code the correct .dtb value, which works for me.
This has been present at least since version 2025.01, also present in 2026.01. I have not yet tested against git master branch.
This could probably be properly fixed by stripping the quotes in whatever processes the .env file. There are numerous other boards that have the same way of setting the fdtfile variable, which might similarly be effected by this issue.
Quoted 4 lines
Signed-off-by Vagrant Cascadian <[email protected]>Not sure who all to CC on this, please feel free to forward appropriately!
./scripts/get_maintainer.pl-f board/sifive/unmatched/produces a few names, added
Quoted 4 lines
--- board/sifive/unmatched/unmatched.env | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Quoted 12 lines
board/sifive/unmatched/unmatched.env partitions= · line 19
Quoted 10 lines
board/sifive/unmatched/unmatched.env +1
-1@@ -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=sifive/hifive-unmatched-a00.dtbAlso +CC Peng because iMX is also affected.
I'm setting aside the question of why we have both DEFAULT_FDT_FILE and DEFAULT_DEVICE_TREE and pointing to:
commit d085e692c98d0d7b57cc577ed9befda159cd4a40
Author: Simon Glass <[email protected]> Date: Wed Nov 13 08:09:37 2024 -0700
env: Provide a work-around for unquoting fdtfile
Some boards use a CONFIG option to specify the value of this variable. This is normally handled by efi_get_distro_fdt_name() but in the case of sunxi this does not work, since 'soc' is sunxi, but the files are in the allwinner directory.
Provide a work-around for this particular case.
As how to address this issue as well, unless someone discovers something still more clever to deal with quoting.
Signature · 1 line
Tom
Quoted 66 lines · Tom Rini
Quoted 39 lines · Marek Vasut
Quoted 25 lines · Vagrant Cascadian
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 dtsOther platforms (e.g. rockpro64-rk3399) do not contain quotes in the fdtfile variable, and work properly out of the box.
The workaround suggested by marex is to hard-code the correct .dtb value, which works for me.
This has been present at least since version 2025.01, also present in 2026.01. I have not yet tested against git master branch.
This could probably be properly fixed by stripping the quotes in whatever processes the .env file. There are numerous other boards that have the same way of setting the fdtfile variable, which might similarly be effected by this issue.
Quoted 4 lines
Signed-off-by Vagrant Cascadian <[email protected]>Not sure who all to CC on this, please feel free to forward appropriately!
./scripts/get_maintainer.pl-f board/sifive/unmatched/produces a few names, added
Quoted 4 lines
--- board/sifive/unmatched/unmatched.env | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)Quoted 12 lines
board/sifive/unmatched/unmatched.env partitions= · line 19
Quoted 10 lines
board/sifive/unmatched/unmatched.env +1
-1@@ -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=sifive/hifive-unmatched-a00.dtbAlso +CC Peng because iMX is also affected.
I'm setting aside the question of why we have both
DEFAULT_FDT_FILEandDEFAULT_DEVICE_TREEand pointing to:
commitd085e692c98d0d7b57cc577ed9befda159cd4a40Author: Simon Glass <[email protected]> Date: Wed Nov 13 08:09:37 2024 -0700env: Provide a work-around for unquoting fdtfile
Some boards use a CONFIG option to specify the value of this variable. This is normally handled by
efi_get_distro_fdt_name()but in the case of sunxi this does not work, since 'soc' is sunxi, but the files are in the allwinner directory.
Quoted 7 lines
Provide a work-around for this particular case.
Signed-off-by Simon Glass <[email protected]>Reviewed-by Tom Rini <[email protected]>As how to address this issue as well, unless someone discovers something still more clever to deal with quoting.
Thanks for the hint! So a quick and dirty stab at getting this to work:
Makefile +1 -1
@@ -2137,7 +2137,7 @@ quiet_cmd_gen_envp = ENVP $@ $(CPP) -P $(cpp_flags) -x assembler-with-cpp -undef \ -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 \
board/sifive/unmatched/unmatched.env +1 -1
@@ -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
Though obviously any boards relying on DEFAULT_DEVICE_TREE would need adapting with my quick patch above...
I did not successfully just add -DDEFAULT_FDT_FILE without removing -DDEFAULT_DEVICE_TREE ... probably just need to cut-and-paste more lines in the Makefile... or try to do something even more clever. :)
That would also require the other handfull of boards using CONFIG_DEFAULT_FDT_FILE to switch to DEFAULT_FDT_FILE, presumably.
I also tried switching the unmatched board to use DEFAULT_DEVICE_TREE instead, but that does not contain the vendor prefix
(e.g. hifive-unmatched-a00 vs. sifive/hifive-unmatched-a00.dtb) and so the file was still not found. Should CONFIG_DEFAULT_DEVICE_TREE and CONFIG_DEFAULT_FDT_FILE both contain the vendor dir?
live well,
vagrant
Quoted 101 lines · Vagrant Cascadian
Quoted 66 lines · Tom Rini
Quoted 39 lines · Marek Vasut
Quoted 25 lines · Vagrant Cascadian
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 dtsOther platforms (e.g. rockpro64-rk3399) do not contain quotes in the fdtfile variable, and work properly out of the box.
The workaround suggested by marex is to hard-code the correct .dtb value, which works for me.
This has been present at least since version 2025.01, also present in 2026.01. I have not yet tested against git master branch.
This could probably be properly fixed by stripping the quotes in whatever processes the .env file. There are numerous other boards that have the same way of setting the fdtfile variable, which might similarly be effected by this issue.
Quoted 4 lines
Signed-off-by Vagrant Cascadian <[email protected]>Not sure who all to CC on this, please feel free to forward appropriately!
./scripts/get_maintainer.pl-f board/sifive/unmatched/produces a few names, added
Quoted 4 lines
--- board/sifive/unmatched/unmatched.env | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)Quoted 12 lines
board/sifive/unmatched/unmatched.env partitions= · line 19
Quoted 10 lines
board/sifive/unmatched/unmatched.env +1
-1@@ -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=sifive/hifive-unmatched-a00.dtbAlso +CC Peng because iMX is also affected.
I'm setting aside the question of why we have both
DEFAULT_FDT_FILEandDEFAULT_DEVICE_TREEand pointing to:
commitd085e692c98d0d7b57cc577ed9befda159cd4a40Author: Simon Glass <[email protected]> Date: Wed Nov 13 08:09:37 2024 -0700env: Provide a work-around for unquoting fdtfile
Some boards use a CONFIG option to specify the value of this variable. This is normally handled by
efi_get_distro_fdt_name()but in the case of sunxi this does not work, since 'soc' is sunxi, but the files are in the allwinner directory.Quoted 7 lines
Provide a work-around for this particular case.
Signed-off-by Simon Glass <[email protected]>Reviewed-by Tom Rini <[email protected]>As how to address this issue as well, unless someone discovers something still more clever to deal with quoting.
Thanks for the hint! So a quick and dirty stab at getting this to work:
Makefile +1
-1@@ -2137,7 +2137,7 @@ quiet_cmd_gen_envp = ENVP $@ $(CPP) -P $(cpp_flags) -x assembler-with-cpp -undef \ -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 \board/sifive/unmatched/unmatched.env +1
-1@@ -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
Quoted 2 lines
Though obviously any boards relying on
DEFAULT_DEVICE_TREEwould need adapting with my quick patch above...
The rest of the platforms, yes. If you can do a patch to fixup unmatched, I can follow-up with the rest.
Quoted 8 lines
I did not successfully just add -DDEFAULT_FDT_FILE without removing -DDEFAULT_DEVICE_TREE ... probably just need to cut-and-paste more lines in the
Makefile... or try to do something even more clever. :)That would also require the other handfull of boards using
CONFIG_DEFAULT_FDT_FILEto switch toDEFAULT_FDT_FILE, presumably.
Quoted 5 lines
I also tried switching the unmatched board to use
DEFAULT_DEVICE_TREEinstead, but that does not contain the vendor prefix
(e.g. hifive-unmatched-a00 vs. sifive/hifive-unmatched-a00.dtb) and so the file was still not found. ShouldCONFIG_DEFAULT_DEVICE_TREEandCONFIG_DEFAULT_FDT_FILEboth contain the vendor dir?
Ah, probably a difference between platforms that use OF_UPSTREAM, or not, then.
Signature · 1 line
Tom