Skip to content

Commit

Permalink
bootscript: sunxi: Tell the user only the actual actions.
Browse files Browse the repository at this point in the history
Make the script work silently when testing path options
and report only the actual file being uploaded.
Delete the duplicate iteration.
  • Loading branch information
The-going committed Dec 2, 2024
1 parent d37f8d3 commit 18a925f
Showing 1 changed file with 11 additions and 19 deletions.
30 changes: 11 additions & 19 deletions config/bootscripts/boot-sunxi.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -49,28 +49,22 @@ fi
# Make a check of reasonable ways to find the dtb file.
# Set the true value of the paths.
if test -e ${devtype} ${devnum} "${fdtdir}/${fdtfile}"; then
:
echo "Load fdt: ${fdtdir}/${fdtfile}"
else
echo "File ${fdtdir}/${fdtfile} does not exists"
echo "The file ${fdtfile} was not found in the path ${fdtdir}"
if test -e ${devtype} ${devnum} "${deffdt_dir}/${vendor}/${fdtfile}"; then
setenv fdtdir "${deffdt_dir}/${vendor}"
echo "Load fdt: ${fdtdir}/${fdtfile}"
else
echo "File ${deffdt_dir}/${vendor}/${fdtfile} does not exists"
if test -e ${devtype} ${devnum} "${deffdt_dir}/${fdtfile}"; then
setenv fdtdir "${deffdt_dir}"
if test -e ${devtype} ${devnum} "${deffdt_dir}/${vendor}/${deffdt_file}"; then
setenv fdtdir "${deffdt_dir}/${vendor}"
setenv fdtfile "${deffdt_file}"
echo "Load fdt: ${fdtdir}/${fdtfile}"
else
echo "File ${deffdt_dir}/${fdtfile} does not exists"
if test -e ${devtype} ${devnum} "${deffdt_dir}/${vendor}/${deffdt_file}"; then
setenv fdtdir "${deffdt_dir}/${vendor}"
if test -e ${devtype} ${devnum} "${deffdt_dir}/${deffdt_file}"; then
setenv fdtdir "${deffdt_dir}"
setenv fdtfile "${deffdt_file}"
else
echo "File ${deffdt_dir}/${vendor}/${deffdt_file} does not exists"
if test -e ${devtype} ${devnum} "${deffdt_dir}/${deffdt_file}"; then
setenv fdtdir "${deffdt_dir}"
setenv fdtfile "${deffdt_file}"
else
echo "File ${deffdt_dir}/${deffdt_file} does not exists"
fi
echo "Load fdt: ${fdtdir}/${fdtfile}"
fi
fi
fi
Expand Down Expand Up @@ -99,9 +93,7 @@ load ${devtype} ${devnum} ${kernel_addr_r} ${prefix}zImage

if test -e ${devtype} ${devnum} "${prefix}.next"; then
echo "Found mainline kernel configuration"
if load ${devtype} ${devnum} ${fdt_addr_r} ${fdtdir}/${fdtfile}; then
echo "Load fdt: ${fdtdir}/${fdtfile}"
fi
load ${devtype} ${devnum} ${fdt_addr_r} ${fdtdir}/${fdtfile}
fdt addr ${fdt_addr_r}
fdt resize 65536
for overlay_file in ${overlays}; do
Expand Down

0 comments on commit 18a925f

Please sign in to comment.