bootscript: Remove vendor name and slash from DTB file name
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.
This commit is contained in:
parent
48e289e0d3
commit
ac2928baa4
@ -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.
|
||||
|
||||
Loading…
Reference in New Issue
Block a user