Skip to content

Commit

Permalink
bootscript: Remove vendor name and slash from DTB file name
Browse files Browse the repository at this point in the history
After that, the script successfully loads the DTB file from
two possible paths and overlays. If the file does not exist,
then the default file will be uploaded.
  • Loading branch information
The-going committed Dec 9, 2024
1 parent 0fcf554 commit 8619417
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions config/bootscripts/boot-sun50i-next.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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.
Expand Down

0 comments on commit 8619417

Please sign in to comment.