From f923652615aacb0ae818851f374233aa50ea423d Mon Sep 17 00:00:00 2001 From: David Cobbley Date: Tue, 21 Nov 2017 16:17:40 -0800 Subject: 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 --- .../common/recipes-phosphor/ipmi/phosphor-ipmi-host.bb | 11 ++++++++++- .../recipes-phosphor/ipmi/phosphor-ipmi-host/dev_id.json | 2 ++ 2 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 meta-phosphor/common/recipes-phosphor/ipmi/phosphor-ipmi-host/dev_id.json (limited to 'meta-phosphor/common/recipes-phosphor') diff --git a/meta-phosphor/common/recipes-phosphor/ipmi/phosphor-ipmi-host.bb b/meta-phosphor/common/recipes-phosphor/ipmi/phosphor-ipmi-host.bb index bd9cdd25b..583c0b12c 100644 --- a/meta-phosphor/common/recipes-phosphor/ipmi/phosphor-ipmi-host.bb +++ b/meta-phosphor/common/recipes-phosphor/ipmi/phosphor-ipmi-host.bb @@ -13,6 +13,7 @@ inherit phosphor-ipmi-host 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 @@ EXTRA_OECONF = " \ 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 @@ NETIPMI_PROVIDER_LIBRARY += "libapphandler.so" 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 @@ python do_merge_sensors () { # 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/meta-phosphor/common/recipes-phosphor/ipmi/phosphor-ipmi-host/dev_id.json b/meta-phosphor/common/recipes-phosphor/ipmi/phosphor-ipmi-host/dev_id.json new file mode 100644 index 000000000..3440e0b2f --- /dev/null +++ b/meta-phosphor/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} -- cgit v1.2.1