phosphor-ipmi-host: Add channel config default
To provide a custom channel configuration, provide
a virtual phosphor-ipmi-channel-config.
Change-Id: I00d8e8aed11a18d193a9066a098611784600da56
Signed-off-by: Patrick Venture <venture@google.com>
diff --git a/common/recipes-phosphor/ipmi/phosphor-ipmi-channel-inventory-native.bb b/common/recipes-phosphor/ipmi/phosphor-ipmi-channel-inventory-native.bb
new file mode 100644
index 0000000..33c2aba
--- /dev/null
+++ b/common/recipes-phosphor/ipmi/phosphor-ipmi-channel-inventory-native.bb
@@ -0,0 +1,21 @@
+SUMMARY = "Sample channel configuration for phosphor-host-ipmid"
+PR = "r1"
+
+inherit native
+inherit phosphor-ipmi-host
+inherit obmc-phosphor-license
+
+PROVIDES += "virtual/phosphor-ipmi-channel-config"
+
+SRC_URI += "file://channel.yaml"
+
+S = "${WORKDIR}"
+
+do_install() {
+ # This recipe is supposed to create an output yaml file with
+ # a sample output file.
+
+ DEST=${D}${sensor_datadir}
+ install -d ${DEST}
+ install channel.yaml ${DEST}/channel.yaml
+}
diff --git a/common/recipes-phosphor/ipmi/phosphor-ipmi-channel-inventory/channel.yaml b/common/recipes-phosphor/ipmi/phosphor-ipmi-channel-inventory/channel.yaml
new file mode 100644
index 0000000..819f251
--- /dev/null
+++ b/common/recipes-phosphor/ipmi/phosphor-ipmi-channel-inventory/channel.yaml
@@ -0,0 +1,6 @@
+# Channel Number (must be unique) is the key
+1:
+ # ifName the ethernet device name (used in the dbus path)
+ ifName: eth0
+2:
+ ifName: eth1
diff --git a/common/recipes-phosphor/ipmi/phosphor-ipmi-host.bb b/common/recipes-phosphor/ipmi/phosphor-ipmi-host.bb
index eb3f902..8d82fef 100644
--- a/common/recipes-phosphor/ipmi/phosphor-ipmi-host.bb
+++ b/common/recipes-phosphor/ipmi/phosphor-ipmi-host.bb
@@ -24,6 +24,7 @@
DEPENDS += "virtual/phosphor-ipmi-inventory-sel"
DEPENDS += "virtual/phosphor-ipmi-fru-merge-config"
DEPENDS += "virtual/phosphor-ipmi-sensor-inventory"
+DEPENDS += "virtual/phosphor-ipmi-channel-config"
RDEPENDS_${PN}-dev += "phosphor-logging"
RDEPENDS_${PN}-dev += "phosphor-mapper-dev"
@@ -52,6 +53,7 @@
SENSOR_YAML_GEN=${STAGING_DIR_NATIVE}${sensor_datadir}/sensor.yaml \
INVSENSOR_YAML_GEN=${STAGING_DIR_NATIVE}${sensor_datadir}/invsensor.yaml \
FRU_YAML_GEN=${STAGING_DIR_NATIVE}${config_datadir}/fru_config.yaml \
+ CHANNEL_YAML_GEN=${STAGING_DIR_NATIVE}${sensor_datadir}/channel.yaml \
"
S = "${WORKDIR}/git"