diff options
author | Brad Bishop <bradleyb@fuzziesquirrel.com> | 2019-06-09 22:49:54 +0300 |
---|---|---|
committer | Brad Bishop <bradleyb@fuzziesquirrel.com> | 2019-06-13 17:39:01 +0300 |
commit | 38384acde147c69982cfbf11550b17d0decb7150 (patch) | |
tree | 09ac3ba7d78905c3c63489ec44fd1ba424276e94 /meta-openpower/recipes-phosphor | |
parent | 6e56e3bd2a4acc56eb79a4276e5b637f247d91fb (diff) | |
download | openbmc-38384acde147c69982cfbf11550b17d0decb7150.tar.xz |
meta-openpower: new YAML configuration recipe
YAML configuration files exist scattered throughout the OpenBMC tree and
how they are used is controlled with layers dependencies of virtuals and
preferred providers.
Most of the time the above scheme is very difficult to comprehend. This
patch begins a re-thinking of that approach towards a more centralized
scheme.
Specifically, a number of YAML files that can be shared across OpenPOWER
systems (in theory...in practice they are only used in the
ACx22/Witherspoon layer) are copied (and run through pyyaml
yaml.dump(yaml.load(fd)) for style purposes) to a single recipe:
hostboot-inventory-config-native:config.yaml ->
openpower-yaml-config:ipmi-hostboot-fru-mrw.yaml
openpower-ipmi-oem-sensor-inventory-mrw:openpower-config.yaml ->
openpower-yaml-config:ipmi-occ-active-sensor-mrw.yaml
openpower-yaml-config:ipmi-hostboot-volatile-sensor-mrw.yaml
phosphor-ipmi-fru-properties-mrw-native:config.yaml ->
openpower-yaml-config:ipmi-fru-properties-mrw.yaml
Notably these YAML files are installed to the target sysroot rather than
the native sysroot, which enables MACHINE derived overrides.
This new recipe enables the deprecation of:
hostboot-inventory-config-native
openpower-ipmi-oem-sensor-inventory-mrw-native
phosphor-ipmi-fru-properties-mrw-native
and all the virtuals and PREFERRED_PROVIDERS associated with those
recipes, once any layers using these YAML configuration files are
updated to obtain them via openpower-yaml-config. That will greatly
reduce comprehensional complexity.
(From meta-openpower rev: 31f20185c231ccab0d9faaa80b2281195066b1e5)
Change-Id: I1fd0c64c03c77006a7858a4ed773b84e6b34c312
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
Diffstat (limited to 'meta-openpower/recipes-phosphor')
5 files changed, 235 insertions, 0 deletions
diff --git a/meta-openpower/recipes-phosphor/configuration/openpower-yaml-config.bb b/meta-openpower/recipes-phosphor/configuration/openpower-yaml-config.bb new file mode 100644 index 0000000000..52ac769ab8 --- /dev/null +++ b/meta-openpower/recipes-phosphor/configuration/openpower-yaml-config.bb @@ -0,0 +1,35 @@ +SUMMARY = "Shared OpenPOWER configuration" +PR = "r1" +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://${OPENPOWERBASE}/COPYING.apache-2.0;md5=34400b68072d710fecd0a2940a0d1658" + +inherit allarch + +SRC_URI = " \ + file://ipmi-fru-properties-mrw.yaml \ + file://ipmi-hostboot-fru-mrw.yaml \ + file://ipmi-hostboot-volatile-sensor-mrw.yaml \ + file://ipmi-occ-active-sensor-mrw.yaml \ + " + +S = "${WORKDIR}" + +do_install() { + install -m 0644 -D ipmi-fru-properties-mrw.yaml \ + ${D}${datadir}/${BPN}/ipmi-fru-properties-mrw.yaml + install -m 0644 -D ipmi-hostboot-fru-mrw.yaml \ + ${D}${datadir}/${BPN}/ipmi-hostboot-fru-mrw.yaml + install -m 0644 -D ipmi-hostboot-volatile-sensor-mrw.yaml \ + ${D}${datadir}/${BPN}/ipmi-hostboot-volatile-sensor-mrw.yaml + install -m 0644 -D ipmi-occ-active-sensor-mrw.yaml \ + ${D}${datadir}/${BPN}/ipmi-occ-active-sensor-mrw.yaml +} + +FILES_${PN}-dev = " \ + ${datadir}/${BPN}/ipmi-fru-properties-mrw.yaml \ + ${datadir}/${BPN}/ipmi-hostboot-fru-mrw.yaml \ + ${datadir}/${BPN}/ipmi-hostboot-volatile-sensor-mrw.yaml \ + ${datadir}/${BPN}/ipmi-occ-active-sensor-mrw.yaml \ + " + +ALLOW_EMPTY_${PN} = "1" diff --git a/meta-openpower/recipes-phosphor/configuration/openpower-yaml-config/ipmi-fru-properties-mrw.yaml b/meta-openpower/recipes-phosphor/configuration/openpower-yaml-config/ipmi-fru-properties-mrw.yaml new file mode 100644 index 0000000000..6e80a99424 --- /dev/null +++ b/meta-openpower/recipes-phosphor/configuration/openpower-yaml-config/ipmi-fru-properties-mrw.yaml @@ -0,0 +1,37 @@ +# A template for generating extra-properties.yaml for ipmi-fru-parser, from the +# MRW with gen_fru_properties.pl +DIMM: + xyz.openbmc_project.Inventory.Decorator.Cacheable: + Cached: 'false' + xyz.openbmc_project.Inventory.Decorator.Replaceable: + FieldReplaceable: 'false' + xyz.openbmc_project.Inventory.Item: + Present: 'true' +NODE: + xyz.openbmc_project.Inventory.Decorator.Cacheable: + Cached: 'false' + xyz.openbmc_project.Inventory.Decorator.Replaceable: + FieldReplaceable: 'false' + xyz.openbmc_project.Inventory.Item: + Present: 'true' +PROC: + xyz.openbmc_project.Inventory.Decorator.Cacheable: + Cached: 'false' + xyz.openbmc_project.Inventory.Decorator.Replaceable: + FieldReplaceable: 'false' + xyz.openbmc_project.Inventory.Item: + Present: 'true' +SYS: + xyz.openbmc_project.Inventory.Decorator.Cacheable: + Cached: 'false' + xyz.openbmc_project.Inventory.Decorator.Replaceable: + FieldReplaceable: 'false' + xyz.openbmc_project.Inventory.Item: + Present: 'true' +TPM: + xyz.openbmc_project.Inventory.Decorator.Cacheable: + Cached: 'false' + xyz.openbmc_project.Inventory.Decorator.Replaceable: + FieldReplaceable: 'true' + xyz.openbmc_project.Inventory.Item: + Present: 'true' diff --git a/meta-openpower/recipes-phosphor/configuration/openpower-yaml-config/ipmi-hostboot-fru-mrw.yaml b/meta-openpower/recipes-phosphor/configuration/openpower-yaml-config/ipmi-hostboot-fru-mrw.yaml new file mode 100644 index 0000000000..3f6a73989e --- /dev/null +++ b/meta-openpower/recipes-phosphor/configuration/openpower-yaml-config/ipmi-hostboot-fru-mrw.yaml @@ -0,0 +1,130 @@ +DIMM: + EntityID: 32 + Interfaces: + xyz.openbmc_project.Inventory.Decorator.Asset: + BuildDate: + IPMIFruProperty: Mfg Date + IPMIFruSection: Product + Manufacturer: + IPMIFruProperty: Manufacturer + IPMIFruSection: Product + Model: + IPMIFruProperty: Model Number + IPMIFruSection: Product + PartNumber: + IPMIFruProperty: Part Number + IPMIFruSection: Product + SerialNumber: + IPMIFruProperty: Serial Number + IPMIFruSection: Product + xyz.openbmc_project.Inventory.Decorator.Revision: + Version: + IPMIFruProperty: Version + IPMIFruSection: Product + xyz.openbmc_project.Inventory.Item: + PrettyName: + IPMIFruProperty: Name + IPMIFruSection: Product + xyz.openbmc_project.Inventory.Item.Dimm: +MEMBUFF: + EntityID: 8 + Interfaces: + xyz.openbmc_project.Inventory.Decorator.Asset: + BuildDate: + IPMIFruProperty: Mfg Date + IPMIFruSection: Board + Manufacturer: + IPMIFruProperty: Manufacturer + IPMIFruSection: Board + PartNumber: + IPMIFruProperty: Part Number + IPMIFruSection: Board + SerialNumber: + IPMIFruProperty: Serial Number + IPMIFruSection: Board + xyz.openbmc_project.Inventory.Item: + PrettyName: + IPMIFruProperty: Name + IPMIFruSection: Board + xyz.openbmc_project.Inventory.Item.MemoryBuffer: +NODE: + AssociatedTypes: + - SYS + EntityID: 7 + Interfaces: + xyz.openbmc_project.Inventory.Decorator.Asset: + BuildDate: + IPMIFruProperty: Mfg Date + IPMIFruSection: Board + Manufacturer: + IPMIFruProperty: Manufacturer + IPMIFruSection: Board + PartNumber: + IPMIFruProperty: Part Number + IPMIFruSection: Board + SerialNumber: + IPMIFruProperty: Serial Number + IPMIFruSection: Board + xyz.openbmc_project.Inventory.Item: + PrettyName: + IPMIFruProperty: Name + IPMIFruSection: Board + xyz.openbmc_project.Inventory.Item.Board: +PROC: + EntityID: 3 + Interfaces: + xyz.openbmc_project.Inventory.Decorator.Asset: + BuildDate: + IPMIFruProperty: Mfg Date + IPMIFruSection: Board + Manufacturer: + IPMIFruProperty: Manufacturer + IPMIFruSection: Board + PartNumber: + IPMIFruProperty: Part Number + IPMIFruSection: Board + SerialNumber: + IPMIFruProperty: Serial Number + IPMIFruSection: Board + xyz.openbmc_project.Inventory.Decorator.Revision: + Version: + IPMIFruProperty: Custom Field 2 + IPMIFruSection: Board + IPMIFruValueDelimiter: '58' + xyz.openbmc_project.Inventory.Item: + PrettyName: + IPMIFruProperty: Name + IPMIFruSection: Board + xyz.openbmc_project.Inventory.Item.Cpu: +SYS: + EntityID: 7 + Interfaces: + xyz.openbmc_project.Inventory.Decorator.Asset: + Model: + IPMIFruProperty: Part Number + IPMIFruSection: Chassis + SerialNumber: + IPMIFruProperty: Serial Number + IPMIFruSection: Chassis + xyz.openbmc_project.Inventory.Item.System: +TPM: + EntityID: 176 + Interfaces: + xyz.openbmc_project.Inventory.Decorator.Asset: + BuildDate: + IPMIFruProperty: Mfg Date + IPMIFruSection: Board + Manufacturer: + IPMIFruProperty: Manufacturer + IPMIFruSection: Board + PartNumber: + IPMIFruProperty: Part Number + IPMIFruSection: Board + SerialNumber: + IPMIFruProperty: Serial Number + IPMIFruSection: Board + xyz.openbmc_project.Inventory.Item: + PrettyName: + IPMIFruProperty: Name + IPMIFruSection: Board + xyz.openbmc_project.Inventory.Item.Tpm: diff --git a/meta-openpower/recipes-phosphor/configuration/openpower-yaml-config/ipmi-hostboot-volatile-sensor-mrw.yaml b/meta-openpower/recipes-phosphor/configuration/openpower-yaml-config/ipmi-hostboot-volatile-sensor-mrw.yaml new file mode 100644 index 0000000000..1fcf935f9b --- /dev/null +++ b/meta-openpower/recipes-phosphor/configuration/openpower-yaml-config/ipmi-hostboot-volatile-sensor-mrw.yaml @@ -0,0 +1,16 @@ +hb_volatile_sensor: + interfaces: + xyz.openbmc_project.Object.Enable: + Enabled: + Offsets: + 0: + assert: false + type: bool + 1: + assert: true + type: bool + mutability: Mutability::Write|Mutability::Read + path: /org/open_power/control/volatile + readingType: assertion + sensorNamePattern: nameLeaf + serviceInterface: org.freedesktop.DBus.Properties diff --git a/meta-openpower/recipes-phosphor/configuration/openpower-yaml-config/ipmi-occ-active-sensor-mrw.yaml b/meta-openpower/recipes-phosphor/configuration/openpower-yaml-config/ipmi-occ-active-sensor-mrw.yaml new file mode 100644 index 0000000000..5470c42da8 --- /dev/null +++ b/meta-openpower/recipes-phosphor/configuration/openpower-yaml-config/ipmi-occ-active-sensor-mrw.yaml @@ -0,0 +1,17 @@ +occ_active_sensor: + interfaces: + org.open_power.OCC.Status: + OccActive: + Offsets: + 0: + assert: 'false' + deassert: 'true' + type: bool + 1: + assert: 'true' + deassert: 'false' + type: bool + mutability: Mutability::Write|Mutability::Read + readingType: assertion + sensorNamePattern: nameLeaf + serviceInterface: org.freedesktop.DBus.Properties |