summaryrefslogtreecommitdiff
path: root/recipes-bsp/multitech
diff options
context:
space:
mode:
authorJesse Gilles <jgilles@multitech.com>2014-11-04 11:23:21 -0600
committerJesse Gilles <jgilles@multitech.com>2014-11-04 11:23:21 -0600
commit812befa503067ad2bae5de58962ff38321c369ca (patch)
treeb472b5118f62e97f760a5b23f3a72130e5ce235b /recipes-bsp/multitech
downloadmeta-multitech-812befa503067ad2bae5de58962ff38321c369ca.tar.gz
meta-multitech-812befa503067ad2bae5de58962ff38321c369ca.tar.bz2
meta-multitech-812befa503067ad2bae5de58962ff38321c369ca.zip
initial commit with MTCDT support
Diffstat (limited to 'recipes-bsp/multitech')
-rw-r--r--recipes-bsp/multitech/mts-id-eeprom.inc15
-rw-r--r--recipes-bsp/multitech/mts-id-eeprom_0.2.4.bb3
-rw-r--r--recipes-bsp/multitech/mts-io.inc76
-rwxr-xr-xrecipes-bsp/multitech/mts-io/led-a_heartbeat_trigger6
-rw-r--r--recipes-bsp/multitech/mts-io/mts-io.init20
-rw-r--r--recipes-bsp/multitech/mts-io_0.9.1.bb3
-rw-r--r--recipes-bsp/multitech/u-boot-linux-utils_0.0.1.bb19
7 files changed, 142 insertions, 0 deletions
diff --git a/recipes-bsp/multitech/mts-id-eeprom.inc b/recipes-bsp/multitech/mts-id-eeprom.inc
new file mode 100644
index 0000000..d0510b4
--- /dev/null
+++ b/recipes-bsp/multitech/mts-id-eeprom.inc
@@ -0,0 +1,15 @@
+DESCRIPTION = "ID EEPROM tool for MTCDP"
+HOMEPAGE = "http://www.multitech.net/"
+SECTION = "console/utils"
+PRIORITY = "optional"
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f"
+INC_PR = "r0"
+DEPENDS = "mts-io"
+
+SRC_URI = "git://git.multitech.net/mts-id-eeprom.git;protocol=git;tag=${PV}"
+S = "${WORKDIR}/git"
+
+inherit autotools
+
+PARALLEL_MAKE = ""
diff --git a/recipes-bsp/multitech/mts-id-eeprom_0.2.4.bb b/recipes-bsp/multitech/mts-id-eeprom_0.2.4.bb
new file mode 100644
index 0000000..ccf3521
--- /dev/null
+++ b/recipes-bsp/multitech/mts-id-eeprom_0.2.4.bb
@@ -0,0 +1,3 @@
+require mts-id-eeprom.inc
+
+PR = "${INC_PR}.0"
diff --git a/recipes-bsp/multitech/mts-io.inc b/recipes-bsp/multitech/mts-io.inc
new file mode 100644
index 0000000..484124e
--- /dev/null
+++ b/recipes-bsp/multitech/mts-io.inc
@@ -0,0 +1,76 @@
+DESCRIPTION = "mts-io controller and sysfs wrapper"
+HOMEPAGE = "http://www.multitech.net/"
+SECTION = "base"
+PRIORITY = "optional"
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://io-module/COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
+ file://io-tool/COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
+"
+DEPENDS = "virtual/kernel"
+INC_PR = "r5"
+
+SRCREV = "v${PV}"
+
+SRC_URI = " \
+ file://mts-io.init \
+ git://git.multitech.net/mts-io.git;protocol=git \
+ file://led-a_heartbeat_trigger \
+"
+S = "${WORKDIR}/git"
+
+inherit module-base
+inherit update-rc.d
+
+# add this since we aren't using module.bbclass
+addtask make_scripts after do_patch before do_compile
+do_make_scripts[lockfiles] = "${TMPDIR}/kernel-scripts.lock"
+do_make_scripts[deptask] = "do_populate_sysroot"
+
+EXTRA_OEMAKE = " -C ${STAGING_KERNEL_DIR} \
+ KBUILD_VERBOSE=1 \
+ M=${S}/io-module \
+ modules \
+ "
+
+do_compile () {
+ unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS
+ oe_runmake
+}
+
+PACKAGES = "${PN}"
+
+FILES_${PN} = "${base_libdir}/modules/${KERNEL_VERSION}/extra/mts_io.ko"
+FILES_${PN} += "${sysconfdir}/init.d/mts-io"
+FILES_${PN} += "${libdir}/mts-io-sysfs*"
+FILES_${PN} += "${sbindir}/mts-io-sysfs"
+FILES_${PN} += "${sysconfdir}/init.d/led-a_heartbeat_trigger"
+FILES_${PN} += "${sysconfdir}/rc5.d/S99led-a_heartbeat_trigger"
+
+INITSCRIPT_NAME = "mts-io"
+INITSCRIPT_PARAMS = "start 39 S ."
+
+PARALLEL_MAKE = ""
+
+fakeroot do_install () {
+ install -m 0755 -d ${D}${base_libdir}/modules/${KERNEL_VERSION}/extra
+ # use cp instead of install so the driver doesn't get stripped
+ cp io-module/mts_io.ko ${D}${base_libdir}/modules/${KERNEL_VERSION}/extra
+ cp io-module/mts_io.h ${STAGING_KERNEL_DIR}/include/linux/
+ cp io-module/mts_io.h ${STAGING_INCDIR}/linux/
+ if [ -f io-module/mts_eeprom.h ]; then
+ cp io-module/mts_eeprom.h ${STAGING_KERNEL_DIR}/include/linux/
+ cp io-module/mts_eeprom.h ${STAGING_INCDIR}/linux/
+ fi
+
+ install -d ${D}${sysconfdir}/init.d
+ install -m 0755 ${WORKDIR}/mts-io.init ${D}${sysconfdir}/init.d/mts-io
+
+ install -d ${D}/${sysconfdir}/rc5.d
+ install -m 0755 ${WORKDIR}/led-a_heartbeat_trigger ${D}/${sysconfdir}/init.d/
+ ln -sf ${sysconfdir}/init.d/led-a_heartbeat_trigger ${D}/${sysconfdir}/rc5.d/S99led-a_heartbeat_trigger
+
+ install -m 0755 -d ${D}${sbindir}
+ install -d ${D}${libdir}/mts-io-sysfs
+ install -m 0755 io-tool/mts-io-sysfs-inc.sh ${D}${libdir}/mts-io-sysfs
+ install -m 0755 io-tool/mts-io-sysfs ${D}${sbindir}/mts-io-sysfs
+}
diff --git a/recipes-bsp/multitech/mts-io/led-a_heartbeat_trigger b/recipes-bsp/multitech/mts-io/led-a_heartbeat_trigger
new file mode 100755
index 0000000..9633dcf
--- /dev/null
+++ b/recipes-bsp/multitech/mts-io/led-a_heartbeat_trigger
@@ -0,0 +1,6 @@
+#!/bin/bash
+
+TRIGGER="/sys/class/leds/led-a/trigger"
+
+echo "setting $TRIGGER to heartbeat"
+echo "heartbeat" > $TRIGGER
diff --git a/recipes-bsp/multitech/mts-io/mts-io.init b/recipes-bsp/multitech/mts-io/mts-io.init
new file mode 100644
index 0000000..77dd0e2
--- /dev/null
+++ b/recipes-bsp/multitech/mts-io/mts-io.init
@@ -0,0 +1,20 @@
+#!/bin/sh
+
+case $1 in
+ start)
+ echo "Loading mts-io module"
+ modprobe mts_io
+ ;;
+
+ stop)
+ echo "Unloading mts-io module"
+ modprobe -r mts_io
+ ;;
+
+ *)
+ echo "Usage: $0 {start|stop}"
+ exit 2
+ ;;
+esac
+
+
diff --git a/recipes-bsp/multitech/mts-io_0.9.1.bb b/recipes-bsp/multitech/mts-io_0.9.1.bb
new file mode 100644
index 0000000..6d60671
--- /dev/null
+++ b/recipes-bsp/multitech/mts-io_0.9.1.bb
@@ -0,0 +1,3 @@
+require mts-io.inc
+
+SRCREV_mtcdt = "cdf9e59ab6a793bb158c91c91aa0312a72211ad0"
diff --git a/recipes-bsp/multitech/u-boot-linux-utils_0.0.1.bb b/recipes-bsp/multitech/u-boot-linux-utils_0.0.1.bb
new file mode 100644
index 0000000..36510f8
--- /dev/null
+++ b/recipes-bsp/multitech/u-boot-linux-utils_0.0.1.bb
@@ -0,0 +1,19 @@
+DESCRIPTION = "U-Boot Linux Utilities"
+HOMEPAGE = "http://www.multitech.net/"
+SECTION = "console/utils"
+PRIORITY = "optional"
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f"
+PR = "r0"
+
+DEPENDS = "mtd-utils"
+
+# tag 0.0.1
+SRCREV = "9c154405c2d01648f41c6a72bcc96f9865c4f07c"
+
+SRC_URI = "git://git.multitech.net/u-boot-linux-utils.git;protocol=git"
+S = "${WORKDIR}/git"
+
+inherit autotools
+
+PARALLEL_MAKE = ""