From 61ed96a71351ae7621fd1bd3a47096fa37173dff Mon Sep 17 00:00:00 2001 From: Dominik Heidler Date: Sun, 19 Jan 2014 18:38:37 +0100 Subject: [PATCH] add pkg ti-uim to enable bluetooth on pandaboard --- alarm/ti-uim/PKGBUILD | 32 ++++++++++++++++++++++++++++++++ alarm/ti-uim/ti-bluetooth-uim | 8 ++++++++ alarm/ti-uim/ti-uim.install | 8 ++++++++ alarm/ti-uim/ti-uim.service | 10 ++++++++++ 4 files changed, 58 insertions(+) create mode 100644 alarm/ti-uim/PKGBUILD create mode 100755 alarm/ti-uim/ti-bluetooth-uim create mode 100644 alarm/ti-uim/ti-uim.install create mode 100644 alarm/ti-uim/ti-uim.service diff --git a/alarm/ti-uim/PKGBUILD b/alarm/ti-uim/PKGBUILD new file mode 100644 index 000000000..0e82432f4 --- /dev/null +++ b/alarm/ti-uim/PKGBUILD @@ -0,0 +1,32 @@ +# Maintainer: Dominik Heidler + +pkgname=ti-uim +pkgver=0.0.1 +pkgrel=1 +pkgdesc="UIM daemon to enable bluetooth on the pandaboard" +arch=('armv7h') +url="http://archlinuxarm.org/forum/viewtopic.php?f=48&t=6731&p=37321#p37254" +license=('GPL') +groups=() +provides=() +depends=() +makedepends=('make' 'gcc' 'git') +install='ti-uim.install' + +source=("$pkgname::git://git.gitorious.org/uim/uim.git" "ti-bluetooth-uim" "ti-uim.service") +md5sums=('SKIP' + 'defc01e5c17bf00a051dcf4ff51ae3ed' + '29b75236d1e99b2a82375312a8815fb6') + +build() { + cd "$srcdir/$pkgname" + make +} + +package() { + cd "$srcdir/$pkgname" + install -vDm755 uim $pkgdir/usr/bin/$pkgname + install -vDm755 $srcdir/ti-bluetooth-uim $pkgdir/usr/bin/ti-bluetooth-uim + install -vDm644 $srcdir/ti-uim.service $pkgdir/usr/lib/systemd/system/ti-uim.service +} + diff --git a/alarm/ti-uim/ti-bluetooth-uim b/alarm/ti-uim/ti-bluetooth-uim new file mode 100755 index 000000000..5df773212 --- /dev/null +++ b/alarm/ti-uim/ti-bluetooth-uim @@ -0,0 +1,8 @@ +#!/bin/bash + +modprobe st_drv +modprobe -r btwilink +ti-uim & +modprobe btwilink +hciconfig hci0 up +wait diff --git a/alarm/ti-uim/ti-uim.install b/alarm/ti-uim/ti-uim.install new file mode 100644 index 000000000..9fc6c0194 --- /dev/null +++ b/alarm/ti-uim/ti-uim.install @@ -0,0 +1,8 @@ +post_install() { + echo ">>> You need to enable the systemd service by running:" + echo ">>> systemctl enable ti-uim.service" + echo ">>> systemctl enable bluetooth.service" + echo ">>> systemctl start ti-uim.service" + echo ">>> systemctl start bluetooth.service" +} + diff --git a/alarm/ti-uim/ti-uim.service b/alarm/ti-uim/ti-uim.service new file mode 100644 index 000000000..7397fa180 --- /dev/null +++ b/alarm/ti-uim/ti-uim.service @@ -0,0 +1,10 @@ +[Unit] +Description=UIM daemon to enable bluetooth on the pandaboard +Before=bluetooth.service + +[Service] +ExecStart=/usr/bin/ti-bluetooth-uim +ExecStopPost=/usr/bin/modprobe -r btwilink + +[Install] +WantedBy=multi-user.target