Get Device ID - JSON
This commit adds the required json file to use get device ID with a JSON
file in the rootfs instead of a yaml file.
Change-Id: Iff7b5caa432e2e8cac169000940e386e83ad9417
Signed-off-by: David Cobbley <david.j.cobbley@linux.intel.com>
diff --git a/common/recipes-phosphor/ipmi/phosphor-ipmi-host.bb b/common/recipes-phosphor/ipmi/phosphor-ipmi-host.bb
index bd9cdd2..583c0b1 100644
--- a/common/recipes-phosphor/ipmi/phosphor-ipmi-host.bb
+++ b/common/recipes-phosphor/ipmi/phosphor-ipmi-host.bb
@@ -13,6 +13,7 @@
inherit pythonnative
DEPENDS += "autoconf-archive-native"
+DEPENDS += "nlohmann-json"
DEPENDS += "obmc-targets"
DEPENDS += "packagegroup-obmc-ipmid-providers"
DEPENDS += "phosphor-dbus-interfaces"
@@ -55,7 +56,9 @@
S = "${WORKDIR}/git"
-SRC_URI += "file://merge_yamls.py"
+SRC_URI += "file://merge_yamls.py \
+ file://dev_id.json \
+ "
HOSTIPMI_PROVIDER_LIBRARY += "libapphandler.so"
HOSTIPMI_PROVIDER_LIBRARY += "libsysintfcmds.so"
@@ -65,6 +68,7 @@
FILES_${PN}_append = " ${libdir}/host-ipmid/lib*${SOLIBS}"
FILES_${PN}_append = " ${libdir}/ipmid-providers/lib*${SOLIBS}"
FILES_${PN}_append = " ${libdir}/net-ipmid/lib*${SOLIBS}"
+FILES_${PN}_append = " ${datadir}/ipmi-providers/dev_id.json"
FILES_${PN}-dev_append = " ${libdir}/ipmid-providers/lib*${SOLIBSDEV} ${libdir}/ipmid-providers/*.la"
# Soft Power Off
@@ -102,5 +106,10 @@
# Invoke the script and don't catch any resulting exception.
subprocess.check_call(cmd)
}
+do_install_append(){
+ install -d ${D}${datadir}/ipmi-providers
+ install -m 0644 -D ${WORKDIR}/dev_id.json \
+ ${D}${datadir}/ipmi-providers/dev_id.json
+}
# python-pyyaml-native is installed by do_configure, so put this task after
addtask merge_sensors after do_configure before do_compile
diff --git a/common/recipes-phosphor/ipmi/phosphor-ipmi-host/dev_id.json b/common/recipes-phosphor/ipmi/phosphor-ipmi-host/dev_id.json
new file mode 100644
index 0000000..3440e0b
--- /dev/null
+++ b/common/recipes-phosphor/ipmi/phosphor-ipmi-host/dev_id.json
@@ -0,0 +1,2 @@
+{"id": 0, "revision": 0, "addn_dev_support": 0,
+ "manuf_id": 0, "prod_id": 0, "aux": 0}