summaryrefslogtreecommitdiff
path: root/meta-phosphor/recipes-phosphor/inventory
diff options
context:
space:
mode:
authorBrad Bishop <bradleyb@fuzziesquirrel.com>2018-08-31 13:25:51 +0300
committerBrad Bishop <bradleyb@fuzziesquirrel.com>2018-09-06 14:44:12 +0300
commitff075f6ee795a590b244d70a90cc312ba1f2d83d (patch)
treea617790bdbfdeef960665ba0242e1f0c93e5301a /meta-phosphor/recipes-phosphor/inventory
parent3e4da38c127bb7e7641adc2fc41f4c33744cb918 (diff)
downloadopenbmc-ff075f6ee795a590b244d70a90cc312ba1f2d83d.tar.xz
meta-phosphor: Move layer content from common/
Adopt a more conventional directory hierarchy. meta-phosphor is still a _long_ way from suitable for hosting on yoctoproject.org but things like this don't help. (From meta-phosphor rev: 471cfcefa74b8c7ceb704cb670e6d915cf27c63b) Change-Id: I3f106b2f6cdc6cec734be28a6090800546f362eb Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
Diffstat (limited to 'meta-phosphor/recipes-phosphor/inventory')
-rw-r--r--meta-phosphor/recipes-phosphor/inventory/obmc-inventory.bb31
-rw-r--r--meta-phosphor/recipes-phosphor/inventory/phosphor-inventory-manager-assettag-native.bb20
-rw-r--r--meta-phosphor/recipes-phosphor/inventory/phosphor-inventory-manager-assettag/assettag.yaml14
-rw-r--r--meta-phosphor/recipes-phosphor/inventory/phosphor-inventory-manager-config-native.bb15
-rw-r--r--meta-phosphor/recipes-phosphor/inventory/phosphor-inventory-manager.bb45
-rw-r--r--meta-phosphor/recipes-phosphor/inventory/phosphor-inventory-manager.inc5
-rw-r--r--meta-phosphor/recipes-phosphor/inventory/phosphor-inventory-manager/xyz.openbmc_project.Inventory.Manager.service13
7 files changed, 143 insertions, 0 deletions
diff --git a/meta-phosphor/recipes-phosphor/inventory/obmc-inventory.bb b/meta-phosphor/recipes-phosphor/inventory/obmc-inventory.bb
new file mode 100644
index 000000000..db3a5b404
--- /dev/null
+++ b/meta-phosphor/recipes-phosphor/inventory/obmc-inventory.bb
@@ -0,0 +1,31 @@
+SUMMARY = "Phosphor Inventory Generation"
+DESCRIPTION = "Generates inventory data from the machine readable workbook"
+PR = "r1"
+
+inherit mrw-xml
+
+S = "${WORKDIR}/git"
+
+PROVIDES += "virtual/obmc-inventory-data"
+RPROVIDES_${PN} += "virtual-obmc-inventory-data"
+
+inherit allarch
+inherit obmc-phosphor-license
+inherit mrw-rev
+
+DEPENDS += "mrw-native mrw-api-native"
+
+SRC_URI += "${MRW_TOOLS_SRC_URI}"
+SRCREV = "${MRW_TOOLS_SRCREV}"
+
+FILES_${PN} += "${datadir}/inventory"
+
+do_compile() {
+ ${STAGING_BINDIR_NATIVE}/perl-native/perl ${S}/inventory.pl \
+ -x ${STAGING_DIR_NATIVE}${mrw_datadir}/${MRW_XML} -o inventory.json
+}
+
+do_install() {
+ install -d ${D}${datadir}/inventory
+ install -m 0644 inventory.json ${D}${datadir}/inventory/inventory.json
+}
diff --git a/meta-phosphor/recipes-phosphor/inventory/phosphor-inventory-manager-assettag-native.bb b/meta-phosphor/recipes-phosphor/inventory/phosphor-inventory-manager-assettag-native.bb
new file mode 100644
index 000000000..fe9e6ed05
--- /dev/null
+++ b/meta-phosphor/recipes-phosphor/inventory/phosphor-inventory-manager-assettag-native.bb
@@ -0,0 +1,20 @@
+SUMMARY = "Recipe to create AssetTag property in inventory manager"
+PR = "r1"
+
+inherit native
+inherit obmc-phosphor-license
+inherit phosphor-inventory-manager
+
+PROVIDES += "virtual/phosphor-inventory-manager-assettag"
+
+SRC_URI += "file://assettag.yaml"
+
+S = "${WORKDIR}"
+
+do_install() {
+ # This recipe would provide the yaml for inventory manager to
+ # create AssetTag property at startup
+
+ install -d ${D}${base_datadir}/events.d/
+ install assettag.yaml ${D}${base_datadir}/events.d/assettag.yaml
+}
diff --git a/meta-phosphor/recipes-phosphor/inventory/phosphor-inventory-manager-assettag/assettag.yaml b/meta-phosphor/recipes-phosphor/inventory/phosphor-inventory-manager-assettag/assettag.yaml
new file mode 100644
index 000000000..d3a0104b9
--- /dev/null
+++ b/meta-phosphor/recipes-phosphor/inventory/phosphor-inventory-manager-assettag/assettag.yaml
@@ -0,0 +1,14 @@
+events:
+ - name: Creating AssetTag at startup
+ description: >
+ Create /system at startup and populate the AssetTag property with
+ empty string.
+ type: startup
+ actions:
+ - name: createObjects
+ objs:
+ /system:
+ xyz.openbmc_project.Inventory.Decorator.AssetTag:
+ AssetTag:
+ value: ""
+ type: string
diff --git a/meta-phosphor/recipes-phosphor/inventory/phosphor-inventory-manager-config-native.bb b/meta-phosphor/recipes-phosphor/inventory/phosphor-inventory-manager-config-native.bb
new file mode 100644
index 000000000..0b1c4533d
--- /dev/null
+++ b/meta-phosphor/recipes-phosphor/inventory/phosphor-inventory-manager-config-native.bb
@@ -0,0 +1,15 @@
+SUMMARY = "Phosphor Inventory Manager Configuration"
+DESCRIPTION = "Meta-recipe, pulling in native recipes that wish to add \
+data to the native /usr/share/phosphor-inventory-manager filesystem."
+HOMEPAGE = "http://github.com/openbmc/phosphor-inventory-manager"
+PR = "r1"
+
+inherit obmc-phosphor-license
+inherit native
+
+PHOSPHOR_INVENTORY_MANAGER_CONFIGS += "phosphor-inventory-manager-assettag-native"
+
+# To add additional managed inventory items, create a recipe in your layer,
+# and add it to PHOSPHOR_INVENTORY_MANAGER_CONFIGS with a bbappend to this recipe.
+
+DEPENDS += "${PHOSPHOR_INVENTORY_MANAGER_CONFIGS}"
diff --git a/meta-phosphor/recipes-phosphor/inventory/phosphor-inventory-manager.bb b/meta-phosphor/recipes-phosphor/inventory/phosphor-inventory-manager.bb
new file mode 100644
index 000000000..46a1d2904
--- /dev/null
+++ b/meta-phosphor/recipes-phosphor/inventory/phosphor-inventory-manager.bb
@@ -0,0 +1,45 @@
+SUMMARY = "Phosphor Inventory Manager"
+DESCRIPTION = "Phosphor Inventory Manager is an inventory object \
+lifecycle management application, suitable for use on a wide variety \
+of OpenBMC platforms."
+PR = "r1"
+
+inherit autotools \
+ pkgconfig \
+ pythonnative \
+ phosphor-dbus-yaml \
+ phosphor-inventory-manager \
+ obmc-phosphor-dbus-service
+
+require phosphor-inventory-manager.inc
+
+DEPENDS += " \
+ ${PN}-config-native \
+ phosphor-dbus-interfaces \
+ phosphor-dbus-interfaces-native \
+ phosphor-logging \
+ sdbusplus \
+ sdbusplus-native \
+ autoconf-archive-native \
+ cereal \
+ "
+RDEPENDS_${PN} += " \
+ sdbusplus \
+ phosphor-dbus-interfaces \
+ phosphor-logging \
+ "
+
+OBMC_INVENTORY_PATH="${OBMC_DBUS_PATH_ROOT}/inventory"
+OBMC_INVENTORY_MGR_IFACE="${OBMC_DBUS_IFACE_ROOT}.Inventory.Manager"
+
+DBUS_SERVICE_${PN} = "${OBMC_INVENTORY_MGR_IFACE}.service"
+
+S = "${WORKDIR}/git"
+
+EXTRA_OECONF = " \
+ YAML_PATH=${STAGING_DIR_NATIVE}${base_datadir} \
+ BUSNAME=${OBMC_INVENTORY_MGR_IFACE} \
+ INVENTORY_ROOT=${OBMC_INVENTORY_PATH} \
+ IFACE=${OBMC_INVENTORY_MGR_IFACE} \
+ IFACES_PATH=${STAGING_DIR_NATIVE}${yaml_dir} \
+ "
diff --git a/meta-phosphor/recipes-phosphor/inventory/phosphor-inventory-manager.inc b/meta-phosphor/recipes-phosphor/inventory/phosphor-inventory-manager.inc
new file mode 100644
index 000000000..b65d56863
--- /dev/null
+++ b/meta-phosphor/recipes-phosphor/inventory/phosphor-inventory-manager.inc
@@ -0,0 +1,5 @@
+HOMEPAGE = "http://github.com/openbmc/phosphor-inventory-manager"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=e3fc50a88d0a364313df4b21ef20c29e"
+SRC_URI = "git://github.com/openbmc/phosphor-inventory-manager"
+SRCREV = "d6819c9fcc44b3691eeb98ef3675d553bb28eeeb"
diff --git a/meta-phosphor/recipes-phosphor/inventory/phosphor-inventory-manager/xyz.openbmc_project.Inventory.Manager.service b/meta-phosphor/recipes-phosphor/inventory/phosphor-inventory-manager/xyz.openbmc_project.Inventory.Manager.service
new file mode 100644
index 000000000..c3ae5adcc
--- /dev/null
+++ b/meta-phosphor/recipes-phosphor/inventory/phosphor-inventory-manager/xyz.openbmc_project.Inventory.Manager.service
@@ -0,0 +1,13 @@
+[Unit]
+Description=Phosphor Inventory Manager
+Before=mapper-wait@-xyz-openbmc_project-inventory.service
+
+[Service]
+Restart=always
+Type=dbus
+ExecStart=/usr/bin/env phosphor-inventory
+SyslogIdentifier=phosphor-inventory
+BusName={BUSNAME}
+
+[Install]
+WantedBy={SYSTEMD_DEFAULT_TARGET}