meta-quanta: olympus-nuvoton: inventory: add inventory-cleanup yaml
create /system/chassis on startup
Signed-off-by: Stanley Chu <yschu@nuvoton.com>
Change-Id: I186902bb5d212cbeb56b1018be10ce00b084cd9f
diff --git a/meta-olympus-nuvoton/recipes-phosphor/inventory/olympus-nuvoton-inventory-cleanup.bb b/meta-olympus-nuvoton/recipes-phosphor/inventory/olympus-nuvoton-inventory-cleanup.bb
new file mode 100644
index 0000000..5d52b98
--- /dev/null
+++ b/meta-olympus-nuvoton/recipes-phosphor/inventory/olympus-nuvoton-inventory-cleanup.bb
@@ -0,0 +1,17 @@
+SUMMARY = "Copy the inventory cleanup yaml for inventory manager"
+PR = "r1"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10"
+
+inherit allarch
+inherit phosphor-inventory-manager
+
+S = "${WORKDIR}"
+
+SRC_URI_olympus-nuvoton = "file://inventory-cleanup.yaml"
+
+do_install_olympus-nuvoton() {
+ install -D inventory-cleanup.yaml ${D}${base_datadir}/events.d/inventory-cleanup.yaml
+}
+
+FILES_${PN}_olympus-nuvoton += "${base_datadir}/events.d/inventory-cleanup.yaml"
diff --git a/meta-olympus-nuvoton/recipes-phosphor/inventory/olympus-nuvoton-inventory-cleanup/inventory-cleanup.yaml b/meta-olympus-nuvoton/recipes-phosphor/inventory/olympus-nuvoton-inventory-cleanup/inventory-cleanup.yaml
new file mode 100644
index 0000000..34d8e79
--- /dev/null
+++ b/meta-olympus-nuvoton/recipes-phosphor/inventory/olympus-nuvoton-inventory-cleanup/inventory-cleanup.yaml
@@ -0,0 +1,16 @@
+description: >
+ RunBMC inventory fixups
+
+events:
+ - name: Add Chassis interface
+ description: >
+ Add the chassis interface on the chassis inventory path
+ type: startup
+ actions:
+ - name: createObjects
+ objs:
+ /system/chassis:
+ xyz.openbmc_project.Inventory.Item.Chassis:
+ Type:
+ value: "RackMount"
+ type: string