diff options
author | Richard Purdie <rpurdie@linux.intel.com> | 2010-08-27 15:14:24 +0100 |
---|---|---|
committer | Richard Purdie <rpurdie@linux.intel.com> | 2010-08-27 15:29:45 +0100 |
commit | 29d6678fd546377459ef75cf54abeef5b969b5cf (patch) | |
tree | 8edd65790e37a00d01c3f203f773fe4b5012db18 /meta/recipes-connectivity/bluez/bluez-dtl1-workaround | |
parent | da49de6885ee1bc424e70bc02f21f6ab920efb55 (diff) | |
download | poky-29d6678fd546377459ef75cf54abeef5b969b5cf.tar.gz |
Major layout change to the packages directory
Having one monolithic packages directory makes it hard to find things
and is generally overwhelming. This commit splits it into several
logical sections roughly based on function, recipes.txt gives more
information about the classifications used.
The opportunity is also used to switch from "packages" to "recipes"
as used in OpenEmbedded as the term "packages" can be confusing to
people and has many different meanings.
Not all recipes have been classified yet, this is just a first pass
at separating things out. Some packages are moved to meta-extras as
they're no longer actively used or maintained.
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Diffstat (limited to 'meta/recipes-connectivity/bluez/bluez-dtl1-workaround')
-rw-r--r-- | meta/recipes-connectivity/bluez/bluez-dtl1-workaround/02dtl1_cs.sh | 57 |
1 files changed, 57 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 | |||
3 | case "$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 | ||
57 | esac | ||