meta-quanta: gbs: check CPLD version
Read CPLD version by i2c bus and dump to file
Tested:
Check /run/cpld0.version file
Signed-off-by: George Hung <george.hung@quantatw.com>
Change-Id: I4b72d35dad7233dd08105fbfc6edfa04034720d2
diff --git a/meta-gbs/recipes-gbs/cpld-ver-check/gbs-cpld-ver-check.bb b/meta-gbs/recipes-gbs/cpld-ver-check/gbs-cpld-ver-check.bb
new file mode 100644
index 0000000..afe91fc
--- /dev/null
+++ b/meta-gbs/recipes-gbs/cpld-ver-check/gbs-cpld-ver-check.bb
@@ -0,0 +1,25 @@
+DESCRIPTION = "Report CPLD Version"
+PR = "r1"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10"
+
+inherit systemd
+
+SRC_URI = " file://cpld_version.sh \
+ file://cpld-version.service \
+ "
+
+S = "${WORKDIR}"
+
+DEPENDS = "systemd"
+RDEPENDS_${PN} = "bash"
+
+SYSTEMD_SERVICE_${PN} = "cpld-version.service"
+
+do_install() {
+ install -d ${D}${bindir}
+ install -m 0755 ${S}/cpld_version.sh ${D}${bindir}/
+
+ install -d ${D}${systemd_system_unitdir}
+ install -m 0644 ${S}/cpld-version.service ${D}${systemd_system_unitdir}
+}