Initial commit
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
SUMMARY = "Inventory config for openpower-vpd-parser"
|
||||
PR = "r1"
|
||||
LICENSE = "Apache-2.0"
|
||||
LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10"
|
||||
|
||||
inherit openpower-fru-vpd
|
||||
inherit native
|
||||
|
||||
SRC_URI += "file://inventory"
|
||||
|
||||
PROVIDES += "virtual/openpower-fru-inventory"
|
||||
|
||||
S = "${WORKDIR}"
|
||||
|
||||
do_install() {
|
||||
# This recipe is supposed to create a systemd environment file
|
||||
# with values for FRU types and paths. This example recipe
|
||||
# uses a pre-defined file ($PN/inventory).
|
||||
|
||||
DEST=${D}${inventory_datadir_native}
|
||||
install -d ${DEST}
|
||||
install inventory ${DEST}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
FRUS=BMC
|
||||
PATHS=/system/chassis/bmc
|
||||
@@ -0,0 +1,29 @@
|
||||
SUMMARY = "Inventory config for openpower-vpd-parser"
|
||||
PR = "r1"
|
||||
LICENSE = "Apache-2.0"
|
||||
LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10"
|
||||
|
||||
inherit openpower-fru-vpd
|
||||
inherit mrw-xml
|
||||
inherit native
|
||||
|
||||
DEPENDS += " \
|
||||
mrw-native \
|
||||
mrw-perl-tools-native \
|
||||
virtual/openpower-fru-vpd-layout \
|
||||
"
|
||||
|
||||
PROVIDES += "virtual/openpower-fru-inventory"
|
||||
|
||||
S = "${WORKDIR}"
|
||||
|
||||
do_install() {
|
||||
DEST=${D}${inventory_datadir_native}
|
||||
install -d ${DEST}
|
||||
|
||||
${bindir}/perl-native/perl \
|
||||
${bindir}/gen_openpower_fru.pl \
|
||||
-m ${mrw_datadir}/${MRW_XML} \
|
||||
-c ${vpdlayout_datadir}/layout.yaml \
|
||||
-o ${DEST}/inventory
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
SUMMARY = "FRU properties config for openpower-vpd-parser"
|
||||
PR = "r1"
|
||||
LICENSE = "Apache-2.0"
|
||||
LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10"
|
||||
|
||||
inherit openpower-fru-vpd
|
||||
inherit native
|
||||
|
||||
SRC_URI += "file://example.yaml"
|
||||
|
||||
PROVIDES += "virtual/openpower-fru-properties"
|
||||
|
||||
S = "${WORKDIR}"
|
||||
|
||||
do_install() {
|
||||
# This recipe is supposed to create an output yaml file with
|
||||
# FRU property values extracted from the MRW. This example recipe
|
||||
# provides a sample output file.
|
||||
|
||||
DEST=${D}${properties_datadir}
|
||||
install -d ${DEST}
|
||||
install example.yaml ${DEST}/out.yaml
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
/system/chassis/motherboard/boxelder/bmc:
|
||||
xyz.openbmc_project.Inventory.Decorator.Replaceable:
|
||||
FieldReplaceable: 'false'
|
||||
/system/chassis/motherboard/boxelder/bmc/ethernet:
|
||||
xyz.openbmc_project.Inventory.Decorator.Replaceable:
|
||||
FieldReplaceable: 'false'
|
||||
@@ -0,0 +1,30 @@
|
||||
SUMMARY = "FRU properties config for openpower-vpd-parser"
|
||||
PR = "r1"
|
||||
LICENSE = "Apache-2.0"
|
||||
LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10"
|
||||
|
||||
inherit openpower-fru-vpd
|
||||
inherit mrw-xml
|
||||
inherit native
|
||||
|
||||
SRC_URI += "file://config.yaml"
|
||||
|
||||
DEPENDS += " \
|
||||
mrw-native \
|
||||
mrw-perl-tools-native \
|
||||
"
|
||||
|
||||
PROVIDES += "virtual/openpower-fru-properties"
|
||||
|
||||
S = "${WORKDIR}"
|
||||
|
||||
do_install() {
|
||||
DEST=${D}${properties_datadir}
|
||||
install -d ${DEST}
|
||||
|
||||
${bindir}/perl-native/perl \
|
||||
${bindir}/gen_fru_properties.pl \
|
||||
-m ${mrw_datadir}/${MRW_XML} \
|
||||
-c config.yaml \
|
||||
-o ${DEST}/out.yaml
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
BMC:
|
||||
xyz.openbmc_project.Inventory.Decorator.Replaceable:
|
||||
FieldReplaceable: 'false'
|
||||
xyz.openbmc_project.Inventory.Item:
|
||||
Present: 'true'
|
||||
|
||||
ETHERNET:
|
||||
xyz.openbmc_project.Inventory.Decorator.Replaceable:
|
||||
FieldReplaceable: 'false'
|
||||
xyz.openbmc_project.Inventory.Item:
|
||||
Present: 'true'
|
||||
|
After Width: | Height: | Size: 326 B |
@@ -0,0 +1,20 @@
|
||||
SUMMARY = "VPD layout for openpower-fru-vpd"
|
||||
PR = "r1"
|
||||
LICENSE = "Apache-2.0"
|
||||
LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10"
|
||||
|
||||
inherit openpower-fru-vpd
|
||||
inherit native
|
||||
|
||||
SRC_URI += "file://layout.yaml"
|
||||
|
||||
PROVIDES += "virtual/openpower-fru-vpd-layout"
|
||||
|
||||
S = "${WORKDIR}"
|
||||
|
||||
do_install() {
|
||||
DEST=${D}${vpdlayout_datadir}
|
||||
|
||||
install -d ${DEST}
|
||||
install layout.yaml ${DEST}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
BMC:
|
||||
xyz.openbmc_project.Inventory.Decorator.Asset:
|
||||
OPFR,VP: PartNumber
|
||||
OPFR,VS: SerialNumber
|
||||
OPFR,VN: Manufacturer
|
||||
xyz.openbmc_project.Inventory.Item:
|
||||
VINI,DR: PrettyName
|
||||
xyz.openbmc_project.Inventory.Item.Bmc:
|
||||
ETHERNET:
|
||||
xyz.openbmc_project.Inventory.Item.NetworkInterface:
|
||||
VINI,B1: MACAddress
|
||||
OPFR,B1: MACAddress
|
||||
xyz.openbmc_project.Inventory.Item.Ethernet:
|
||||
ETHERNET1:
|
||||
xyz.openbmc_project.Inventory.Item.NetworkInterface:
|
||||
VINI,B1: MACAddress
|
||||
OPFR,B1: MACAddress
|
||||
xyz.openbmc_project.Inventory.Item.Ethernet:
|
||||
|
After Width: | Height: | Size: 601 B |
@@ -0,0 +1,6 @@
|
||||
HOMEPAGE = "https://github.com/openbmc/openpower-vpd-parser"
|
||||
LICENSE = "Apache-2.0"
|
||||
LIC_FILES_CHKSUM = "file://LICENSE;md5=e3fc50a88d0a364313df4b21ef20c29e"
|
||||
SRC_URI += "git://github.com/openbmc/openpower-vpd-parser;branch=master;protocol=https"
|
||||
SRCREV = "4170bdad54a7583b7f8e0435a4702acb126aa326"
|
||||
DEPENDS += "nlohmann-json"
|
||||
@@ -0,0 +1 @@
|
||||
SUBSYSTEM=="i2c", ENV{OF_NAME}=="eeprom", ACTION=="add", TAG+="systemd", ENV{SYSTEMD_WANTS}+="op-vpd-parser"
|
||||
@@ -0,0 +1,12 @@
|
||||
[Unit]
|
||||
Description=Read OpenPOWER-format VPD from EEPROM
|
||||
ConditionFileNotEmpty={envfiledir}/obmc/inventory
|
||||
Wants=mapper-wait@-xyz-openbmc_project-inventory.service
|
||||
After=mapper-wait@-xyz-openbmc_project-inventory.service
|
||||
|
||||
[Service]
|
||||
Restart=no
|
||||
Type=oneshot
|
||||
EnvironmentFile={envfiledir}/obmc/inventory
|
||||
ExecStart=/usr/bin/openpower-read-vpd --vpd $EEPROM --fru $FRUS --object $PATHS
|
||||
RemainAfterExit=yes
|
||||
@@ -0,0 +1,48 @@
|
||||
SUMMARY = "Parser for OpenPOWER-format FRU VPD"
|
||||
DESCRIPTION = "Parse OpenPOWER-format FRU VPD and update inventory"
|
||||
PR = "r1"
|
||||
PV = "1.0+git${SRCPV}"
|
||||
|
||||
inherit meson pkgconfig
|
||||
inherit openpower-fru-vpd
|
||||
inherit python3native
|
||||
inherit obmc-phosphor-systemd
|
||||
|
||||
require ${BPN}.inc
|
||||
|
||||
SRC_URI += "file://70-op-vpd.rules"
|
||||
|
||||
DEPENDS += " \
|
||||
virtual/openpower-fru-vpd-layout \
|
||||
virtual/openpower-fru-inventory \
|
||||
virtual/openpower-fru-properties \
|
||||
sdbusplus \
|
||||
phosphor-logging \
|
||||
${PYTHON_PN}-mako-native \
|
||||
${PYTHON_PN}-pyyaml-native \
|
||||
autoconf-archive-native \
|
||||
"
|
||||
|
||||
SYSTEMD_SERVICE:${PN} += "op-vpd-parser.service"
|
||||
|
||||
S = "${WORKDIR}/git"
|
||||
|
||||
PACKAGECONFIG ??= ""
|
||||
PACKAGECONFIG[ibm-parser] = "-Dibm-parser=enabled, -Dibm-parser=disabled, libgpiod nlohmann-json cli11"
|
||||
PACKAGECONFIG[vpd-manager] = "-Dvpd-manager=enabled, -Dvpd-manager=disabled"
|
||||
|
||||
EXTRA_OEMESON = " \
|
||||
-Dtests=disabled \
|
||||
-DFRU_YAML=${STAGING_DIR_NATIVE}${vpdlayout_datadir}/layout.yaml \
|
||||
-DPROP_YAML=${STAGING_DIR_NATIVE}${properties_datadir}/out.yaml \
|
||||
"
|
||||
|
||||
do_install:append() {
|
||||
SRC=${STAGING_DATADIR_NATIVE}${inventory_datadir_name}
|
||||
DEST=${D}${inventory_envdir}
|
||||
install -d ${DEST}
|
||||
install ${SRC}/inventory ${DEST}
|
||||
|
||||
install -d ${D}/${nonarch_base_libdir}/udev/rules.d/
|
||||
install -m0644 ${WORKDIR}/70-op-vpd.rules ${D}/${nonarch_base_libdir}/udev/rules.d/
|
||||
}
|
||||
Reference in New Issue
Block a user