diff options
author | Thang Q. Nguyen <thang@os.amperecomputing.com> | 2022-11-08 10:43:42 +0300 |
---|---|---|
committer | Thang Q. Nguyen <thang@os.amperecomputing.com> | 2024-08-12 08:34:42 +0300 |
commit | e6a0291e774f20105254155032ba31ef1f8180c6 (patch) | |
tree | 3379a5711306a182437736d9f02a47f6ee2dfa69 /meta-ampere/meta-jade | |
parent | 5cb45e15210a407bf97a5461c4d7b76875eb8f98 (diff) | |
download | openbmc-e6a0291e774f20105254155032ba31ef1f8180c6.tar.xz |
meta-ampere: flash: refine script to flash Host firmware
Refine the scripts to flash Host firmware images to be consistent across
platforms. Also update the control logic to flash UEFI firmware image to
the Host SPI-NOR.
Change-Id: I81205b8b9d34568db6f99e00befbe44c44f6bcc9
Signed-off-by: Thang Q. Nguyen <thang@os.amperecomputing.com>
Diffstat (limited to 'meta-ampere/meta-jade')
-rwxr-xr-x | meta-ampere/meta-jade/recipes-ampere/platform/ampere-utils/ampere_firmware_upgrade.sh | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/meta-ampere/meta-jade/recipes-ampere/platform/ampere-utils/ampere_firmware_upgrade.sh b/meta-ampere/meta-jade/recipes-ampere/platform/ampere-utils/ampere_firmware_upgrade.sh index 227f264923..91a45a54e3 100755 --- a/meta-ampere/meta-jade/recipes-ampere/platform/ampere-utils/ampere_firmware_upgrade.sh +++ b/meta-ampere/meta-jade/recipes-ampere/platform/ampere-utils/ampere_firmware_upgrade.sh @@ -102,8 +102,8 @@ if [ $# -eq 0 ]; then echo "Usage:" echo " $(basename "$0") <Type> <Image file> <DEV_SEL> [SECPRO]" echo "Where:" - echo " <Type>: smpmpro or fru" - echo " If Type is smpmpro, then DEV_SEL must is 1 (MAIN EEPROM), 2 (Failover)" + echo " <Type>: eeprom or fru" + echo " If Type is eeprom, then DEV_SEL must is 1 (MAIN EEPROM), 2 (Failover)" echo " SECPRO: Optional, input '1' to enter & flash secpro mode. Default: 0" exit 0 fi @@ -138,8 +138,11 @@ if [ $SECPRO == 1 ] && [ "$DEV_SEL" == 2 ]; then exit fi -if [[ $TYPE == "smpmpro" ]]; then - do_smpmpro_upgrade -elif [[ $TYPE == "fru" ]]; then - do_fru_upgrade -fi +case $TYPE in + "smpmpro" | "eeprom") + do_smpmpro_upgrade + ;; + "fru") + do_fru_upgrade + ;; +esac |