diff options
Diffstat (limited to 'meta-edison-arduino')
5 files changed, 86 insertions, 0 deletions
diff --git a/meta-edison-arduino/conf/layer.conf b/meta-edison-arduino/conf/layer.conf new file mode 100644 index 0000000..77ff005 --- /dev/null +++ b/meta-edison-arduino/conf/layer.conf @@ -0,0 +1,10 @@ +# We have a conf and classes directory, add to BBPATH +BBPATH := "${BBPATH}:${LAYERDIR}" + +# We have a recipes-* directories, add to BBFILES +BBFILES := "${BBFILES} ${LAYERDIR}/recipes-*/*/*.bb \ + ${LAYERDIR}/recipes-*/*/*.bbappend" + +BBFILE_COLLECTIONS += "edison-arduino" +BBFILE_PATTERN_edison-arduino = "^${LAYERDIR}/" +BBFILE_PRIORITY_edison-arduino = "6" diff --git a/meta-edison-arduino/recipes-core/images/edison-image.bbappend b/meta-edison-arduino/recipes-core/images/edison-image.bbappend new file mode 100644 index 0000000..5a93c35 --- /dev/null +++ b/meta-edison-arduino/recipes-core/images/edison-image.bbappend @@ -0,0 +1,2 @@ +IMAGE_INSTALL += "clloader" + diff --git a/meta-edison-arduino/recipes-devtools/clloader/clloader.bb b/meta-edison-arduino/recipes-devtools/clloader/clloader.bb new file mode 100644 index 0000000..5248900 --- /dev/null +++ b/meta-edison-arduino/recipes-devtools/clloader/clloader.bb @@ -0,0 +1,53 @@ +DESCRIPTION = "This is the edison arduino sketch download daemon." +HOMEPAGE = "http://www.intel.com" +LICENSE = "LGPLv2.1" + +S = "${EDISONREPO_TOP_DIR}/arduino/clloader" + +SRC_URI += "file://clloader.service \ + file://sketch_reset.service" + +LIC_FILES_CHKSUM = " \ + file://clloader.c;endline=29;md5=4b30a8a8eefba8a23997c11e77c6fd24 \ +" + +do_clean() { + make clean +} + +do_compile() { + make +} + +do_install () { + install -d ${D}/sketch + install -d ${D}/opt/edison + install -m 0755 ${B}/clloader ${D}/opt/edison + install -m 0755 ${B}/sketch_reset ${D}/opt/edison/ + install -m 0755 ${B}/scripts/launcher.sh ${D}/opt/edison/ + install -m 0755 ${B}/scripts/sketch_reset.sh ${D}/opt/edison/ + + install -d ${D}${systemd_unitdir}/system/ + install -m 0644 ${WORKDIR}/clloader.service ${D}${systemd_unitdir}/system/ + install -m 0644 ${WORKDIR}/sketch_reset.service ${D}${systemd_unitdir}/system/ +} + +pkg_postinst_${PN} () { + +} + +pkg_prerm_${PN} () { + +} + +inherit systemd + +SYSTEMD_SERVICE_${PN} = "clloader.service sketch_reset.service" + +FILES_${PN} += "${systemd_unitdir}/system/clloader.service \ + ${systemd_unitdir}/system/sketch_reset.service \ + opt/edison \ + sketch \ + " + +FILES_${PN}-dbg += "opt/edison/.debug sketch/.debug" diff --git a/meta-edison-arduino/recipes-devtools/clloader/files/clloader.service b/meta-edison-arduino/recipes-devtools/clloader/files/clloader.service new file mode 100644 index 0000000..802be94 --- /dev/null +++ b/meta-edison-arduino/recipes-devtools/clloader/files/clloader.service @@ -0,0 +1,10 @@ +[Unit] +Description=Daemon to handle arduino sketches +After=syslog.target + +[Service] +ExecStart=/opt/edison/launcher.sh + +[Install] +WantedBy=multi-user.target + diff --git a/meta-edison-arduino/recipes-devtools/clloader/files/sketch_reset.service b/meta-edison-arduino/recipes-devtools/clloader/files/sketch_reset.service new file mode 100644 index 0000000..ba7e971 --- /dev/null +++ b/meta-edison-arduino/recipes-devtools/clloader/files/sketch_reset.service @@ -0,0 +1,11 @@ +[Unit] +Description=Daemon to reset sketches +After=clloader.service +Requires=clloader.service + +[Service] +ExecStart=/opt/edison/sketch_reset -i 207 -o 215 -s /opt/edison/sketch_reset.sh + +[Install] +WantedBy=multi-user.target + |