From 3096af0069b3e419fbf57f46f6410ebf42b7ae25 Mon Sep 17 00:00:00 2001 From: Hector Palacios Date: Fri, 25 Jun 2021 13:24:45 +0200 Subject: [PATCH] u-boot-dey: install-uuu: fix when U-Boot cannot be determined The install script of cc8x had errors (using double '==' instead of single on comparisions). Besides fixing this typo, this commit changes the logic to: - default to 2GB U-Boot for variants other than the ones in the list. - consider variant code 0x00 (not programmed HWID) as a failure. thus forcing the user to specify the file on the command line. This second action is done also on the cc6ul script. Reported-by: Hector Bujanda Signed-off-by: Hector Palacios --- .../u-boot-dey/ccimx6ul/install_linux_fw_uuu.sh | 2 +- .../u-boot-dey/ccimx8x/install_linux_fw_uuu.sh | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 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 c6971b7b0..8c48714e0 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" ]; 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" 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 88eed85b3..a51502e1b 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,16 +101,16 @@ 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" ]; then - if [ "$module_variant" == "0x01" ] || \ - [ "$module_variant" == "0x04" ] || \ - [ "$module_variant" == "0x05" ]; then + if [ -n "$module_variant" || "$module_variant" = "0x00" ]; then + if [ "$module_variant" = "0x01" ] || \ + [ "$module_variant" = "0x04" ] || \ + [ "$module_variant" = "0x05" ]; then module_ram="1GB" - elif [ "$module_variant" == "0x02" ] || \ - [ "$module_variant" == "0x03" ]; then - module_ram="2GB" - else + elif [ "$module_variant" = "0x06" ] || \ + [ "$module_variant" = "0x09" ]; then module_ram="512MB" + else + module_ram="2GB" fi INSTALL_UBOOT_FILENAME="imx-boot-##MACHINE##-${soc_rev}-${module_ram}_${bus_width}.bin" fi