From 7d3c5bcccf366d52c76a3973becdb628bc3378ed Mon Sep 17 00:00:00 2001 From: Gabriel Valcazar Date: Mon, 5 Jul 2021 14:34:06 +0200 Subject: [PATCH] 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 --- .../u-boot/u-boot-dey/ccimx6ul/install_linux_fw_uuu.sh | 4 ++-- .../u-boot/u-boot-dey/ccimx8x/install_linux_fw_uuu.sh | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) 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 1dedc6e9b..d093a4792 100755 --- 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 @@ -87,7 +87,7 @@ uuu fb: ucmd setenv stdout serial,fastboot if [ -z "${INSTALL_UBOOT_FILENAME}" ]; then module_variant=$(getenv "module_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" ] || \ [ "$module_variant" = "0x09" ]; then INSTALL_UBOOT_FILENAME="u-boot-##MACHINE##512MB.imx" @@ -110,7 +110,7 @@ if [ -z "${INSTALL_UBOOT_FILENAME}" ]; then echo "" echo "[ERROR] Cannot determine U-Boot file for this module!" 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 " => ./install_linux_fw_uuu.sh -u u-boot-##MACHINE##1GB.imx" echo " - For a SOM with 512MB DDR3, run:" 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 a07ed7777..cbe7960d7 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 @@ -101,7 +101,7 @@ if [ -z ${INSTALL_UBOOT_FILENAME} ]; then if [ -z "${module_ram}" ]; then module_variant=$(getenv "module_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" ] || \ [ "$module_variant" = "0x04" ] || \ [ "$module_variant" = "0x05" ]; then