summaryrefslogtreecommitdiffstats
path: root/recipes-ti/beagleboard
diff options
context:
space:
mode:
authorKoen Kooi <koen@dominion.thruhere.net>2012-04-17 14:47:42 +0200
committerDenys Dmytriyenko <denys@ti.com>2012-04-18 12:19:55 -0400
commitf026aa7bd09a75034b28a0aa7e750059fd2c2813 (patch)
tree9a12a1b42249fba2368f19ad298a829bd7b8b6b3 /recipes-ti/beagleboard
parent41053c22a786de9026b85b125554eea55d381a39 (diff)
downloadmeta-ti-f026aa7bd09a75034b28a0aa7e750059fd2c2813.tar.gz
beaglebone-capes: userspace support for capes
Not everything can be done inside the kernel yet, so have a script that does the userspace portion. Only the LCD3 cape is supported currently, more will follow later. Signed-off-by: Koen Kooi <koen@dominion.thruhere.net> Signed-off-by: Denys Dmytriyenko <denys@ti.com>
Diffstat (limited to 'recipes-ti/beagleboard')
-rw-r--r--recipes-ti/beagleboard/beaglebone-capes.bb23
-rw-r--r--recipes-ti/beagleboard/beaglebone-capes/cape.service8
-rwxr-xr-xrecipes-ti/beagleboard/beaglebone-capes/cape.sh12
3 files changed, 43 insertions, 0 deletions
diff --git a/recipes-ti/beagleboard/beaglebone-capes.bb b/recipes-ti/beagleboard/beaglebone-capes.bb
new file mode 100644
index 00000000..88d4a173
--- /dev/null
+++ b/recipes-ti/beagleboard/beaglebone-capes.bb
@@ -0,0 +1,23 @@
1DESCRIPTION = "Userspace setup for beaglebone capes"
2
3LICENSE = "MIT"
4LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=3f40d7994397109285ec7b81fdeb3b58"
5
6inherit allarch
7
8SRC_URI = "file://cape.service \
9 file://cape.sh \
10 "
11
12do_install() {
13 install -d ${D}${base_libdir}/systemd/system/
14 install -m 0644 ${WORKDIR}/cape.service ${D}${base_libdir}/systemd/system
15
16 install -d ${D}${base_libdir}/systemd/system/basic.target.wants
17 ln -sf ../cape.service ${D}${base_libdir}/systemd/system/basic.target.wants/
18
19 install -d ${D}${bindir}
20 install -m 0755 ${WORKDIR}/cape.sh ${D}${bindir}
21}
22
23FILES_${PN} += "${base_libdir}/systemd/system"
diff --git a/recipes-ti/beagleboard/beaglebone-capes/cape.service b/recipes-ti/beagleboard/beaglebone-capes/cape.service
new file mode 100644
index 00000000..44a2a38b
--- /dev/null
+++ b/recipes-ti/beagleboard/beaglebone-capes/cape.service
@@ -0,0 +1,8 @@
1[Unit]
2Description=Beaglebone cape support
3
4[Service]
5ExecStart=/usr/bin/cape.sh
6
7[Install]
8WantedBy=basic.target
diff --git a/recipes-ti/beagleboard/beaglebone-capes/cape.sh b/recipes-ti/beagleboard/beaglebone-capes/cape.sh
new file mode 100755
index 00000000..69accfff
--- /dev/null
+++ b/recipes-ti/beagleboard/beaglebone-capes/cape.sh
@@ -0,0 +1,12 @@
1#!/bin/sh
2for eeprom in /sys/bus/i2c/devices/3-005*/eeprom ; do
3 PARTNUMBER=$(hexdump -e '8/1 "%c"' $eeprom -s 58 -n16)
4 case $PARTNUMBER in
5 "BB-BONE-LCD3-01.")
6 echo "Turning on backlight for LCD3 cape"
7 i2cset -f -y 1 0x24 0x07 0x09
8 i2cset -f -y 1 0x24 0x08 0x60;;
9 *)
10 echo "unknown cape: $PARTNUMBER";;
11 esac
12done