summaryrefslogtreecommitdiffstats
path: root/meta/recipes-connectivity/bluez
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-connectivity/bluez')
-rw-r--r--meta/recipes-connectivity/bluez/bluez-dtl1-workaround/02dtl1_cs.sh57
-rw-r--r--meta/recipes-connectivity/bluez/bluez-dtl1-workaround_1.0.bb17
-rw-r--r--meta/recipes-connectivity/bluez/bluez-hcidump_1.42.bb13
-rw-r--r--meta/recipes-connectivity/bluez/bluez4-4.66/bluetooth.conf16
-rw-r--r--meta/recipes-connectivity/bluez/bluez4-4.66/fix-dfutool-usb-declaration-mismatch.patch19
-rw-r--r--meta/recipes-connectivity/bluez/bluez4-4.66/hid2hci_usb_init.patch33
-rw-r--r--meta/recipes-connectivity/bluez/bluez4-4.66/sbc-thumb.patch13
-rw-r--r--meta/recipes-connectivity/bluez/bluez4_4.66.bb72
8 files changed, 240 insertions, 0 deletions
diff --git a/meta/recipes-connectivity/bluez/bluez-dtl1-workaround/02dtl1_cs.sh b/meta/recipes-connectivity/bluez/bluez-dtl1-workaround/02dtl1_cs.sh
new file mode 100644
index 0000000000..fefc72e07a
--- /dev/null
+++ b/meta/recipes-connectivity/bluez/bluez-dtl1-workaround/02dtl1_cs.sh
@@ -0,0 +1,57 @@
1#!/bin/sh
2
3case "$1" in
4 suspend)
5 if [ "`/sbin/hciconfig`" != "" ]; then
6 #If hciconfig outputs anything then there's probably a Bluetooth
7 # CF card in the slot so shut it down.
8 hcitool dc `hcitool con | grep ACL | sed 's/^.*\([0-9A-F]\{2\}\(:[0-9A-F]\{2\}\)\{5\}\).*$/\1/'`
9 hciconfig hci0 down
10 killall hciattach > /dev/null 2>&1
11 fi
12 ;;
13
14 resume)
15 #check for kernel version
16 if [ "`uname -r | grep 2.4.`" != "" ]; then
17 k="o"
18 elif [ "`uname -r | grep 2.6.`" != "" ]; then
19 k="ko"
20 else
21 exit 0
22 fi
23
24 if test -e /sbin/cardctl; then
25 CARDCTL=/sbin/cardctl
26 elif test -e /sbin/pccardctl; then
27 CARDCTL=/sbin/pccardctl
28 else
29 exit 0
30 fi
31
32 if [ "`lsmod | grep hci_uart`" != "" ]; then
33 #If the hci_usb module is still loaded then there's a serial based
34 # Bluetooth CF card in the slot, which only needs a resume to get it going
35 # again.
36 rfcomm bind all
37 $CARDCTL resume
38 hciconfig hci0 up
39 else
40 # only works for nokia dtl1 cards
41 for f in /lib/modules/`uname -r`/kernel/drivers/bluetooth/dtl1_cs.$k
42 do
43 #Enumerate all the self-contained Bluetooth CF card drivers
44 f=`echo $f | sed 's/\.'$k'$//'`
45 f=`basename $f`
46 if [ "`lsmod | grep $f`" != "" ]; then
47 #If one of these drivers is still loaded, then there is probably
48 #a non-serial based Bluetooth CF card in the slot that needs
49 #ejecting and reinserting to get it going again
50 rfcomm bind all
51 $CARDCTL eject
52 $CARDCTL insert
53 hciconfig hci0 up
54 fi
55 done
56 fi
57esac
diff --git a/meta/recipes-connectivity/bluez/bluez-dtl1-workaround_1.0.bb b/meta/recipes-connectivity/bluez/bluez-dtl1-workaround_1.0.bb
new file mode 100644
index 0000000000..64000b7a5f
--- /dev/null
+++ b/meta/recipes-connectivity/bluez/bluez-dtl1-workaround_1.0.bb
@@ -0,0 +1,17 @@
1DESCRIPTION = "A nasty hack for for dtl1-cs driver to workaround suspend/resume."
2LICENSE = "GPLv2"
3SECTION = "console"
4PRIORITY = "optional"
5PR = "r1"
6
7SRC_URI = "file://02dtl1_cs.sh"
8
9do_install() {
10 install -d ${D}${sysconfdir}/apm/event.d/
11 install -m 0755 ${WORKDIR}/02dtl1_cs.sh ${D}${sysconfdir}/apm/event.d/
12}
13
14#Package 02dtl1_cs.sh, which is a nasty hack to get dtl1c_cs cards working with suspend/resume
15FILES_${PN} += "${sysconfdir}/apm/"
16
17PACKAGE_ARCH = "all"
diff --git a/meta/recipes-connectivity/bluez/bluez-hcidump_1.42.bb b/meta/recipes-connectivity/bluez/bluez-hcidump_1.42.bb
new file mode 100644
index 0000000000..4c117281aa
--- /dev/null
+++ b/meta/recipes-connectivity/bluez/bluez-hcidump_1.42.bb
@@ -0,0 +1,13 @@
1DESCRIPTION = "Linux Bluetooth Stack HCI Debugger Tool."
2SECTION = "console"
3PRIORITY = "optional"
4DEPENDS = "bluez4"
5LICENSE = "GPL"
6PR = "r0"
7
8SRC_URI = "http://bluez.sourceforge.net/download/bluez-hcidump-${PV}.tar.gz"
9S = "${WORKDIR}/bluez-hcidump-${PV}"
10
11EXTRA_OECONF = "--with-bluez-libs=${STAGING_LIBDIR} --with-bluez-includes=${STAGING_INCDIR}"
12
13inherit autotools
diff --git a/meta/recipes-connectivity/bluez/bluez4-4.66/bluetooth.conf b/meta/recipes-connectivity/bluez/bluez4-4.66/bluetooth.conf
new file mode 100644
index 0000000000..ca5e9e4f2f
--- /dev/null
+++ b/meta/recipes-connectivity/bluez/bluez4-4.66/bluetooth.conf
@@ -0,0 +1,16 @@
1<!-- This configuration file specifies the required security policies
2 for Bluetooth core daemon to work. -->
3
4<!DOCTYPE busconfig PUBLIC "-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN"
5 "http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
6<busconfig>
7
8 <!-- ../system.conf have denied everything, so we just punch some holes -->
9
10 <policy context="default">
11 <allow own="org.bluez"/>
12 <allow send_destination="org.bluez"/>
13 <allow send_interface="org.bluez.Agent"/>
14 </policy>
15
16</busconfig>
diff --git a/meta/recipes-connectivity/bluez/bluez4-4.66/fix-dfutool-usb-declaration-mismatch.patch b/meta/recipes-connectivity/bluez/bluez4-4.66/fix-dfutool-usb-declaration-mismatch.patch
new file mode 100644
index 0000000000..91c802bc41
--- /dev/null
+++ b/meta/recipes-connectivity/bluez/bluez4-4.66/fix-dfutool-usb-declaration-mismatch.patch
@@ -0,0 +1,19 @@
1# bluez4: add compile patch fixing some usb declaration mismatch
2# Author: Michael 'Mickey' Lauer <mickey@vanille-media.de>
3# Date: Thu Jan 29 16:52:21 2009 +0000
4#
5# Acquired from OpenEmbedded
6
7Index: bluez-4.27/tools/dfutool.c
8===================================================================
9--- bluez-4.27.orig/tools/dfutool.c
10+++ bluez-4.27/tools/dfutool.c
11@@ -59,7 +59,7 @@
12 #endif
13
14 #ifdef NEED_USB_GET_BUSSES
15-static inline struct usb_bus *usb_get_busses(void)
16+inline struct usb_bus *usb_get_busses(void)
17 {
18 return usb_busses;
19 }
diff --git a/meta/recipes-connectivity/bluez/bluez4-4.66/hid2hci_usb_init.patch b/meta/recipes-connectivity/bluez/bluez4-4.66/hid2hci_usb_init.patch
new file mode 100644
index 0000000000..ed15fd5a1b
--- /dev/null
+++ b/meta/recipes-connectivity/bluez/bluez4-4.66/hid2hci_usb_init.patch
@@ -0,0 +1,33 @@
1# Signed-off-by: Khem Raj <raj.khem@gmail.com>
2#
3# Use the new usb1 API for usb_init() and check for fails from
4# usb_init (). Currently we see a crash on a system which does
5# not have USB because usb_init() fails and it cleans up all initialized
6# data (e.g. ctx) which is used in subsequent calls to libusb
7# We return immediately if usb_init() fails for some reason.
8
9Index: bluez-4.24/tools/hid2hci.c
10===================================================================
11--- bluez-4.24.orig/tools/hid2hci.c 2008-10-25 23:40:34.000000000 -0700
12+++ bluez-4.24/tools/hid2hci.c 2008-12-29 22:06:04.000000000 -0800
13@@ -337,7 +337,7 @@
14 int main(int argc, char *argv[])
15 {
16 struct device_info dev[16];
17- int i, opt, num, quiet = 0, mode = HCI;
18+ int i, ret, opt, num, quiet = 0, mode = HCI;
19
20 while ((opt = getopt_long(argc, argv, "+01qh", main_options, NULL)) != -1) {
21 switch (opt) {
22@@ -361,8 +361,9 @@
23 argc -= optind;
24 argv += optind;
25 optind = 0;
26-
27- usb_init();
28+ ret = libusb_init();
29+ if (ret < 0)
30+ return ret;
31
32 num = find_devices(mode, dev, sizeof(dev) / sizeof(dev[0]));
33 if (num <= 0) {
diff --git a/meta/recipes-connectivity/bluez/bluez4-4.66/sbc-thumb.patch b/meta/recipes-connectivity/bluez/bluez4-4.66/sbc-thumb.patch
new file mode 100644
index 0000000000..474423670b
--- /dev/null
+++ b/meta/recipes-connectivity/bluez/bluez4-4.66/sbc-thumb.patch
@@ -0,0 +1,13 @@
1# Acquired from OpenEmbedded
2
3--- bluez/sbc/sbc_math.h~ 2008-03-05 20:18:03.000000000 +0000
4+++ bluez/sbc/sbc_math.h 2008-10-27 13:39:27.000000000 +0000
5@@ -59,7 +59,7 @@
6
7 #define SBC_FIXED_0(val) { val = 0; }
8 #define MUL(a, b) ((a) * (b))
9-#ifdef __arm__
10+#if defined(__arm__) && !defined(__thumb__)
11 #define MULA(a, b, res) ({ \
12 int tmp = res; \
13 __asm__( \
diff --git a/meta/recipes-connectivity/bluez/bluez4_4.66.bb b/meta/recipes-connectivity/bluez/bluez4_4.66.bb
new file mode 100644
index 0000000000..7abf0faa65
--- /dev/null
+++ b/meta/recipes-connectivity/bluez/bluez4_4.66.bb
@@ -0,0 +1,72 @@
1DESCRIPTION = "Linux Bluetooth Stack Userland V4"
2HOMEPAGE = "http://www.bluez.org"
3SECTION = "libs"
4PRIORITY = "optional"
5LICENSE = "GPLv2+ & LGPLv2.1+"
6LIC_FILES_CHKSUM = "file://COPYING;md5=12f884d2ae1ff87c09e5b7ccc2c4ca7e \
7 file://COPYING.LIB;md5=fb504b67c50331fc78734fed90fb0e09 \
8 file://src/main.c;beginline=1;endline=24;md5=9bc54b93cd7e17bf03f52513f39f926e \
9 file://sbc/sbc.c;beginline=1;endline=25;md5=1a40781ed30d50d8639323a184aeb191"
10DEPENDS = "gst-plugins-base alsa-lib libusb dbus-glib libnl"
11
12# For angstrom we want this to replace at least bluez-libs
13PROVIDES_append_angstrom = " bluez-utils bluez-libs"
14
15ASNEEDED = ""
16
17PR = "r0"
18
19SRC_URI = "\
20 http://www.kernel.org/pub/linux/bluetooth/bluez-${PV}.tar.gz \
21 file://fix-dfutool-usb-declaration-mismatch.patch;patch=1 \
22 file://sbc-thumb.patch;patch=1 \
23 file://bluetooth.conf \
24"
25S = "${WORKDIR}/bluez-${PV}"
26
27inherit autotools
28AUTOTOOLS_STAGE_PKGCONFIG = "1"
29
30EXTRA_OECONF = "\
31 --enable-gstreamer \
32 --enable-alsa \
33 --enable-usb \
34 --enable-netlink \
35 --enable-tools \
36 --enable-bccmd \
37 --enable-hid2hci \
38 --enable-dfutool \
39 --enable-hidd \
40 --enable-pandd \
41 --enable-dund \
42 --disable-cups \
43 --enable-test \
44 --enable-manpages \
45 --enable-configfiles \
46 --enable-initscripts \
47 --disable-pcmciarules \
48"
49
50do_install_append() {
51 install -m 0644 ${S}/audio/audio.conf ${D}/${sysconfdir}/bluetooth/
52 install -m 0644 ${S}/network/network.conf ${D}/${sysconfdir}/bluetooth/
53 install -m 0644 ${S}/input/input.conf ${D}/${sysconfdir}/bluetooth/
54 # at_console doesn't really work with the current state of OE, so punch some more holes so people can actually use BT
55 install -m 0644 ${WORKDIR}/bluetooth.conf ${D}/${sysconfdir}/dbus-1/system.d/
56}
57
58PACKAGES =+ "gst-plugin-bluez libasound-module-bluez"
59
60FILES_gst-plugin-bluez = "${libdir}/gstreamer-0.10/lib*.so"
61FILES_libasound-module-bluez = "${libdir}/alsa-lib/lib*.so"
62FILES_${PN} += "${libdir}/bluetooth/plugins/*.so"
63FILES_${PN}-dev += "\
64 ${libdir}/bluetooth/plugins/*.la \
65 ${libdir}/alsa-lib/*.la \
66 ${libdir}/gstreamer-0.10/*.la \
67"
68
69FILES_${PN}-dbg += "\
70 ${libdir}/bluetooth/plugins/.debug \
71 ${libdir}/*/.debug \
72"