u-boot-dey: improve workflow and messages of uuu install script

- Determine first the filenames and abort if any does not exist.
- Print a warning message about the erasing of the media with a list
  of partitions and files to use for the update
- Sync the different scripts so they look more similar

Signed-off-by: Hector Palacios <hector.palacios@digi.com>

https://jira.digi.com/browse/DEL-7333
This commit is contained in:
Hector Palacios 2021-05-18 16:51:52 +02:00
parent 8f4d707fb6
commit aa535a505b
6 changed files with 267 additions and 171 deletions

View File

@ -15,9 +15,8 @@
# set -x # set -x
# #
# U-Boot script for installing Linux images created by Yocto into the NAND # U-Boot script for installing Linux images created by Yocto
# #
clear
# Parse uuu cmd output # Parse uuu cmd output
getenv() getenv()
@ -60,6 +59,11 @@ part_update()
uuu "fb[-t ${3}]:" ucmd update "${1}" ram \${fastboot_buffer} \${fastboot_bytes} uuu "fb[-t ${3}]:" ucmd update "${1}" ram \${fastboot_buffer} \${fastboot_bytes}
} }
clear
echo "############################################################"
echo "# Linux firmware install through USB OTG #"
echo "############################################################"
# Command line admits the following parameters: # Command line admits the following parameters:
# -u <u-boot-filename> # -u <u-boot-filename>
# -i <image-name> # -i <image-name>
@ -73,25 +77,8 @@ do
esac esac
done done
if [ ! "${NOWAIT}" = true ]; then echo ""
WAIT=10 echo "Determining image files to use..."
echo "############################################################"
echo "# Linux firmware install through USB OTG #"
echo "############################################################"
echo ""
echo " This process will erase your NAND and will install a new"
echo " U-Boot and Linux firmware images on the NAND."
echo ""
echo " Press CTRL+C now if you wish to abort."
echo ""
while [ ${WAIT} -gt 0 ]; do
printf "\r Update process starts in %d " ${WAIT}
sleep 1
WAIT=$(( ${WAIT} - 1 ))
done
printf "\r \n"
echo " Starting update process"
fi
# Enable the redirect support to get u-boot variables values # Enable the redirect support to get u-boot variables values
uuu fb: ucmd setenv stdout serial,fastboot uuu fb: ucmd setenv stdout serial,fastboot
@ -113,7 +100,10 @@ if [ -z "${INSTALL_UBOOT_FILENAME}" ]; then
fi fi
fi fi
# u-boot when the checked value is empty. # remove redirect
uuu fb: ucmd setenv stdout serial
# U-Boot when the checked value is empty.
if [ -n "${INSTALL_UBOOT_FILENAME}" ]; then if [ -n "${INSTALL_UBOOT_FILENAME}" ]; then
true true
else else
@ -136,9 +126,6 @@ if [ -z "${INSTALL_UBOOT_FILENAME}" ]; then
fi fi
fi fi
# remove redirect
uuu fb: ucmd setenv stdout serial
# Determine linux, recovery, and rootfs image filenames to update # Determine linux, recovery, and rootfs image filenames to update
if [ -z "${IMAGE_NAME}" ]; then if [ -z "${IMAGE_NAME}" ]; then
IMAGE_NAME="dey-image-qt" IMAGE_NAME="dey-image-qt"
@ -158,6 +145,34 @@ done;
[ "${ABORT}" = true ] && exit 1 [ "${ABORT}" = true ] && exit 1
# Print warning about storage media being deleted
if [ ! "${NOWAIT}" = true ]; then
WAIT=10
echo ""
echo " ===================="
echo " = IMPORTANT! ="
echo " ===================="
echo " This process will erase your NAND and will install the following files"
echo " on the partitions of the NAND."
echo ""
echo " PARTITION FILENAME"
echo " --------- --------"
echo " bootloader ${INSTALL_UBOOT_FILENAME}"
echo " linux ${INSTALL_LINUX_FILENAME}"
echo " recovery ${INSTALL_RECOVERY_FILENAME}"
echo " rootfs ${INSTALL_ROOTFS_FILENAME}"
echo ""
echo " Press CTRL+C now if you wish to abort."
echo ""
while [ ${WAIT} -gt 0 ]; do
printf "\r Update process starts in %d " ${WAIT}
sleep 1
WAIT=$(( ${WAIT} - 1 ))
done
printf "\r \n"
echo " Starting update process"
fi
# Set fastboot buffer address to $loadaddr, just in case # Set fastboot buffer address to $loadaddr, just in case
uuu fb: ucmd setenv fastboot_buffer \${loadaddr} uuu fb: ucmd setenv fastboot_buffer \${loadaddr}

View File

@ -15,9 +15,8 @@
# set -x # set -x
# #
# U-Boot script for installing Linux images created by Yocto into the NAND # U-Boot script for installing Linux images created by Yocto
# #
clear
# Parse uuu cmd output # Parse uuu cmd output
getenv() getenv()
@ -60,6 +59,11 @@ part_update()
uuu "fb[-t ${3}]:" ucmd update "${1}" ram \${fastboot_buffer} \${fastboot_bytes} uuu "fb[-t ${3}]:" ucmd update "${1}" ram \${fastboot_buffer} \${fastboot_bytes}
} }
clear
echo "############################################################"
echo "# Linux firmware install through USB OTG #"
echo "############################################################"
# Command line admits the following parameters: # Command line admits the following parameters:
# -u <u-boot-filename> # -u <u-boot-filename>
# -i <image-name> # -i <image-name>
@ -73,25 +77,8 @@ do
esac esac
done done
if [ ! "${NOWAIT}" = true ]; then echo ""
WAIT=10 echo "Determining image files to use..."
echo "############################################################"
echo "# Linux firmware install through USB OTG #"
echo "############################################################"
echo ""
echo " This process will erase your NAND and will install a new"
echo " U-Boot and Linux firmware images on the NAND."
echo ""
echo " Press CTRL+C now if you wish to abort."
echo ""
while [ ${WAIT} -gt 0 ]; do
printf "\r Update process starts in %d " ${WAIT}
sleep 1
WAIT=$(( ${WAIT} - 1 ))
done
printf "\r \n"
echo " Starting update process"
fi
# Enable the redirect support to get u-boot variables values # Enable the redirect support to get u-boot variables values
uuu fb: ucmd setenv stdout serial,fastboot uuu fb: ucmd setenv stdout serial,fastboot
@ -113,7 +100,10 @@ if [ -z "${INSTALL_UBOOT_FILENAME}" ]; then
fi fi
fi fi
# u-boot when the checked value is empty. # remove redirect
uuu fb: ucmd setenv stdout serial
# U-Boot when the checked value is empty.
if [ -n "${INSTALL_UBOOT_FILENAME}" ]; then if [ -n "${INSTALL_UBOOT_FILENAME}" ]; then
true true
else else
@ -136,9 +126,6 @@ if [ -z "${INSTALL_UBOOT_FILENAME}" ]; then
fi fi
fi fi
# remove redirect
uuu fb: ucmd setenv stdout serial
# Determine linux, recovery, and rootfs image filenames to update # Determine linux, recovery, and rootfs image filenames to update
if [ -z "${IMAGE_NAME}" ]; then if [ -z "${IMAGE_NAME}" ]; then
IMAGE_NAME="core-image-base" IMAGE_NAME="core-image-base"
@ -158,6 +145,34 @@ done;
[ "${ABORT}" = true ] && exit 1 [ "${ABORT}" = true ] && exit 1
# Print warning about storage media being deleted
if [ ! "${NOWAIT}" = true ]; then
WAIT=10
echo ""
echo " ===================="
echo " = IMPORTANT! ="
echo " ===================="
echo " This process will erase your NAND and will install the following files"
echo " on the partitions of the NAND."
echo ""
echo " PARTITION FILENAME"
echo " --------- --------"
echo " bootloader ${INSTALL_UBOOT_FILENAME}"
echo " linux ${INSTALL_LINUX_FILENAME}"
echo " recovery ${INSTALL_RECOVERY_FILENAME}"
echo " rootfs ${INSTALL_ROOTFS_FILENAME}"
echo ""
echo " Press CTRL+C now if you wish to abort."
echo ""
while [ ${WAIT} -gt 0 ]; do
printf "\r Update process starts in %d " ${WAIT}
sleep 1
WAIT=$(( ${WAIT} - 1 ))
done
printf "\r \n"
echo " Starting update process"
fi
# Set fastboot buffer address to $loadaddr, just in case # Set fastboot buffer address to $loadaddr, just in case
uuu fb: ucmd setenv fastboot_buffer \${loadaddr} uuu fb: ucmd setenv fastboot_buffer \${loadaddr}

View File

@ -15,9 +15,8 @@
# set -x # set -x
# #
# U-Boot script for installing Linux images created by Yocto into the eMMC # U-Boot script for installing Linux images created by Yocto
# #
clear
# Parse uuu cmd output # Parse uuu cmd output
getenv() getenv()
@ -59,6 +58,11 @@ part_update()
fi fi
} }
clear
echo "############################################################"
echo "# Linux firmware install through USB OTG #"
echo "############################################################"
# Command line admits the following parameters: # Command line admits the following parameters:
# -u <u-boot-filename> # -u <u-boot-filename>
# -i <image-name> # -i <image-name>
@ -72,26 +76,10 @@ do
esac esac
done done
if [ ! "${NOWAIT}" = true ]; then echo ""
WAIT=10 echo "Determining image files to use..."
echo "############################################################"
echo "# Linux firmware install through USB OTG #"
echo "############################################################"
echo ""
echo " This process will erase your eMMC and will install a new"
echo " U-Boot and Linux firmware images on the eMMC."
echo ""
echo " Press CTRL+C now if you wish to abort."
echo ""
while [ ${WAIT} -gt 0 ]; do
printf "\r Update process starts in %d " ${WAIT}
sleep 1
WAIT=$(( ${WAIT} - 1 ))
done
printf "\r \n"
echo " Starting update process"
fi
# Determine U-Boot file to program basing on SOM's SOC type (linked to bus width)
if [ -z "${INSTALL_UBOOT_FILENAME}" ]; then if [ -z "${INSTALL_UBOOT_FILENAME}" ]; then
INSTALL_UBOOT_FILENAME="imx-boot-ccimx8mm-dvk.bin" INSTALL_UBOOT_FILENAME="imx-boot-ccimx8mm-dvk.bin"
fi fi
@ -115,6 +103,37 @@ done;
[ "${ABORT}" = true ] && exit 1 [ "${ABORT}" = true ] && exit 1
# Print warning about storage media being deleted
if [ ! "${NOWAIT}" = true ]; then
WAIT=10
echo ""
echo " ===================="
echo " = IMPORTANT! ="
echo " ===================="
echo " This process will erase your eMMC and will install the following files"
echo " on the partitions of the eMMC."
echo ""
echo " PARTITION FILENAME"
echo " --------- --------"
echo " bootloader ${INSTALL_UBOOT_FILENAME}"
echo " linux ${INSTALL_LINUX_FILENAME}"
echo " recovery ${INSTALL_RECOVERY_FILENAME}"
echo " rootfs ${INSTALL_ROOTFS_FILENAME}"
echo ""
echo " Press CTRL+C now if you wish to abort."
echo ""
while [ ${WAIT} -gt 0 ]; do
printf "\r Update process starts in %d " ${WAIT}
sleep 1
WAIT=$(( ${WAIT} - 1 ))
done
printf "\r \n"
echo " Starting update process"
fi
# Set fastboot buffer address to $loadaddr, just in case
uuu fb: ucmd setenv fastboot_buffer \${loadaddr}
# Skip user confirmation for U-Boot update # Skip user confirmation for U-Boot update
uuu fb: ucmd setenv forced_update 1 uuu fb: ucmd setenv forced_update 1
@ -158,7 +177,7 @@ uuu fb: ucmd setenv bootcmd "
uuu fb: ucmd saveenv uuu fb: ucmd saveenv
uuu fb: acmd reset uuu fb: acmd reset
# Wait that target returns from reset # Wait for the target to reset
sleep 3 sleep 3
# Update Linux # Update Linux

View File

@ -15,9 +15,8 @@
# set -x # set -x
# #
# U-Boot script for installing Linux images created by Yocto into the eMMC # U-Boot script for installing Linux images created by Yocto
# #
clear
# Parse uuu cmd output # Parse uuu cmd output
getenv() getenv()
@ -59,6 +58,11 @@ part_update()
fi fi
} }
clear
echo "############################################################"
echo "# Linux firmware install through USB OTG #"
echo "############################################################"
# Command line admits the following parameters: # Command line admits the following parameters:
# -u <u-boot-filename> # -u <u-boot-filename>
# -i <image-name> # -i <image-name>
@ -72,26 +76,10 @@ do
esac esac
done done
if [ ! "${NOWAIT}" = true ]; then echo ""
WAIT=10 echo "Determining image files to use..."
echo "############################################################"
echo "# Linux firmware install through USB OTG #"
echo "############################################################"
echo ""
echo " This process will erase your eMMC and will install a new"
echo " U-Boot and Linux firmware images on the eMMC."
echo ""
echo " Press CTRL+C now if you wish to abort."
echo ""
while [ ${WAIT} -gt 0 ]; do
printf "\r Update process starts in %d " ${WAIT}
sleep 1
WAIT=$(( ${WAIT} - 1 ))
done
printf "\r \n"
echo " Starting update process"
fi
# Determine U-Boot file to program basing on SOM's SOC type (linked to bus width)
if [ -z "${INSTALL_UBOOT_FILENAME}" ]; then if [ -z "${INSTALL_UBOOT_FILENAME}" ]; then
INSTALL_UBOOT_FILENAME="imx-boot-ccimx8mn-dvk.bin" INSTALL_UBOOT_FILENAME="imx-boot-ccimx8mn-dvk.bin"
fi fi
@ -115,6 +103,37 @@ done;
[ "${ABORT}" = true ] && exit 1 [ "${ABORT}" = true ] && exit 1
# Print warning about storage media being deleted
if [ ! "${NOWAIT}" = true ]; then
WAIT=10
echo ""
echo " ===================="
echo " = IMPORTANT! ="
echo " ===================="
echo " This process will erase your eMMC and will install the following files"
echo " on the partitions of the eMMC."
echo ""
echo " PARTITION FILENAME"
echo " --------- --------"
echo " bootloader ${INSTALL_UBOOT_FILENAME}"
echo " linux ${INSTALL_LINUX_FILENAME}"
echo " recovery ${INSTALL_RECOVERY_FILENAME}"
echo " rootfs ${INSTALL_ROOTFS_FILENAME}"
echo ""
echo " Press CTRL+C now if you wish to abort."
echo ""
while [ ${WAIT} -gt 0 ]; do
printf "\r Update process starts in %d " ${WAIT}
sleep 1
WAIT=$(( ${WAIT} - 1 ))
done
printf "\r \n"
echo " Starting update process"
fi
# Set fastboot buffer address to $loadaddr, just in case
uuu fb: ucmd setenv fastboot_buffer \${loadaddr}
# Skip user confirmation for U-Boot update # Skip user confirmation for U-Boot update
uuu fb: ucmd setenv forced_update 1 uuu fb: ucmd setenv forced_update 1
@ -158,7 +177,7 @@ uuu fb: ucmd setenv bootcmd "
uuu fb: ucmd saveenv uuu fb: ucmd saveenv
uuu fb: acmd reset uuu fb: acmd reset
# Wait that target returns from reset # Wait for the target to reset
sleep 3 sleep 3
# Update Linux # Update Linux

View File

@ -15,9 +15,8 @@
# set -x # set -x
# #
# U-Boot script for installing Linux images created by Yocto into the eMMC # U-Boot script for installing Linux images created by Yocto
# #
clear
# Parse uuu cmd output # Parse uuu cmd output
getenv() getenv()
@ -59,6 +58,11 @@ part_update()
fi fi
} }
clear
echo "############################################################"
echo "# Linux firmware install through USB OTG #"
echo "############################################################"
# Command line admits the following parameters: # Command line admits the following parameters:
# -u <u-boot-filename> # -u <u-boot-filename>
# -i <image-name> # -i <image-name>
@ -72,40 +76,22 @@ do
esac esac
done done
if [ ! "${NOWAIT}" = true ]; then echo ""
WAIT=10 echo "Determining image files to use..."
echo "############################################################"
echo "# Linux firmware install through USB OTG #"
echo "############################################################"
echo ""
echo " This process will erase your eMMC and will install a new"
echo " U-Boot and Linux firmware images on the eMMC."
echo ""
echo " Press CTRL+C now if you wish to abort."
echo ""
while [ ${WAIT} -gt 0 ]; do
printf "\r Update process starts in %d " ${WAIT}
sleep 1
WAIT=$(( ${WAIT} - 1 ))
done
printf "\r \n"
echo " Starting update process"
fi
# Enable the redirect support to get u-boot variables values
uuu fb: ucmd setenv stdout serial,fastboot
# Since SOMs with the B0 SOC might have an older U-Boot that doesn't export the
# SOC revision to the environment, use B0 by default
soc_rev=$(getenv "soc_rev")
if [ -z "${soc_rev}" ]; then
soc_rev="B0"
fi
# Determine U-Boot file to program basing on SOM's SOC type (linked to bus width) # Determine U-Boot file to program basing on SOM's SOC type (linked to bus width)
if [ -z ${INSTALL_UBOOT_FILENAME} ]; then if [ -z ${INSTALL_UBOOT_FILENAME} ]; then
bus_width="32bit" # Enable the redirect support to get u-boot variables values
uuu fb: ucmd setenv stdout serial,fastboot
# Since SOMs with the B0 SOC might have an older U-Boot that doesn't export the
# SOC revision to the environment, use B0 by default
soc_rev=$(getenv "soc_rev")
if [ -z "${soc_rev}" ]; then
soc_rev="B0"
fi
bus_width="32bit"
soc_type=$(getenv "soc_type") soc_type=$(getenv "soc_type")
if [ "$soc_type" = "imx8dx" ]; then if [ "$soc_type" = "imx8dx" ]; then
bus_width="16bit" bus_width="16bit"
@ -132,6 +118,9 @@ if [ -z ${INSTALL_UBOOT_FILENAME} ]; then
INSTALL_UBOOT_FILENAME="imx-boot-ccimx8x-sbc-express-${soc_rev}-${module_ram}_${bus_width}.bin" INSTALL_UBOOT_FILENAME="imx-boot-ccimx8x-sbc-express-${soc_rev}-${module_ram}_${bus_width}.bin"
fi fi
# remove redirect
uuu fb: ucmd setenv stdout serial
# U-Boot when the checked value is empty. # U-Boot when the checked value is empty.
if [ -n "${INSTALL_UBOOT_FILENAME}" ]; then if [ -n "${INSTALL_UBOOT_FILENAME}" ]; then
true true
@ -157,9 +146,6 @@ if [ -z ${INSTALL_UBOOT_FILENAME} ]; then
fi fi
fi fi
# remove redirect
uuu fb: ucmd setenv stdout serial
# Determine linux, recovery, and rootfs image filenames to update # Determine linux, recovery, and rootfs image filenames to update
if [ -z "${IMAGE_NAME}" ]; then if [ -z "${IMAGE_NAME}" ]; then
IMAGE_NAME="dey-image-qt" IMAGE_NAME="dey-image-qt"
@ -179,8 +165,33 @@ done;
[ "${ABORT}" = true ] && exit 1 [ "${ABORT}" = true ] && exit 1
# Set fastboot buffer address to $loadaddr, just in case # Print warning about storage media being deleted
uuu fb: ucmd setenv fastboot_buffer \${loadaddr} if [ ! "${NOWAIT}" = true ]; then
WAIT=10
echo ""
echo " ===================="
echo " = IMPORTANT! ="
echo " ===================="
echo " This process will erase your eMMC and will install the following files"
echo " on the partitions of the eMMC."
echo ""
echo " PARTITION FILENAME"
echo " --------- --------"
echo " bootloader ${INSTALL_UBOOT_FILENAME}"
echo " linux ${INSTALL_LINUX_FILENAME}"
echo " recovery ${INSTALL_RECOVERY_FILENAME}"
echo " rootfs ${INSTALL_ROOTFS_FILENAME}"
echo ""
echo " Press CTRL+C now if you wish to abort."
echo ""
while [ ${WAIT} -gt 0 ]; do
printf "\r Update process starts in %d " ${WAIT}
sleep 1
WAIT=$(( ${WAIT} - 1 ))
done
printf "\r \n"
echo " Starting update process"
fi
# Skip user confirmation for U-Boot update # Skip user confirmation for U-Boot update
uuu fb: ucmd setenv forced_update 1 uuu fb: ucmd setenv forced_update 1
@ -225,9 +236,12 @@ uuu fb: ucmd setenv bootcmd "
uuu fb: ucmd saveenv uuu fb: ucmd saveenv
uuu fb: acmd reset uuu fb: acmd reset
# Wait that target returns from reset # Wait for the target to reset
sleep 3 sleep 3
# Set fastboot buffer address to $loadaddr, just in case
uuu fb: ucmd setenv fastboot_buffer \${loadaddr}
# Update Linux # Update Linux
part_update "linux" "${INSTALL_LINUX_FILENAME}" part_update "linux" "${INSTALL_LINUX_FILENAME}"

View File

@ -15,9 +15,8 @@
# set -x # set -x
# #
# U-Boot script for installing Linux images created by Yocto into the eMMC # U-Boot script for installing Linux images created by Yocto
# #
clear
# Parse uuu cmd output # Parse uuu cmd output
getenv() getenv()
@ -59,6 +58,11 @@ part_update()
fi fi
} }
clear
echo "############################################################"
echo "# Linux firmware install through USB OTG #"
echo "############################################################"
# Command line admits the following parameters: # Command line admits the following parameters:
# -u <u-boot-filename> # -u <u-boot-filename>
# -i <image-name> # -i <image-name>
@ -72,40 +76,22 @@ do
esac esac
done done
if [ ! "${NOWAIT}" = true ]; then echo ""
WAIT=10 echo "Determining image files to use..."
echo "############################################################"
echo "# Linux firmware install through USB OTG #"
echo "############################################################"
echo ""
echo " This process will erase your eMMC and will install a new"
echo " U-Boot and Linux firmware images on the eMMC."
echo ""
echo " Press CTRL+C now if you wish to abort."
echo ""
while [ ${WAIT} -gt 0 ]; do
printf "\r Update process starts in %d " ${WAIT}
sleep 1
WAIT=$(( ${WAIT} - 1 ))
done
printf "\r \n"
echo " Starting update process"
fi
# Enable the redirect support to get u-boot variables values
uuu fb: ucmd setenv stdout serial,fastboot
# Since SOMs with the B0 SOC might have an older U-Boot that doesn't export the
# SOC revision to the environment, use B0 by default
soc_rev=$(getenv "soc_rev")
if [ -z "${soc_rev}" ]; then
soc_rev="B0"
fi
# Determine U-Boot file to program basing on SOM's SOC type (linked to bus width) # Determine U-Boot file to program basing on SOM's SOC type (linked to bus width)
if [ -z ${INSTALL_UBOOT_FILENAME} ]; then if [ -z ${INSTALL_UBOOT_FILENAME} ]; then
bus_width="32bit" # Enable the redirect support to get u-boot variables values
uuu fb: ucmd setenv stdout serial,fastboot
# Since SOMs with the B0 SOC might have an older U-Boot that doesn't export the
# SOC revision to the environment, use B0 by default
soc_rev=$(getenv "soc_rev")
if [ -z "${soc_rev}" ]; then
soc_rev="B0"
fi
bus_width="32bit"
soc_type=$(getenv "soc_type") soc_type=$(getenv "soc_type")
if [ "$soc_type" = "imx8dx" ]; then if [ "$soc_type" = "imx8dx" ]; then
bus_width="16bit" bus_width="16bit"
@ -132,6 +118,9 @@ if [ -z ${INSTALL_UBOOT_FILENAME} ]; then
INSTALL_UBOOT_FILENAME="imx-boot-ccimx8x-sbc-pro-${soc_rev}-${module_ram}_${bus_width}.bin" INSTALL_UBOOT_FILENAME="imx-boot-ccimx8x-sbc-pro-${soc_rev}-${module_ram}_${bus_width}.bin"
fi fi
# remove redirect
uuu fb: ucmd setenv stdout serial
# U-Boot when the checked value is empty. # U-Boot when the checked value is empty.
if [ -n "${INSTALL_UBOOT_FILENAME}" ]; then if [ -n "${INSTALL_UBOOT_FILENAME}" ]; then
true true
@ -157,9 +146,6 @@ if [ -z ${INSTALL_UBOOT_FILENAME} ]; then
fi fi
fi fi
# remove redirect
uuu fb: ucmd setenv stdout serial
# Determine linux, recovery, and rootfs image filenames to update # Determine linux, recovery, and rootfs image filenames to update
if [ -z "${IMAGE_NAME}" ]; then if [ -z "${IMAGE_NAME}" ]; then
IMAGE_NAME="dey-image-qt" IMAGE_NAME="dey-image-qt"
@ -179,8 +165,33 @@ done;
[ "${ABORT}" = true ] && exit 1 [ "${ABORT}" = true ] && exit 1
# Set fastboot buffer address to $loadaddr, just in case # Print warning about storage media being deleted
uuu fb: ucmd setenv fastboot_buffer \${loadaddr} if [ ! "${NOWAIT}" = true ]; then
WAIT=10
echo ""
echo " ===================="
echo " = IMPORTANT! ="
echo " ===================="
echo " This process will erase your eMMC and will install the following files"
echo " on the partitions of the eMMC."
echo ""
echo " PARTITION FILENAME"
echo " --------- --------"
echo " bootloader ${INSTALL_UBOOT_FILENAME}"
echo " linux ${INSTALL_LINUX_FILENAME}"
echo " recovery ${INSTALL_RECOVERY_FILENAME}"
echo " rootfs ${INSTALL_ROOTFS_FILENAME}"
echo ""
echo " Press CTRL+C now if you wish to abort."
echo ""
while [ ${WAIT} -gt 0 ]; do
printf "\r Update process starts in %d " ${WAIT}
sleep 1
WAIT=$(( ${WAIT} - 1 ))
done
printf "\r \n"
echo " Starting update process"
fi
# Skip user confirmation for U-Boot update # Skip user confirmation for U-Boot update
uuu fb: ucmd setenv forced_update 1 uuu fb: ucmd setenv forced_update 1
@ -225,9 +236,12 @@ uuu fb: ucmd setenv bootcmd "
uuu fb: ucmd saveenv uuu fb: ucmd saveenv
uuu fb: acmd reset uuu fb: acmd reset
# Wait that target returns from reset # Wait for the target to reset
sleep 3 sleep 3
# Set fastboot buffer address to $loadaddr, just in case
uuu fb: ucmd setenv fastboot_buffer \${loadaddr}
# Update Linux # Update Linux
part_update "linux" "${INSTALL_LINUX_FILENAME}" part_update "linux" "${INSTALL_LINUX_FILENAME}"
@ -235,7 +249,7 @@ part_update "linux" "${INSTALL_LINUX_FILENAME}"
part_update "recovery" "${INSTALL_RECOVERY_FILENAME}" part_update "recovery" "${INSTALL_RECOVERY_FILENAME}"
# Update Rootfs # Update Rootfs
uuu fb: flash -raw2sparse rootfs ${INSTALL_ROOTFS_FILENAME} part_update "rootfs" "${INSTALL_ROOTFS_FILENAME}"
# Configure u-boot to boot into recovery mode # Configure u-boot to boot into recovery mode
uuu fb: ucmd setenv boot_recovery yes uuu fb: ucmd setenv boot_recovery yes