diff options
author | Lancelot Kao <lancelot.kao@fii-usa.com> | 2021-02-23 01:48:42 +0300 |
---|---|---|
committer | Mohaimen Alsamarai <mohaimen.alsamarai@fii-na.com> | 2021-04-13 04:48:19 +0300 |
commit | d3e767d284061d84c3942bcbdd0552bfb165549f (patch) | |
tree | b22448510b612ac999f9bedb0f1d59159ecea1f6 /meta-fii/meta-kudo/recipes-kudo | |
parent | fa729135341fbbcccad7591d73eb7424fa2bb477 (diff) | |
download | openbmc-d3e767d284061d84c3942bcbdd0552bfb165549f.tar.xz |
meta-fii/meta-kudo: support the cpld update feature
1. add kudo-cpld-update package to support cpld update
Signed-off-by: Lancelot Kao <lancelot.kao@fii-usa.com>
Change-Id: Idb0f676ac5a8cc214d65135924431d02bf971c75
Signed-off-by: XP Chen <xiao-peng.chen@fii-na.com>
Signed-off-by: Mohaimen Alsamarai <Mohaimen.alsamarai@fii-na.com>
Diffstat (limited to 'meta-fii/meta-kudo/recipes-kudo')
7 files changed, 99 insertions, 1 deletions
diff --git a/meta-fii/meta-kudo/recipes-kudo/kudo-fw-utility/kudo-cpld-update.bb b/meta-fii/meta-kudo/recipes-kudo/kudo-fw-utility/kudo-cpld-update.bb new file mode 100644 index 000000000..b2fd8209d --- /dev/null +++ b/meta-fii/meta-kudo/recipes-kudo/kudo-fw-utility/kudo-cpld-update.bb @@ -0,0 +1,39 @@ +SUMMARY = "Phosphor OpenBMC Kudo CPLD Firmware Upgrade Command" +DESCRIPTION = "Phosphor OpenBMC Kudo CPLD Firmware Upgrade Comman Daemon" + +PR = "r1" +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10" + +inherit systemd +inherit obmc-phosphor-systemd + +DEPENDS += "systemd" +DEPENDS += "phosphor-ipmi-flash" +RDEPENDS_${PN} += "libsystemd" +RDEPENDS_${PN} += "bash" + +FILES_${PN} += "${datadir}/phosphor-ipmi-flash/config-bmccpld.json" +FILES_${PN} += "${datadir}/phosphor-ipmi-flash/config-mbcpld.json" + +SRC_URI_append_kudo = " \ + file://phosphor-ipmi-flash-bmccpld-update.service \ + file://phosphor-ipmi-flash-mbcpld-update.service \ + file://config-bmccpld.json \ + file://config-mbcpld.json \ + " + +SYSTEMD_PACKAGES = "${PN}" +SYSTEMD_SERVICE_${PN}_append_kudo = " \ + phosphor-ipmi-flash-bmccpld-update.service \ + phosphor-ipmi-flash-mbcpld-update.service \ + " + +do_install () { + install -d ${D}${datadir}/phosphor-ipmi-flash + install -m 0644 ${WORKDIR}/config-bmccpld.json ${D}${datadir}/phosphor-ipmi-flash + install -m 0644 ${WORKDIR}/config-mbcpld.json ${D}${datadir}/phosphor-ipmi-flash + install -d ${D}${systemd_system_unitdir} + install -m 0644 ${WORKDIR}/phosphor-ipmi-flash-bmccpld-update.service ${D}${systemd_system_unitdir} + install -m 0644 ${WORKDIR}/phosphor-ipmi-flash-mbcpld-update.service ${D}${systemd_system_unitdir} +}
\ No newline at end of file diff --git a/meta-fii/meta-kudo/recipes-kudo/kudo-fw-utility/kudo-cpld-update/config-bmccpld.json b/meta-fii/meta-kudo/recipes-kudo/kudo-fw-utility/kudo-cpld-update/config-bmccpld.json new file mode 100644 index 000000000..687aa11c2 --- /dev/null +++ b/meta-fii/meta-kudo/recipes-kudo/kudo-fw-utility/kudo-cpld-update/config-bmccpld.json @@ -0,0 +1,19 @@ +[{ + "blob": "/flash/bmccpld", + "handler": { + "type": "file", + "path": "/run/initramfs/bmc-cpld.svf" + }, + "actions": { + "preparation": { + "type": "skip" + }, + "verification": { + "type": "skip" + }, + "update": { + "type": "systemd", + "unit": "phosphor-ipmi-flash-bmccpld-update.service" + } + } +}] diff --git a/meta-fii/meta-kudo/recipes-kudo/kudo-fw-utility/kudo-cpld-update/config-mbcpld.json b/meta-fii/meta-kudo/recipes-kudo/kudo-fw-utility/kudo-cpld-update/config-mbcpld.json new file mode 100644 index 000000000..f5870bb33 --- /dev/null +++ b/meta-fii/meta-kudo/recipes-kudo/kudo-fw-utility/kudo-cpld-update/config-mbcpld.json @@ -0,0 +1,20 @@ +[{ + "blob": "/flash/mbcpld", + "handler": { + "type": "file", + "path": "/run/initramfs/mb-cpld.svf" + }, + "actions": { + "preparation": { + "type": "skip" + }, + "verification": { + "type": "skip" + }, + "update": { + "type": "systemd", + "unit": "phosphor-ipmi-flash-mbcpld-update.service" + } + } +}] + diff --git a/meta-fii/meta-kudo/recipes-kudo/kudo-fw-utility/kudo-cpld-update/phosphor-ipmi-flash-bmccpld-update.service b/meta-fii/meta-kudo/recipes-kudo/kudo-fw-utility/kudo-cpld-update/phosphor-ipmi-flash-bmccpld-update.service new file mode 100644 index 000000000..b4f91f81c --- /dev/null +++ b/meta-fii/meta-kudo/recipes-kudo/kudo-fw-utility/kudo-cpld-update/phosphor-ipmi-flash-bmccpld-update.service @@ -0,0 +1,9 @@ +[Unit] +Description=Phosphor-ipmi-flash update BMC CPLD firmware service + +[Service] +ExecStart=/usr/sbin/kudo-fw.sh bmccpld /run/initramfs/bmc-cpld.svf +Type=oneshot + +[Install] +WantedBy=phosphor-ipmi-flash-bmccpld-update.target diff --git a/meta-fii/meta-kudo/recipes-kudo/kudo-fw-utility/kudo-cpld-update/phosphor-ipmi-flash-mbcpld-update.service b/meta-fii/meta-kudo/recipes-kudo/kudo-fw-utility/kudo-cpld-update/phosphor-ipmi-flash-mbcpld-update.service new file mode 100644 index 000000000..51b6c9c4b --- /dev/null +++ b/meta-fii/meta-kudo/recipes-kudo/kudo-fw-utility/kudo-cpld-update/phosphor-ipmi-flash-mbcpld-update.service @@ -0,0 +1,9 @@ +[Unit] +Description=Phosphor-ipmi-flash update MB CPLD firmware service + +[Service] +ExecStart=/usr/sbin/kudo-fw.sh mbcpld /run/initramfs/mb-cpld.svf +Type=oneshot + +[Install] +WantedBy=phosphor-ipmi-flash-mbcpld-update.target diff --git a/meta-fii/meta-kudo/recipes-kudo/kudo-fw-utility/kudo-fw/kudo-fw-ver.sh b/meta-fii/meta-kudo/recipes-kudo/kudo-fw-utility/kudo-fw/kudo-fw-ver.sh index 2c502980a..498fe7d0a 100644 --- a/meta-fii/meta-kudo/recipes-kudo/kudo-fw-utility/kudo-fw/kudo-fw-ver.sh +++ b/meta-fii/meta-kudo/recipes-kudo/kudo-fw-utility/kudo-fw/kudo-fw-ver.sh @@ -19,9 +19,10 @@ function fw_rev() { ;; esac } + fw_rev cpldb echo "BMC CPLD version : ${ver}" echo "${ver}" > "${BMC_CPLD_VER_FILE}" fw_rev cpldm echo "MB CPLD version : ${ver}" -echo "${ver}" > "${MB_CPLD_VER_FILE}" +echo "${ver}" > "${MB_CPLD_VER_FILE}"
\ No newline at end of file diff --git a/meta-fii/meta-kudo/recipes-kudo/packagegroups/packagegroup-kudo-apps.bb b/meta-fii/meta-kudo/recipes-kudo/packagegroups/packagegroup-kudo-apps.bb index 17bde95fa..fe93898ba 100644 --- a/meta-fii/meta-kudo/recipes-kudo/packagegroups/packagegroup-kudo-apps.bb +++ b/meta-fii/meta-kudo/recipes-kudo/packagegroups/packagegroup-kudo-apps.bb @@ -29,4 +29,5 @@ RDEPENDS_${PN}-kudo-fw = " \ kudo-fw \ kudo-bios-update \ kudo-bmc-update \ + kudo-cpld-update \ " |