From 820013481a115100d5f8f22dc01aac8cc0363a23 Mon Sep 17 00:00:00 2001 From: "Jason M. Bills" Date: Tue, 7 Jan 2020 10:40:08 -0800 Subject: Update to internal 2020-01-07 Signed-off-by: Jason M. Bills --- .../meta-common/recipes-core/fw-update/files/fwupd.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'meta-openbmc-mods/meta-common/recipes-core/fw-update') 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 3073128e0..03dac7582 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 @@ -124,9 +124,10 @@ touch /tmp/fwupd_progress # Byte at location 0x8 gives image type img_type=$(busctl get-property xyz.openbmc_project.Software.BMC.Updater /xyz/openbmc_project/software/$1 xyz.openbmc_project.Software.Version Purpose | cut -d " " -f 2 | cut -d "." -f 6 | sed 's/.\{1\}$//') img_target=$(busctl get-property xyz.openbmc_project.Software.BMC.Updater /xyz/openbmc_project/software/$1 xyz.openbmc_project.Software.Activation RequestedActivation | cut -d " " -f 2| cut -d "." -f 6 | sed 's/.\{1\}$//') - +apply_time=$(busctl get-property xyz.openbmc_project.Settings /xyz/openbmc_project/software/apply_time xyz.openbmc_project.Software.ApplyTime RequestedApplyTime | cut -d " " -f 2 | cut -d "." -f 6 | sed 's/.\{1\}$//') echo "image-type=$img_type" echo "image-target=$img_target" +echo "apply_time=$apply_time" # BMC image - max size 32MB if [ "$img_type" = 'BMC' ]; then @@ -174,6 +175,10 @@ else exit 1 fi +if [ "$apply_time" == 'OnReset' ]; then + upd_intent_val=$(( "$upd_intent_val"|0x80 )) +fi + # do a size check on the image if [ $(stat -c "%s" "$LOCAL_PATH") -gt $img_size ]; then echo "Update file "$LOCAL_PATH" is bigger than the supported image size" -- cgit v1.2.3