diff options
author | Ed Tanous <ed.tanous@intel.com> | 2019-04-15 23:42:44 +0300 |
---|---|---|
committer | Ed Tanous <ed.tanous@intel.com> | 2019-04-17 19:13:25 +0300 |
commit | 816d793003e93c1e5eec0a2e90fbd8b9dde9f7a5 (patch) | |
tree | 341534fed9a2de460ded7f8231ca1cbb178bb2ca /meta-openbmc-mods/meta-common/recipes-core/fw-update | |
parent | a75bff085ba9443315222231c42692745e5781e9 (diff) | |
download | openbmc-816d793003e93c1e5eec0a2e90fbd8b9dde9f7a5.tar.xz |
Update 4-15-19
Signed-off-by: Ed Tanous <ed.tanous@intel.com>
Diffstat (limited to 'meta-openbmc-mods/meta-common/recipes-core/fw-update')
-rw-r--r-- | meta-openbmc-mods/meta-common/recipes-core/fw-update/files/fwupd.sh | 14 | ||||
-rw-r--r-- | meta-openbmc-mods/meta-common/recipes-core/fw-update/intel-fw-update.bb | 8 |
2 files changed, 21 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 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 diff --git a/meta-openbmc-mods/meta-common/recipes-core/fw-update/intel-fw-update.bb b/meta-openbmc-mods/meta-common/recipes-core/fw-update/intel-fw-update.bb index ac8e58c03..08d0057ef 100644 --- a/meta-openbmc-mods/meta-common/recipes-core/fw-update/intel-fw-update.bb +++ b/meta-openbmc-mods/meta-common/recipes-core/fw-update/intel-fw-update.bb @@ -11,12 +11,20 @@ RDEPENDS_intel-fw-update += "dosfstools parted" LICENSE = "Apache-2.0" LIC_FILES_CHKSUM = "file://${INTELBASE}/COPYING.apache-2.0;md5=34400b68072d710fecd0a2940a0d1658" +PFR_EN = "${@bb.utils.contains('IMAGE_TYPE', 'pfr', 'pfr', '', d)}" SRC_URI += "file://fwupd.sh" SRC_URI += "file://usb-ctrl" +FILES_${PN} += "${@bb.utils.contains('IMAGE_TYPE', 'pfr', '${datadir}/pfr', '', d)}" + do_install() { install -d ${D}${bindir} install -m 0755 ${WORKDIR}/fwupd.sh ${D}${bindir} install -m 0755 ${WORKDIR}/usb-ctrl ${D}${bindir} + + if [ "${PFR_EN}" = "pfr" ]; then + install -d ${D}${datadir} + touch ${D}${datadir}/pfr + fi } |