From 81d0ce168f8a86dd4fc33c872f79341370df386e Mon Sep 17 00:00:00 2001 From: Isaac Hermida Date: Thu, 25 Jan 2024 17:42:38 +0100 Subject: [PATCH] u-boot-dey: installation scripts: minor fixes Some minor fixes: * return error code if installation fails * cosmetic: update comment with options * just exit after error and do not execute boolimit command Signed-off-by: Isaac Hermida --- .../u-boot-dey/ccimx6qpsbc/install_linux_fw_uuu.sh | 9 +++++---- .../u-boot/u-boot-dey/ccimx6sbc/install_linux_fw_uuu.sh | 9 +++++---- .../u-boot/u-boot-dey/ccimx6ul/install_linux_fw_uuu.sh | 9 +++++---- .../u-boot/u-boot-dey/ccimx8m/install_linux_fw_uuu.sh | 7 ++++--- .../u-boot/u-boot-dey/ccimx8x/install_linux_fw_uuu.sh | 7 ++++--- .../u-boot/u-boot-dey/ccimx93/install_linux_fw_uuu.sh | 7 ++++--- .../u-boot/u-boot-dey/ccmp1/install_linux_fw_uuu.sh | 5 +++-- 7 files changed, 30 insertions(+), 23 deletions(-) diff --git a/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx6qpsbc/install_linux_fw_uuu.sh b/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx6qpsbc/install_linux_fw_uuu.sh index 3aefbabf0..7ece2d006 100644 --- a/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx6qpsbc/install_linux_fw_uuu.sh +++ b/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx6qpsbc/install_linux_fw_uuu.sh @@ -70,8 +70,9 @@ echo "# Linux firmware install through USB OTG #" echo "############################################################" # Command line admits the following parameters: -# -u +# -b, -d, -n (booleans) # -i +# -u while getopts 'bdhi:nu:' c do case $c in @@ -129,7 +130,7 @@ if [ -z ${INSTALL_UBOOT_FILENAME} ]; then echo "" echo "Aborted" echo "" - exit + exit 1 fi fi @@ -188,13 +189,13 @@ if [ ! -f ${INSTALL_ROOTFS_FILENAME} ]; then fi fi +[ "${ABORT}" = true ] && exit 1 + # Enable bootcount mechanism by setting a bootlimit if [ "${BOOTCOUNT}" = true ]; then bootlimit_cmd="setenv bootlimit 3" fi -[ "${ABORT}" = true ] && exit 1 - # parts names LINUX_NAME="linux" RECOVERY_NAME="recovery" diff --git a/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx6sbc/install_linux_fw_uuu.sh b/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx6sbc/install_linux_fw_uuu.sh index 499762a32..940bf8a40 100644 --- a/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx6sbc/install_linux_fw_uuu.sh +++ b/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx6sbc/install_linux_fw_uuu.sh @@ -70,8 +70,9 @@ echo "# Linux firmware install through USB OTG #" echo "############################################################" # Command line admits the following parameters: -# -u +# -b, -d, -n (booleans) # -i +# -u while getopts 'bdhi:nu:' c do case $c in @@ -148,7 +149,7 @@ if [ -z ${INSTALL_UBOOT_FILENAME} ]; then echo "" echo "Aborted" echo "" - exit + exit 1 fi fi @@ -207,13 +208,13 @@ if [ ! -f ${INSTALL_ROOTFS_FILENAME} ]; then fi fi +[ "${ABORT}" = true ] && exit 1 + # Enable bootcount mechanism by setting a bootlimit if [ "${BOOTCOUNT}" = true ]; then bootlimit_cmd="setenv bootlimit 3" fi -[ "${ABORT}" = true ] && exit 1 - # parts names LINUX_NAME="linux" RECOVERY_NAME="recovery" diff --git a/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx6ul/install_linux_fw_uuu.sh b/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx6ul/install_linux_fw_uuu.sh index 79e306ec0..cc34c97ae 100644 --- a/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx6ul/install_linux_fw_uuu.sh +++ b/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx6ul/install_linux_fw_uuu.sh @@ -79,8 +79,9 @@ echo "# Linux firmware install through USB OTG #" echo "############################################################" # Command line admits the following parameters: -# -u +# -b, -d, -n (booleans) # -i +# -u while getopts 'bdhi:nu:' c do case $c in @@ -153,7 +154,7 @@ if [ -z "${INSTALL_UBOOT_FILENAME}" ]; then echo "" echo "Aborted" echo "" - exit + exit 1 fi fi @@ -202,13 +203,13 @@ if [ ! -f ${INSTALL_ROOTFS_FILENAME} ]; then fi fi +[ "${ABORT}" = true ] && exit 1 + # Enable bootcount mechanism by setting a bootlimit if [ "${BOOTCOUNT}" = true ]; then bootlimit_cmd="setenv bootlimit 3" fi -[ "${ABORT}" = true ] && exit 1 - # parts names LINUX_NAME="linux" RECOVERY_NAME="recovery" diff --git a/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx8m/install_linux_fw_uuu.sh b/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx8m/install_linux_fw_uuu.sh index e8377be78..aceb658e1 100644 --- a/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx8m/install_linux_fw_uuu.sh +++ b/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx8m/install_linux_fw_uuu.sh @@ -70,8 +70,9 @@ echo "# Linux firmware install through USB OTG #" echo "############################################################" # Command line admits the following parameters: -# -u +# -b, -d, -n (booleans) # -i +# -u while getopts 'bdhi:nu:' c do case $c in @@ -156,13 +157,13 @@ if [ ! -f ${INSTALL_ROOTFS_FILENAME} ]; then fi fi +[ "${ABORT}" = true ] && exit 1 + # Enable bootcount mechanism by setting a bootlimit if [ "${BOOTCOUNT}" = true ]; then bootlimit_cmd="setenv bootlimit 3" fi -[ "${ABORT}" = true ] && exit 1 - # parts names LINUX_NAME="linux" RECOVERY_NAME="recovery" diff --git a/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx8x/install_linux_fw_uuu.sh b/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx8x/install_linux_fw_uuu.sh index 8c4c0399b..0eae8737c 100644 --- a/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx8x/install_linux_fw_uuu.sh +++ b/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx8x/install_linux_fw_uuu.sh @@ -70,8 +70,9 @@ echo "# Linux firmware install through USB OTG #" echo "############################################################" # Command line admits the following parameters: -# -u +# -b, -d, -n (booleans) # -i +# -u while getopts 'bdhi:nu:' c do case $c in @@ -163,13 +164,13 @@ if [ ! -f ${INSTALL_ROOTFS_FILENAME} ]; then fi fi +[ "${ABORT}" = true ] && exit 1 + # Enable bootcount mechanism by setting a bootlimit if [ "${BOOTCOUNT}" = true ]; then bootlimit_cmd="setenv bootlimit 3" fi -[ "${ABORT}" = true ] && exit 1 - # parts names LINUX_NAME="linux" RECOVERY_NAME="recovery" diff --git a/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx93/install_linux_fw_uuu.sh b/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx93/install_linux_fw_uuu.sh index 7e1e51786..fd1336cbd 100644 --- a/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx93/install_linux_fw_uuu.sh +++ b/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx93/install_linux_fw_uuu.sh @@ -70,8 +70,9 @@ echo "# Linux firmware install through USB OTG #" echo "############################################################" # Command line admits the following parameters: -# -u +# -b, -d, -n (booleans) # -i +# -u while getopts 'bdhi:nu:' c do case $c in @@ -166,13 +167,13 @@ if [ ! -f ${INSTALL_ROOTFS_FILENAME} ]; then fi fi +[ "${ABORT}" = true ] && exit 1 + # Enable bootcount mechanism by setting a bootlimit if [ "${BOOTCOUNT}" = true ]; then bootlimit_cmd="setenv bootlimit 3" fi -[ "${ABORT}" = true ] && exit 1 - # parts names LINUX_NAME="linux" RECOVERY_NAME="recovery" diff --git a/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccmp1/install_linux_fw_uuu.sh b/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccmp1/install_linux_fw_uuu.sh index 2373e4587..02f28b37d 100644 --- a/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccmp1/install_linux_fw_uuu.sh +++ b/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccmp1/install_linux_fw_uuu.sh @@ -80,6 +80,7 @@ echo "############################################################" # Command line admits the following parameters: # -a +# -b, -d, -n (booleans) # -f # -i while getopts 'a:bdf:hi:n' c @@ -170,13 +171,13 @@ if [ ! -f ${INSTALL_ROOTFS_FILENAME} ]; then fi fi +[ "${ABORT}" = true ] && exit 1 + # Enable bootcount mechanism by setting a bootlimit if [ "${BOOTCOUNT}" = true ]; then bootlimit_cmd="setenv bootlimit 3" fi -[ "${ABORT}" = true ] && exit 1 - # parts names LINUX_NAME="linux" RECOVERY_NAME="recovery"