diff options
3 files changed, 35 insertions, 1 deletions
diff --git a/meta-phosphor/common/recipes-phosphor/inventory/phosphor-inventory-manager-assettag-native.bb b/meta-phosphor/common/recipes-phosphor/inventory/phosphor-inventory-manager-assettag-native.bb new file mode 100644 index 000000000..f92f4c83f --- /dev/null +++ b/meta-phosphor/common/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 ${base_datadir}/events.d/ + install assettag.yaml ${base_datadir}/events.d/assettag.yaml +} diff --git a/meta-phosphor/common/recipes-phosphor/inventory/phosphor-inventory-manager-assettag/assettag.yaml b/meta-phosphor/common/recipes-phosphor/inventory/phosphor-inventory-manager-assettag/assettag.yaml new file mode 100644 index 000000000..d3a0104b9 --- /dev/null +++ b/meta-phosphor/common/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/common/recipes-phosphor/inventory/phosphor-inventory-manager-config-native.bb b/meta-phosphor/common/recipes-phosphor/inventory/phosphor-inventory-manager-config-native.bb index bc65eec18..d7dd57e04 100644 --- a/meta-phosphor/common/recipes-phosphor/inventory/phosphor-inventory-manager-config-native.bb +++ b/meta-phosphor/common/recipes-phosphor/inventory/phosphor-inventory-manager-config-native.bb @@ -7,7 +7,7 @@ PR = "r1" inherit obmc-phosphor-license inherit native -PHOSPHOR_INVENTORY_MANAGER_CONFIGS ??= "" +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. |