From 4be6793bdf822162bcbd49c74e35e9b8f6576ce0 Mon Sep 17 00:00:00 2001 From: The-going <48602507+The-going@users.noreply.github.com> Date: Thu, 5 Dec 2024 16:44:37 +0300 Subject: [PATCH] bootscript: sunxi: Delete the vendor's name from the fdtfile variable Do not inform the user if the fixup.scr file was not found. --- config/bootscripts/boot-sunxi.cmd | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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