From 816d793003e93c1e5eec0a2e90fbd8b9dde9f7a5 Mon Sep 17 00:00:00 2001 From: Ed Tanous Date: Mon, 15 Apr 2019 13:42:44 -0700 Subject: Update 4-15-19 Signed-off-by: Ed Tanous --- .../meta-common/recipes-core/fw-update/files/fwupd.sh | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'meta-openbmc-mods/meta-common/recipes-core/fw-update/files') 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 5a2637ba3..dd3b7f69a 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 @@ -84,6 +84,18 @@ if [ $? -ne 0 ]; then exit 1 fi +#this file being created at build time for PFR images +#TODO: Need to do runtime detection of PFR platform +#TODO: Also to check if PFR is provisioned or not +if [ -e /usr/share/pfr ] +then +TGT="/dev/mtd/image-stg" +echo "Updating $(basename $TGT)" +flash_erase $TGT 0 0 +echo "Writing $(stat -c "%s" "$LOCAL_PATH") bytes" +cat "$LOCAL_PATH" > "$TGT" +#TODO: Add I2C command to write to PFRCPLD about BMC update intent. +else # guess based on fw_env which partition we booted from BOOTADDR=$(fw_printenv bootcmd | awk '{print $2}') @@ -101,4 +113,4 @@ fw_setenv "bootcmd" "bootm ${BOOTADDR}" # reboot reboot - +fi -- cgit v1.2.3