diff --git a/airoha/base-files/lib/upgrade/platform.sh b/airoha/base-files/lib/upgrade/platform.sh index 0c776c85f73ed07368bead323697a7591690abcd..84644914775a3c5abbecceb60541451b183701be 100644 --- a/airoha/base-files/lib/upgrade/platform.sh +++ b/airoha/base-files/lib/upgrade/platform.sh @@ -11,12 +11,11 @@ platform_check_image() { __check_image_emmc_gpt_support "$image" "$board_name" || return } - __check_image_emmc_gpt_support() { local image=$1 local board_name=$2 local configuration="$(get_configuration "$image" "$board_name")" || return 1 - if [ "$(get_root_device_type)" = emmc ] && ! get_image_component_ref "$image" bootloader-emmc "$configuration" ; then + if [ "$(get_root_device_type)" = emmc ] && ! get_image_component_ref "$image" bootloader-emmc "$configuration" >/dev/null; then log "ERROR: Can not downgrade to image with missing eMMC GPT support." return 1 fi @@ -32,7 +31,7 @@ __check_image_70_65_downgrade() { # those images did not have configs to begin with # shellcheck disable=SC2155 local configuration="$(get_configuration "$image" "$board_name")" - if get_image_component_ref "$image" squashfs "$configuration"; then + if get_image_component_ref "$image" squashfs "$configuration" >/dev/null; then log "ERROR: Downgrading to a version older than 7.1.0ALPHA3 is not supported." return 1 fi