u-boot-dey: install-uuu: fix bash-ism in condition that checks the variant

The current syntax only works properly when running the script through bash.
Change this so that it works for other shells as well.

While at it, fix a typo in the message that appears when the variant can't be
detected in the 6UL script.

Signed-off-by: Gabriel Valcazar <gabriel.valcazar@digi.com>
This commit is contained in:
Gabriel Valcazar 2021-07-05 14:34:06 +02:00
parent 95c8629cba
commit 7d3c5bcccf
2 changed files with 3 additions and 3 deletions

View File

@ -87,7 +87,7 @@ uuu fb: ucmd setenv stdout serial,fastboot
if [ -z "${INSTALL_UBOOT_FILENAME}" ]; then if [ -z "${INSTALL_UBOOT_FILENAME}" ]; then
module_variant=$(getenv "module_variant") module_variant=$(getenv "module_variant")
# Determine U-Boot file to program basing on SOM's variant # Determine U-Boot file to program basing on SOM's variant
if [ -n "$module_variant" || "$module_variant" = "0x00" ]; then if [ -n "$module_variant" ] || [ "$module_variant" = "0x00" ]; then
if [ "$module_variant" = "0x08" ] || \ if [ "$module_variant" = "0x08" ] || \
[ "$module_variant" = "0x09" ]; then [ "$module_variant" = "0x09" ]; then
INSTALL_UBOOT_FILENAME="u-boot-##MACHINE##512MB.imx" INSTALL_UBOOT_FILENAME="u-boot-##MACHINE##512MB.imx"
@ -110,7 +110,7 @@ if [ -z "${INSTALL_UBOOT_FILENAME}" ]; then
echo "" echo ""
echo "[ERROR] Cannot determine U-Boot file for this module!" echo "[ERROR] Cannot determine U-Boot file for this module!"
echo "" echo ""
echo "1. Add U-boot file name, depending on your ConnectCore 8X variant, to script command line:" echo "1. Add U-boot file name, depending on your ConnectCore 6UL variant, to script command line:"
echo " - For a SOM with 1GB DDR3, run:" echo " - For a SOM with 1GB DDR3, run:"
echo " => ./install_linux_fw_uuu.sh -u u-boot-##MACHINE##1GB.imx" echo " => ./install_linux_fw_uuu.sh -u u-boot-##MACHINE##1GB.imx"
echo " - For a SOM with 512MB DDR3, run:" echo " - For a SOM with 512MB DDR3, run:"

View File

@ -101,7 +101,7 @@ if [ -z ${INSTALL_UBOOT_FILENAME} ]; then
if [ -z "${module_ram}" ]; then if [ -z "${module_ram}" ]; then
module_variant=$(getenv "module_variant") module_variant=$(getenv "module_variant")
# Determine U-Boot file to program basing on SOM's variant # Determine U-Boot file to program basing on SOM's variant
if [ -n "$module_variant" || "$module_variant" = "0x00" ]; then if [ -n "$module_variant" ] || [ "$module_variant" = "0x00" ]; then
if [ "$module_variant" = "0x01" ] || \ if [ "$module_variant" = "0x01" ] || \
[ "$module_variant" = "0x04" ] || \ [ "$module_variant" = "0x04" ] || \
[ "$module_variant" = "0x05" ]; then [ "$module_variant" = "0x05" ]; then