meta-ibm: Switch p10bmc to use ibm-read-vpd
This commit switches p10bmc machines to use a variation of the
openpower VPD parser called ibm-read-vpd that supports JSON driven
inventory configuration and runtime detection of system type.
Also supported are VPD writes via the vpd-manager service.
Signed-off-by: Santosh Puranik <santosh.puranik@in.ibm.com>
Change-Id: Id61b32846e0cc9750a5cf12297e7d956b1f511cf
diff --git a/meta-ibm/recipes-phosphor/vpd/openpower-fru-vpd_%.bbappend b/meta-ibm/recipes-phosphor/vpd/openpower-fru-vpd_%.bbappend
index d2b8407..c1ec68e 100644
--- a/meta-ibm/recipes-phosphor/vpd/openpower-fru-vpd_%.bbappend
+++ b/meta-ibm/recipes-phosphor/vpd/openpower-fru-vpd_%.bbappend
@@ -1,3 +1,26 @@
+DEPENDS:append:p10bmc = " cli11"
+DEPENDS:append:p10bmc = " nlohmann-json"
+DEPENDS:append:p10bmc = " phosphor-dbus-interfaces"
+DEPENDS:append:p10bmc = " libgpiod"
+
+FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"
+
+SYSTEMD_SERVICE:${PN}:append:p10bmc = " ibm-vpd-parser@.service"
+SYSTEMD_SERVICE:${PN}:append:p10bmc = " system-vpd.service"
+SYSTEMD_SERVICE:${PN}:append:p10bmc = " com.ibm.VPD.Manager.service"
+SYSTEMD_SERVICE:${PN}:append:p10bmc = " wait-vpd-parsers.service"
+SYSTEMD_SERVICE:${PN}:remove:p10bmc = " op-vpd-parser.service"
+PACKAGECONFIG:append:p10bmc = " ibm-parser vpd-manager"
+
+FILES:${PN}:append:p10bmc = " ${datadir}/vpd/*.json"
+
+do_install:append:p10bmc() {
+ # Remove files that are used by openpower-read-vpd
+ DEST=${D}${inventory_envdir}
+ rm ${DEST}/inventory
+ rm ${D}/${nonarch_base_libdir}/udev/rules.d/70-op-vpd.rules
+}
+
do_install:append:witherspoon() {
DEST=${D}${inventory_envdir}
printf "\nEEPROM=/sys/devices/platform/ahb/ahb:apb/ahb:apb:bus@1e78a000/1e78a400.i2c-bus/i2c-11/11-0051/eeprom" >> ${DEST}/inventory