diff --git a/config/bootscripts/boot-sun50i-next.cmd b/config/bootscripts/boot-sun50i-next.cmd index 69ad79a34d5a..0bd8b1b425c2 100644 --- a/config/bootscripts/boot-sun50i-next.cmd +++ b/config/bootscripts/boot-sun50i-next.cmd @@ -15,8 +15,10 @@ setenv bootlogo "false" setenv vendor "allwinner" -# Remember the default u-boot fdtfile -setenv deffdt_file ${fdtfile} +# Remember the default fdtfile provided by u-boot and delete the vendor name +if setexpr subfdt sub ${vendor}/ "" ${fdtfile};then + setenv deffdt_file ${subfdt} +fi # Remember the default u-boot fdtdir setenv deffdt_dir "${prefix}dtb" @@ -34,6 +36,12 @@ if test -e ${devtype} ${devnum} ${prefix}armbianEnv.txt; then env import -t ${load_addr} ${filesize} fi +# Delete the vendor's name from the fdtfile variable and record the result +# after the file with the environment variables has been read +if setexpr subfdt sub ${vendor}/ "" ${fdtfile};then + setenv fdtfile ${subfdt} +fi + # In this shell, we can only check the existence of the file. # Make a check of reasonable ways to find the dtb file. # Set the true value of the paths.