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 <isaac.hermida@digi.com>
This commit is contained in:
parent
4a057144ee
commit
81d0ce168f
|
|
@ -70,8 +70,9 @@ echo "# Linux firmware install through USB OTG #"
|
|||
echo "############################################################"
|
||||
|
||||
# Command line admits the following parameters:
|
||||
# -u <u-boot-filename>
|
||||
# -b, -d, -n (booleans)
|
||||
# -i <image-name>
|
||||
# -u <u-boot-filename>
|
||||
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"
|
||||
|
|
|
|||
|
|
@ -70,8 +70,9 @@ echo "# Linux firmware install through USB OTG #"
|
|||
echo "############################################################"
|
||||
|
||||
# Command line admits the following parameters:
|
||||
# -u <u-boot-filename>
|
||||
# -b, -d, -n (booleans)
|
||||
# -i <image-name>
|
||||
# -u <u-boot-filename>
|
||||
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"
|
||||
|
|
|
|||
|
|
@ -79,8 +79,9 @@ echo "# Linux firmware install through USB OTG #"
|
|||
echo "############################################################"
|
||||
|
||||
# Command line admits the following parameters:
|
||||
# -u <u-boot-filename>
|
||||
# -b, -d, -n (booleans)
|
||||
# -i <image-name>
|
||||
# -u <u-boot-filename>
|
||||
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"
|
||||
|
|
|
|||
|
|
@ -70,8 +70,9 @@ echo "# Linux firmware install through USB OTG #"
|
|||
echo "############################################################"
|
||||
|
||||
# Command line admits the following parameters:
|
||||
# -u <u-boot-filename>
|
||||
# -b, -d, -n (booleans)
|
||||
# -i <image-name>
|
||||
# -u <u-boot-filename>
|
||||
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"
|
||||
|
|
|
|||
|
|
@ -70,8 +70,9 @@ echo "# Linux firmware install through USB OTG #"
|
|||
echo "############################################################"
|
||||
|
||||
# Command line admits the following parameters:
|
||||
# -u <u-boot-filename>
|
||||
# -b, -d, -n (booleans)
|
||||
# -i <image-name>
|
||||
# -u <u-boot-filename>
|
||||
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"
|
||||
|
|
|
|||
|
|
@ -70,8 +70,9 @@ echo "# Linux firmware install through USB OTG #"
|
|||
echo "############################################################"
|
||||
|
||||
# Command line admits the following parameters:
|
||||
# -u <u-boot-filename>
|
||||
# -b, -d, -n (booleans)
|
||||
# -i <image-name>
|
||||
# -u <u-boot-filename>
|
||||
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"
|
||||
|
|
|
|||
|
|
@ -80,6 +80,7 @@ echo "############################################################"
|
|||
|
||||
# Command line admits the following parameters:
|
||||
# -a <atf-filename>
|
||||
# -b, -d, -n (booleans)
|
||||
# -f <fip-filename>
|
||||
# -i <image-name>
|
||||
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"
|
||||
|
|
|
|||
Loading…
Reference in New Issue