meta-ibm: romulus: new YAML config 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 continues a re-thinking of that approach towards a more
centralized scheme.
Specifically this patch implements a single YAML config recipe for the
Romulus systems. The logic contained in the recipe was pulled from all
over the OpenBMC tree - the ability to comprehend how the different YAML
files are generated and consumed should be greatly eased.
One notable detail - unlike the upstream recipes, romulus-yaml-config
is a target recipe and as such enables MACHINE based overrides.
YAML files were copied from different locations in the tree, and run
through a styling application (pyyaml dump(load(yaml))):
romulus-ipmi-fru-properties-native:extra-properties.yaml ->
romulus-yaml-config:romulus-ipmi-fru-properties.yaml
romulus-ipmi-fru-read-inventory-native:config.yaml ->
romulus-yaml-config:romulus-ipmi-fru.yaml
romulus-ipmi-fru-read-bmc-inventory-native:bmc-fru-config.yaml ->
romulus-yaml-config:romulus-ipmi-fru-properties.yaml
romulus-ipmi-inventory-sel-native:sel-config.yaml ->
romulus-yaml-config:romulus-ipmi-inventory-sensors.yaml
romulus-ipmi-sensor-inventory-native:config.yaml ->
romulus-yaml-config:romulus-ipmi-sensors.yaml
(From meta-ibm rev: 67b17f7aa658b71908de47aa0b0814530da36259)
Change-Id: I3953274db23f9ccf8cb74d3962e797bf935d61a8
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
diff --git a/meta-ibm/meta-romulus/recipes-phosphor/configuration/romulus-yaml-config.bb b/meta-ibm/meta-romulus/recipes-phosphor/configuration/romulus-yaml-config.bb
new file mode 100644
index 0000000..a2f609e
--- /dev/null
+++ b/meta-ibm/meta-romulus/recipes-phosphor/configuration/romulus-yaml-config.bb
@@ -0,0 +1,38 @@
+SUMMARY = "YAML configuration for Romulus"
+PR = "r1"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://${IBMBASE}/COPYING.apache-2.0;md5=34400b68072d710fecd0a2940a0d1658"
+
+inherit allarch
+
+SRC_URI = " \
+ file://romulus-ipmi-fru.yaml \
+ file://romulus-ipmi-fru-bmc.yaml \
+ file://romulus-ipmi-fru-properties.yaml \
+ file://romulus-ipmi-inventory-sensors.yaml \
+ file://romulus-ipmi-sensors.yaml \
+ "
+
+S = "${WORKDIR}"
+
+do_install() {
+ cat romulus-ipmi-fru.yaml romulus-ipmi-fru-bmc.yaml > fru-read.yaml
+
+ install -m 0644 -D romulus-ipmi-fru-properties.yaml \
+ ${D}${datadir}/${BPN}/ipmi-extra-properties.yaml
+ install -m 0644 -D fru-read.yaml \
+ ${D}${datadir}/${BPN}/ipmi-fru-read.yaml
+ install -m 0644 -D romulus-ipmi-inventory-sensors.yaml \
+ ${D}${datadir}/${BPN}/ipmi-inventory-sensors.yaml
+ install -m 0644 -D romulus-ipmi-sensors.yaml \
+ ${D}${datadir}/${BPN}/ipmi-sensors.yaml
+}
+
+FILES_${PN}-dev = " \
+ ${datadir}/${BPN}/ipmi-extra-properties.yaml \
+ ${datadir}/${BPN}/ipmi-fru-read.yaml \
+ ${datadir}/${BPN}/ipmi-inventory-sensors.yaml \
+ ${datadir}/${BPN}/ipmi-sensors.yaml \
+ "
+
+ALLOW_EMPTY_${PN} = "1"