diff --git a/config/bootscripts/boot-sunxi.cmd b/config/bootscripts/boot-sunxi.cmd index df12f198960b..86f5f7052979 100644 --- a/config/bootscripts/boot-sunxi.cmd +++ b/config/bootscripts/boot-sunxi.cmd @@ -45,6 +45,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. @@ -112,7 +118,8 @@ if test -e ${devtype} ${devnum} "${prefix}.next"; then echo "Error applying DT overlays, restoring original DT" load ${devtype} ${devnum} ${fdt_addr_r} ${fdtdir}/${fdtfile} else - if load ${devtype} ${devnum} ${load_addr} ${fdtdir}/overlay/${overlay_prefix}-fixup.scr; then + if test -e ${devtype} ${devnum} ${fdtdir}/overlay/${overlay_prefix}-fixup.scr; then + load ${devtype} ${devnum} ${load_addr} ${fdtdir}/overlay/${overlay_prefix}-fixup.scr echo "Applying kernel provided DT fixup script (${overlay_prefix}-fixup.scr)" source ${load_addr} fi