Install GPIO definition JSON
The code in libopenbmc_intf.so looks for the GPIO definition file
/etc/default/obmc/gpio/gpios_defs.json. Install it from this
recipe.
The actual JSON files should go into the corresponding directories
in the machine layers along with a bbappend of this recipe to
set FILESEXTRAPATHS_prepend.
Change-Id: Ib7e2f24b8676e696f85fcfcaca8f6b3680e2ac77
Signed-off-by: Matt Spinler <spinler@us.ibm.com>
diff --git a/common/recipes-phosphor/skeleton/obmc-libobmc-intf.bb b/common/recipes-phosphor/skeleton/obmc-libobmc-intf.bb
index 09027dd..b02b832 100644
--- a/common/recipes-phosphor/skeleton/obmc-libobmc-intf.bb
+++ b/common/recipes-phosphor/skeleton/obmc-libobmc-intf.bb
@@ -7,9 +7,15 @@
inherit pkgconfig
DEPENDS += "glib-2.0"
+DEPENDS += "cjson"
SKELETON_DIR = "libopenbmc_intf"
+SRC_URI += "file://gpio_defs.json"
+
do_install() {
oe_runmake install DESTDIR=${D}
+
+ install -d ${D}${sysconfdir}/default/obmc/gpio/
+ install -m 0644 ${WORKDIR}/gpio_defs.json ${D}/${sysconfdir}/default/obmc/gpio/
}
diff --git a/common/recipes-phosphor/skeleton/obmc-libobmc-intf/gpio_defs.json b/common/recipes-phosphor/skeleton/obmc-libobmc-intf/gpio_defs.json
new file mode 100644
index 0000000..6e4ef9f
--- /dev/null
+++ b/common/recipes-phosphor/skeleton/obmc-libobmc-intf/gpio_defs.json
@@ -0,0 +1,3 @@
+{
+ "_comments": "This file should be overridden with one from the machine layer."
+}