diff options
author | Jason M. Bills <jason.m.bills@linux.intel.com> | 2020-04-08 01:43:15 +0300 |
---|---|---|
committer | Jason M. Bills <jason.m.bills@linux.intel.com> | 2020-04-13 22:35:48 +0300 |
commit | 235618c7396902842906bc3a8c90a3320aeeaeba (patch) | |
tree | 27cb132ef7a799804c6b71be460cc8e718c7dcce /meta-openbmc-mods/meta-common/recipes-core/fw-update/files | |
parent | ee6f67609223ac24c3e4f55ae7cc78c60a3fdb34 (diff) | |
download | openbmc-235618c7396902842906bc3a8c90a3320aeeaeba.tar.xz |
Update to internal 0.47
Signed-off-by: Jason M. Bills <jason.m.bills@linux.intel.com>
Diffstat (limited to 'meta-openbmc-mods/meta-common/recipes-core/fw-update/files')
-rw-r--r-- | meta-openbmc-mods/meta-common/recipes-core/fw-update/files/fwupd.sh | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/meta-openbmc-mods/meta-common/recipes-core/fw-update/files/fwupd.sh b/meta-openbmc-mods/meta-common/recipes-core/fw-update/files/fwupd.sh index 17923b84d..917e7ab09 100644 --- a/meta-openbmc-mods/meta-common/recipes-core/fw-update/files/fwupd.sh +++ b/meta-openbmc-mods/meta-common/recipes-core/fw-update/files/fwupd.sh @@ -66,10 +66,14 @@ pfr_write() { pfr_active_update() { local factory_reset="" + local recovery_offset=0x2a00000 systemctl stop nv-sync.service || \ log "BMC NV sync failed to stop" # transition from non-PFR to PFR image requires factory reset - [ ! -e /usr/share/pfr ] && factory_reset="-r" + if [ ! -e /usr/share/pfr ]; then + factory_reset="-r" + mtd-util pfr stage $LOCAL_PATH $recovery_offset + fi mtd-util $factory_reset pfr write $LOCAL_PATH redfish_log_fw_evt success # only wait for logging if not transitioning from non-PFR to PFR @@ -228,6 +232,13 @@ blk0blk1_update() { } ping_pong_update() { + # if some one tries to update with non-PFR on PFR image + # just exit + if [ -e /usr/share/pfr ]; then + log "Update exited as non-PFR image is tried onto PFR image" + redfish_log_fw_evt abort + return 1 + fi # do a quick sanity check on the image if [ $(stat -c "%s" "$LOCAL_PATH") -lt 10000000 ]; then log "Update file "$LOCAL_PATH" seems to be too small" |