Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bootscripts: Allwinner: Bugfix: Remove "allwinner/" from 3 boards configurations #7535

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion config/boards/bananapim4zero.conf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ BOARDFAMILY="sun50iw9-bpi"
BOARD_MAINTAINER="pyavitz"
BOOTCONFIG="bananapi_m4zero_defconfig"
OVERLAY_PREFIX="sun50i-h616"
BOOT_FDT_FILE="allwinner/sun50i-h618-bananapi-m4-zero.dtb"
BOOT_FDT_FILE="sun50i-h618-bananapi-m4-zero.dtb"
BOOT_LOGO="desktop"
KERNEL_TARGET="current,edge"
KERNEL_TEST_TARGET="current"
Expand Down
2 changes: 1 addition & 1 deletion config/boards/bigtreetech-cb1.conf
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ FORCE_BOOTSCRIPT_UPDATE="yes"
BOOTFS_TYPE="fat"
BOOT_FS_LABEL="BOOT"
OVERLAY_PREFIX="sun50i-h616"
BOOT_FDT_FILE="allwinner/sun50i-h616-bigtreetech-cb1-sd.dtb"
BOOT_FDT_FILE="sun50i-h616-bigtreetech-cb1-sd.dtb"
2 changes: 1 addition & 1 deletion config/boards/pineh64-b.csc
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ BOARD_MAINTAINER=""
BOOTCONFIG="pine_h64_defconfig"
KERNEL_TARGET="legacy,current,edge"
KERNEL_TEST_TARGET="current"
BOOT_FDT_FILE="allwinner/sun50i-h6-pine-h64-model-b.dtb"
BOOT_FDT_FILE="sun50i-h6-pine-h64-model-b.dtb"
CRUSTCONFIG="h6_defconfig"
48 changes: 25 additions & 23 deletions config/bootscripts/boot-sun50i-next.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,16 @@ setenv console "both"
setenv docker_optimizations "on"
setenv bootlogo "false"

# Remember the default u-boot fdtfile
setenv deffdt_file ${fdtfile}
setenv vendor "allwinner"

# 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"
if test "$fdtdir" = ""; then setenv fdtdir "${deffdt_dir}";fi

setenv vendor "allwinner"
if test "$fdtdir" = ""; then setenv fdtdir "${deffdt_dir}/${vendor}";fi

# Print boot source
itest.b *0x10028 == 0x00 && echo "U-boot loaded from SD"
Expand All @@ -34,32 +36,32 @@ 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.
if test -e ${devtype} ${devnum} "${fdtdir}/${fdtfile}"; then
:
echo "Load fdt: ${fdtdir}/${fdtfile}"
else
echo "File ${fdtdir}/${fdtfile} does not exists"
if test -e ${devtype} ${devnum} "${deffdt_dir}/${vendor}/${fdtfile}"; then
setenv fdtdir "${deffdt_dir}/${vendor}"
echo "The file ${fdtfile} was not found in the path ${fdtdir}"
if test -e ${devtype} ${devnum} "${deffdt_dir}/${fdtfile}"; then
setenv fdtdir "${deffdt_dir}"
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
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
Loading