summaryrefslogtreecommitdiff
path: root/meta-ibm/dynamic-layers/meta-openpower/recipes-phosphor/vpd
diff options
context:
space:
mode:
authorAndrew Geissler <geissonator@yahoo.com>2023-06-30 23:46:00 +0300
committerAndrew Geissler <geissonator@yahoo.com>2023-07-18 17:28:06 +0300
commitb5c22690c606423fcf2a79cfd691f174f49b08ee (patch)
tree42a8ad6c0f3909dbd2857405eba97727da9f6685 /meta-ibm/dynamic-layers/meta-openpower/recipes-phosphor/vpd
parentd8edd104e2ed89b51a5adebab05724960bd9dd55 (diff)
downloadopenbmc-b5c22690c606423fcf2a79cfd691f174f49b08ee.tar.xz
meta-ibm: only use openpower bbappend when including layer
There is a desire to add non-openpower systems to the meta-ibm layer. To do that, need to ensure the bbappend files that are appending to openpower recipes are only included if the machine being built includes the meta-openpower layer. Tested: - Confirmed a system not including meta-openpower builds ok with this - Confirmed p10bmc still uses the bbappend files Signed-off-by: Andrew Geissler <geissonator@yahoo.com> Change-Id: I32a08e9f20a20152d51c77cdfca6bbc15b5e93d4
Diffstat (limited to 'meta-ibm/dynamic-layers/meta-openpower/recipes-phosphor/vpd')
-rw-r--r--meta-ibm/dynamic-layers/meta-openpower/recipes-phosphor/vpd/openpower-fru-vpd_%.bbappend50
1 files changed, 50 insertions, 0 deletions
diff --git a/meta-ibm/dynamic-layers/meta-openpower/recipes-phosphor/vpd/openpower-fru-vpd_%.bbappend b/meta-ibm/dynamic-layers/meta-openpower/recipes-phosphor/vpd/openpower-fru-vpd_%.bbappend
new file mode 100644
index 0000000000..5b7b8808ab
--- /dev/null
+++ b/meta-ibm/dynamic-layers/meta-openpower/recipes-phosphor/vpd/openpower-fru-vpd_%.bbappend
@@ -0,0 +1,50 @@
+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
+}
+
+do_install:append:swift() {
+ DEST=${D}${inventory_envdir}
+ printf "\nEEPROM=/sys/devices/platform/ahb/ahb:apb/ahb:apb:bus@1e78a000/1e78a340.i2c-bus/i2c-8/8-0051/eeprom" >> ${DEST}/inventory
+}
+
+do_install:append:witherspoon-tacoma() {
+ DEST=${D}${inventory_envdir}
+ printf "FRUS=BMC,ETHERNET" > ${DEST}/inventory
+ printf "\nPATHS=/system/chassis/motherboard/bmc,/system/chassis/motherboard/bmc/eth0" >> ${DEST}/inventory
+ printf "\nEEPROM=/sys/devices/platform/ahb/ahb:apb/ahb:apb:bus@1e78a000/1e78a600.i2c-bus/i2c-11/11-0051/eeprom" >> ${DEST}/inventory
+}
+
+pkg_postinst:${PN}:p10bmc() {
+ mkdir -p $D$systemd_system_unitdir/obmc-chassis-poweroff@0.target.wants
+ LINK="$D$systemd_system_unitdir/obmc-chassis-poweroff@0.target.wants/wait-vpd-parsers.service"
+ TARGET="../wait-vpd-parsers.service"
+ ln -s $TARGET $LINK
+}
+pkg_prerm:${PN}:p10bmc() {
+ LINK="$D$systemd_system_unitdir/obmc-chassis-poweroff@0.target.wants/wait-vpd-parsers.service"
+ rm $LINK
+}