diff options
author | Richard Purdie <richard@openedhand.com> | 2006-11-29 09:47:42 +0000 |
---|---|---|
committer | Richard Purdie <richard@openedhand.com> | 2006-11-29 09:47:42 +0000 |
commit | bcedd690f7413c535d5279bf9f342b6b90eb68d5 (patch) | |
tree | cf97265f39a0cbd5f03bdf39b54cc345fe0df9a9 /meta-extras | |
parent | 23e50d487da3e92df18a325a92d787f834a44570 (diff) | |
download | poky-bcedd690f7413c535d5279bf9f342b6b90eb68d5.tar.gz |
poky-extras: Add bluez, sqlite, maemo-mapper-nohildon
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@969 311d38ba-8fff-0310-9ca6-ca027cbcb966
Diffstat (limited to 'meta-extras')
34 files changed, 2291 insertions, 0 deletions
diff --git a/meta-extras/packages/bluez/bluez-hcidump_1.32.bb b/meta-extras/packages/bluez/bluez-hcidump_1.32.bb new file mode 100644 index 0000000000..877c8db33c --- /dev/null +++ b/meta-extras/packages/bluez/bluez-hcidump_1.32.bb | |||
@@ -0,0 +1,13 @@ | |||
1 | DESCRIPTION = "Linux Bluetooth Stack HCI Debugger Tool." | ||
2 | SECTION = "console" | ||
3 | PRIORITY = "optional" | ||
4 | DEPENDS = "bluez-libs" | ||
5 | LICENSE = "GPL" | ||
6 | PR = "r0" | ||
7 | |||
8 | SRC_URI = "http://bluez.sourceforge.net/download/bluez-hcidump-${PV}.tar.gz" | ||
9 | S = "${WORKDIR}/bluez-hcidump-${PV}" | ||
10 | |||
11 | EXTRA_OECONF = "--with-bluez-libs=${STAGING_LIBDIR} --with-bluez-includes=${STAGING_INCDIR}" | ||
12 | |||
13 | inherit autotools | ||
diff --git a/meta-extras/packages/bluez/bluez-libs_3.4.bb b/meta-extras/packages/bluez/bluez-libs_3.4.bb new file mode 100644 index 0000000000..d740bd80a9 --- /dev/null +++ b/meta-extras/packages/bluez/bluez-libs_3.4.bb | |||
@@ -0,0 +1,22 @@ | |||
1 | DESCRIPTION = "Linux Bluetooth Stack Userland Libaries." | ||
2 | SECTION = "libs" | ||
3 | PRIORITY = "optional" | ||
4 | HOMEPAGE = "http://www.bluez.org" | ||
5 | LICENSE = "GPL" | ||
6 | PR = "r0" | ||
7 | |||
8 | SRC_URI = "http://bluez.sourceforge.net/download/bluez-libs-${PV}.tar.gz" | ||
9 | |||
10 | inherit autotools pkgconfig | ||
11 | |||
12 | HEADERS = "bluetooth.h bnep.h cmtp.h hci.h hci_lib.h hidp.h l2cap.h rfcomm.h sco.h sdp.h sdp_lib.h" | ||
13 | |||
14 | do_stage() { | ||
15 | oe_libinstall -a -so -C src libbluetooth ${STAGING_LIBDIR} | ||
16 | |||
17 | install -d ${STAGING_INCDIR}/bluetooth/ | ||
18 | for f in ${HEADERS} | ||
19 | do | ||
20 | install -m 0644 include/$f ${STAGING_INCDIR}/bluetooth/$f | ||
21 | done | ||
22 | } | ||
diff --git a/meta-extras/packages/bluez/bluez-utils-dbus/dbus-2.24.patch b/meta-extras/packages/bluez/bluez-utils-dbus/dbus-2.24.patch new file mode 100644 index 0000000000..d8ec946a0b --- /dev/null +++ b/meta-extras/packages/bluez/bluez-utils-dbus/dbus-2.24.patch | |||
@@ -0,0 +1,53 @@ | |||
1 | --- bluez-utils-2.24/acinclude.m4.orig 2006-01-12 08:21:38.000000000 +0100 | ||
2 | +++ bluez-utils-2.24/acinclude.m4 2006-01-12 08:23:18.000000000 +0100 | ||
3 | @@ -131,46 +131,15 @@ | ||
4 | ]) | ||
5 | |||
6 | AC_DEFUN([AC_PATH_DBUS], [ | ||
7 | - dbus_prefix=${prefix} | ||
8 | - | ||
9 | - AC_ARG_WITH(dbus, AC_HELP_STRING([--with-dbus=DIR], [D-BUS library is installed in DIR]), [ | ||
10 | - if (test "${withval}" != "yes"); then | ||
11 | - dbus_prefix=${withval} | ||
12 | - fi | ||
13 | - ]) | ||
14 | - | ||
15 | - ac_save_CPPFLAGS=$CPPFLAGS | ||
16 | - ac_save_LDFLAGS=$LDFLAGS | ||
17 | - | ||
18 | - DBUS_CFLAGS="-DDBUS_API_SUBJECT_TO_CHANGE" | ||
19 | - test -d "${dbus_prefix}/include/dbus-1.0" && DBUS_CFLAGS="$DBUS_CFLAGS -I${dbus_prefix}/include/dbus-1.0" | ||
20 | - if (test "${prefix}" = "${bluez_prefix}"); then | ||
21 | - test -d "${libdir}/dbus-1.0/include" && DBUS_CFLAGS="$DBUS_CFLAGS -I${libdir}/dbus-1.0/include" | ||
22 | - else | ||
23 | - test -d "${dbus_prefix}/lib64/dbus-1.0/include" && DBUS_CFLAGS="$DBUS_CFLAGS -I${dbus_prefix}/lib64/dbus-1.0/include" | ||
24 | - test -d "${dbus_prefix}/lib/dbus-1.0/include" && DBUS_CFLAGS="$DBUS_CFLAGS -I${dbus_prefix}/lib/dbus-1.0/include" | ||
25 | - fi | ||
26 | + if pkg-config --exists dbus-1; then | ||
27 | + dbus_found=yes ; DBUS_CFLAGS="`pkg-config --cflags dbus-1` -DDBUS_API_SUBJECT_TO_CHANGE" | ||
28 | + DBUS_LIBS="`pkg-config --libs dbus-1`" | ||
29 | |||
30 | CPPFLAGS="$CPPFLAGS $DBUS_CFLAGS" | ||
31 | - AC_CHECK_HEADER(dbus/dbus.h, dbus_found=yes, dbus_found=no) | ||
32 | - | ||
33 | - DBUS_LIBS="" | ||
34 | - if (test "${prefix}" = "${dbus_prefix}"); then | ||
35 | - test -d "${libdir}" && DBUS_LIBS="$DBUS_LIBS -L${libdir}" | ||
36 | - else | ||
37 | - test -d "${dbus_prefix}/lib64" && DBUS_LIBS="$DBUS_LIBS -L${dbus_prefix}/lib64" | ||
38 | - test -d "${dbus_prefix}/lib" && DBUS_LIBS="$DBUS_LIBS -L${dbus_prefix}/lib" | ||
39 | - fi | ||
40 | - | ||
41 | LDFLAGS="$LDFLAGS $DBUS_LIBS" | ||
42 | - AC_CHECK_LIB(dbus-1, dbus_error_init, DBUS_LIBS="$DBUS_LIBS -ldbus-1", dbus_found=no) | ||
43 | - AC_CHECK_LIB(dbus-1, dbus_message_iter_get_basic, dummy=yes, dbus_found=no) | ||
44 | - | ||
45 | - CPPFLAGS=$ac_save_CPPFLAGS | ||
46 | - LDFLAGS=$ac_save_LDFLAGS | ||
47 | - | ||
48 | AC_SUBST(DBUS_CFLAGS) | ||
49 | AC_SUBST(DBUS_LIBS) | ||
50 | + fi | ||
51 | ]) | ||
52 | |||
53 | AC_DEFUN([AC_PATH_FUSE], [ | ||
diff --git a/meta-extras/packages/bluez/bluez-utils-dbus/dbus.patch b/meta-extras/packages/bluez/bluez-utils-dbus/dbus.patch new file mode 100644 index 0000000000..c5ab129469 --- /dev/null +++ b/meta-extras/packages/bluez/bluez-utils-dbus/dbus.patch | |||
@@ -0,0 +1,58 @@ | |||
1 | |||
2 | # | ||
3 | # Patch managed by http://www.holgerschurig.de/patcher.html | ||
4 | # | ||
5 | |||
6 | --- bluez-utils-2.20/acinclude.m4~dbus.patch | ||
7 | +++ bluez-utils-2.20/acinclude.m4 | ||
8 | @@ -211,46 +211,15 @@ | ||
9 | ]) | ||
10 | |||
11 | AC_DEFUN([AC_PATH_DBUS], [ | ||
12 | - dbus_prefix=${prefix} | ||
13 | - | ||
14 | - AC_ARG_WITH(dbus, AC_HELP_STRING([--with-dbus=DIR], [D-BUS library is installed in DIR]), [ | ||
15 | - if (test "${withval}" != "yes"); then | ||
16 | - dbus_prefix=${withval} | ||
17 | - fi | ||
18 | - ]) | ||
19 | - | ||
20 | - ac_save_CPPFLAGS=$CPPFLAGS | ||
21 | - ac_save_LDFLAGS=$LDFLAGS | ||
22 | - | ||
23 | - DBUS_CFLAGS="-DDBUS_API_SUBJECT_TO_CHANGE" | ||
24 | - test -d "${dbus_prefix}/include/dbus-1.0" && DBUS_CFLAGS="$DBUS_CFLAGS -I${dbus_prefix}/include/dbus-1.0" | ||
25 | - if (test "${prefix}" = "${bluez_prefix}"); then | ||
26 | - test -d "${libdir}/dbus-1.0/include" && DBUS_CFLAGS="$DBUS_CFLAGS -I${libdir}/dbus-1.0/include" | ||
27 | - else | ||
28 | - test -d "${dbus_prefix}/lib64/dbus-1.0/include" && DBUS_CFLAGS="$DBUS_CFLAGS -I${dbus_prefix}/lib64/dbus-1.0/include" | ||
29 | - test -d "${dbus_prefix}/lib/dbus-1.0/include" && DBUS_CFLAGS="$DBUS_CFLAGS -I${dbus_prefix}/lib/dbus-1.0/include" | ||
30 | - fi | ||
31 | + if pkg-config --exists dbus-1; then | ||
32 | + dbus_found=yes ; DBUS_CFLAGS="`pkg-config --cflags dbus-1` -DDBUS_API_SUBJECT_TO_CHANGE" | ||
33 | + DBUS_LIBS="`pkg-config --libs dbus-1`" | ||
34 | |||
35 | CPPFLAGS="$CPPFLAGS $DBUS_CFLAGS" | ||
36 | - AC_CHECK_HEADER(dbus/dbus.h, dbus_found=yes, dbus_found=no) | ||
37 | - | ||
38 | - DBUS_LIBS="" | ||
39 | - if (test "${prefix}" = "${dbus_prefix}"); then | ||
40 | - test -d "${libdir}" && DBUS_LIBS="$DBUS_LIBS -L${libdir}" | ||
41 | - else | ||
42 | - test -d "${dbus_prefix}/lib64" && DBUS_LIBS="$DBUS_LIBS -L${dbus_prefix}/lib64" | ||
43 | - test -d "${dbus_prefix}/lib" && DBUS_LIBS="$DBUS_LIBS -L${dbus_prefix}/lib" | ||
44 | - fi | ||
45 | - | ||
46 | LDFLAGS="$LDFLAGS $DBUS_LIBS" | ||
47 | - AC_CHECK_LIB(dbus-1, dbus_error_init, DBUS_LIBS="$DBUS_LIBS -ldbus-1", dbus_found=no) | ||
48 | - AC_CHECK_LIB(dbus-1, dbus_message_iter_get_basic, AC_DEFINE(HAVE_DBUS_MESSAGE_ITER_GET_BASIC, 1, [Define to 1 if you have the dbus_message_iter_get_basic() function.])) | ||
49 | - | ||
50 | - CPPFLAGS=$ac_save_CPPFLAGS | ||
51 | - LDFLAGS=$ac_save_LDFLAGS | ||
52 | - | ||
53 | AC_SUBST(DBUS_CFLAGS) | ||
54 | AC_SUBST(DBUS_LIBS) | ||
55 | + fi | ||
56 | ]) | ||
57 | |||
58 | AC_DEFUN([AC_ARG_BLUEZ], [ | ||
diff --git a/meta-extras/packages/bluez/bluez-utils-dbus/hcid-alignment-fix.patch b/meta-extras/packages/bluez/bluez-utils-dbus/hcid-alignment-fix.patch new file mode 100644 index 0000000000..276281c14e --- /dev/null +++ b/meta-extras/packages/bluez/bluez-utils-dbus/hcid-alignment-fix.patch | |||
@@ -0,0 +1,42 @@ | |||
1 | --- bluez-utils-2.20/hcid/dbus.c.orig 2005-09-21 11:27:26 +0200 | ||
2 | +++ bluez-utils-2.20/hcid/dbus.c 2005-09-21 11:27:35 +0200 | ||
3 | @@ -120,6 +121,7 @@ | ||
4 | DBusMessage *message; | ||
5 | #ifdef HAVE_DBUS_MESSAGE_ITER_GET_BASIC | ||
6 | uint8_t *addr = (uint8_t *) &ci->bdaddr; | ||
7 | + uint32_t ci_out = ci->out; | ||
8 | #else | ||
9 | DBusMessageIter iter; | ||
10 | #endif | ||
11 | @@ -138,7 +140,7 @@ | ||
12 | bacpy(&req->bda, &ci->bdaddr); | ||
13 | |||
14 | #ifdef HAVE_DBUS_MESSAGE_ITER_GET_BASIC | ||
15 | - dbus_message_append_args(message, DBUS_TYPE_BOOLEAN, &ci->out, | ||
16 | + dbus_message_append_args(message, DBUS_TYPE_BOOLEAN, &ci_out, | ||
17 | DBUS_TYPE_ARRAY, DBUS_TYPE_BYTE, | ||
18 | &addr, sizeof(bdaddr_t), DBUS_TYPE_INVALID); | ||
19 | #else | ||
20 | @@ -261,6 +263,8 @@ | ||
21 | DBusMessage *message; | ||
22 | #ifndef HAVE_DBUS_MESSAGE_ITER_GET_BASIC | ||
23 | DBusMessageIter iter; | ||
24 | +#else | ||
25 | + int32_t tmp_rssi = rssi; | ||
26 | #endif | ||
27 | char *local_addr, *peer_addr; | ||
28 | bdaddr_t tmp; | ||
29 | @@ -276,11 +280,12 @@ | ||
30 | } | ||
31 | |||
32 | #ifdef HAVE_DBUS_MESSAGE_ITER_GET_BASIC | ||
33 | + | ||
34 | dbus_message_append_args(message, | ||
35 | DBUS_TYPE_STRING, &local_addr, | ||
36 | DBUS_TYPE_STRING, &peer_addr, | ||
37 | DBUS_TYPE_UINT32, &class, | ||
38 | - DBUS_TYPE_INT32, &rssi, | ||
39 | + DBUS_TYPE_INT32, &tmp_rssi, | ||
40 | DBUS_TYPE_INVALID); | ||
41 | #else | ||
42 | dbus_message_append_iter_init(message, &iter); | ||
diff --git a/meta-extras/packages/bluez/bluez-utils-dbus/hcid.conf b/meta-extras/packages/bluez/bluez-utils-dbus/hcid.conf new file mode 100644 index 0000000000..ab3ca2aaee --- /dev/null +++ b/meta-extras/packages/bluez/bluez-utils-dbus/hcid.conf | |||
@@ -0,0 +1,72 @@ | |||
1 | # | ||
2 | # HCI daemon configuration file. | ||
3 | # | ||
4 | # $Id: hcid.conf,v 1.4 2004/04/29 20:14:21 holtmann Exp $ | ||
5 | # | ||
6 | |||
7 | # HCId options | ||
8 | options { | ||
9 | # Automatically initialize new devices | ||
10 | autoinit yes; | ||
11 | |||
12 | # Security Manager mode | ||
13 | # none - Security manager disabled | ||
14 | # auto - Use local PIN for incoming connections | ||
15 | # user - Always ask user for a PIN | ||
16 | # | ||
17 | security auto; | ||
18 | |||
19 | # Pairing mode | ||
20 | # none - Pairing disabled | ||
21 | # multi - Allow pairing with already paired devices | ||
22 | # once - Pair once and deny successive attempts | ||
23 | pairing multi; | ||
24 | |||
25 | # PIN helper | ||
26 | # pin_helper /usr/bin/bluepin; | ||
27 | |||
28 | # D-Bus PIN helper | ||
29 | dbus_pin_helper; | ||
30 | } | ||
31 | |||
32 | # Default settings for HCI devices | ||
33 | device { | ||
34 | # Local device name | ||
35 | # %d - device id | ||
36 | # %h - host name | ||
37 | name "%h"; | ||
38 | |||
39 | # Local device class | ||
40 | class 0x120112; | ||
41 | |||
42 | # Default packet type | ||
43 | #pkt_type DH1,DM1,HV1; | ||
44 | |||
45 | # Inquiry and Page scan | ||
46 | iscan enable; pscan enable; | ||
47 | |||
48 | # Default link mode | ||
49 | # none - no specific policy | ||
50 | # accept - always accept incoming connections | ||
51 | # master - become master on incoming connections, | ||
52 | # deny role switch on outgoing connections | ||
53 | # | ||
54 | #lm accept,master; | ||
55 | # | ||
56 | lm accept; | ||
57 | |||
58 | # Default link policy | ||
59 | # none - no specific policy | ||
60 | # rswitch - allow role switch | ||
61 | # hold - allow hold mode | ||
62 | # sniff - allow sniff mode | ||
63 | # park - allow park mode | ||
64 | # | ||
65 | #lp hold,sniff; | ||
66 | # | ||
67 | lp rswitch,hold,sniff,park; | ||
68 | |||
69 | # Authentication and Encryption | ||
70 | #auth enable; | ||
71 | encrypt enable; | ||
72 | } | ||
diff --git a/meta-extras/packages/bluez/bluez-utils-dbus/smash.patch b/meta-extras/packages/bluez/bluez-utils-dbus/smash.patch new file mode 100644 index 0000000000..55cdbb7284 --- /dev/null +++ b/meta-extras/packages/bluez/bluez-utils-dbus/smash.patch | |||
@@ -0,0 +1,11 @@ | |||
1 | --- bluez-utils-2.11/hcid/dbus.c.old 2004-12-31 16:35:12.000000000 +0000 | ||
2 | +++ bluez-utils-2.11/hcid/dbus.c 2004-12-31 16:39:58.000000000 +0000 | ||
3 | @@ -89,6 +89,8 @@ | ||
4 | |||
5 | memset(&pr, 0, sizeof(pr)); | ||
6 | bacpy(&pr.bdaddr, &req->bda); | ||
7 | + if (len > sizeof (pr.pin_code)) | ||
8 | + goto error; | ||
9 | memcpy(pr.pin_code, pin, len); | ||
10 | pr.pin_len = len; | ||
11 | hci_send_cmd(req->dev, OGF_LINK_CTL, OCF_PIN_CODE_REPLY, | ||
diff --git a/meta-extras/packages/bluez/bluez-utils.inc b/meta-extras/packages/bluez/bluez-utils.inc new file mode 100644 index 0000000000..ff3916ea94 --- /dev/null +++ b/meta-extras/packages/bluez/bluez-utils.inc | |||
@@ -0,0 +1,60 @@ | |||
1 | DESCRIPTION = "Linux Bluetooth Stack Userland Utilities." | ||
2 | SECTION = "console" | ||
3 | PRIORITY = "optional" | ||
4 | DEPENDS = "bluez-libs-${PV} pcmcia-cs" | ||
5 | RPROVIDES_${PN} = "bluez-pan bluez-sdp bluez-utils" | ||
6 | LICENSE = "GPL" | ||
7 | |||
8 | SRC_URI = "http://bluez.sourceforge.net/download/bluez-utils-${PV}.tar.gz \ | ||
9 | file://base.patch;patch=1 \ | ||
10 | file://blueboxes.patch;patch=1 \ | ||
11 | file://no-user-include.patch;patch=1 \ | ||
12 | file://hcid.conf \ | ||
13 | file://bluetooth.default \ | ||
14 | file://bluetooth.conf \ | ||
15 | file://02dtl1_cs.sh" | ||
16 | |||
17 | # Almost all serial CF cards w/ manfid 0x0000,0x0000 seem to use the bcs protocol | ||
18 | # Let's default to that instead of 'any' until further notice... | ||
19 | SRC_URI += " file://default-manfid-0x0-to-bcps.patch;patch=1" | ||
20 | |||
21 | S = "${WORKDIR}/bluez-utils-${PV}" | ||
22 | |||
23 | # We don't depend on openobex, fuse, alsa or usb but we set paths into staging | ||
24 | # otherwise /usr/lib and /usr/include make it onto command lines with unpredictable results | ||
25 | # Ideally acinclude.m4 needs fixing | ||
26 | EXTRA_OECONF = "--with-bluez-libs=${STAGING_LIBDIR} --with-bluez-includes=${STAGING_INCDIR} \ | ||
27 | --enable-pcmcia --enable-initscripts --enable-bcm203x --enable-hid2hci \ | ||
28 | --disable-obex --disable-alsa \ | ||
29 | --with-openobex=${STAGING_DIR}/${HOST_SYS} --with-fuse=${STAGING_DIR}/${HOST_SYS} \ | ||
30 | --with-alsa=${STAGING_DIR}/${HOST_SYS} --with-usb=${STAGING_DIR}/${HOST_SYS} \ | ||
31 | --with-bluez=${STAGING_LIBDIR}/${HOST_SYS}" | ||
32 | |||
33 | inherit autotools update-rc.d | ||
34 | |||
35 | INITSCRIPT_NAME = "bluetooth" | ||
36 | INITSCRIPT_PARAMS = "defaults 23 19" | ||
37 | |||
38 | do_compile_prepend() { | ||
39 | find ${S} -name Makefile | xargs sed -i 's:/usr/include:${STAGING_INCDIR}:' | ||
40 | } | ||
41 | |||
42 | do_install_append() { | ||
43 | install -d ${D}${base_sbindir} ${D}${base_bindir}/ ${D}${sysconfdir}/apm/event.d/ | ||
44 | mv ${D}${sbindir}/* ${D}${base_sbindir}/ | ||
45 | mv ${D}${bindir}/* ${D}${base_bindir}/ | ||
46 | rmdir ${D}${bindir} ${D}${sbindir} | ||
47 | chmod u+s ${D}${base_sbindir}/hciattach ${D}${base_sbindir}/hciconfig | ||
48 | chmod 755 ${D}${sysconfdir}/pcmcia/bluetooth | ||
49 | install -m 0644 ${WORKDIR}/hcid.conf ${D}${sysconfdir}/bluetooth/ | ||
50 | install -m 0644 ${WORKDIR}/bluetooth.default ${D}${sysconfdir}/default/bluetooth | ||
51 | cat ${WORKDIR}/bluetooth.conf >> ${D}${sysconfdir}/pcmcia/bluetooth.conf | ||
52 | install -m 0755 ${WORKDIR}/02dtl1_cs.sh ${D}${sysconfdir}/apm/event.d/ | ||
53 | } | ||
54 | |||
55 | CONFFILES_${PN} = "${sysconfdir}/bluetooth/hcid.conf ${sysconfdir}/bluetooth/rfcomm.conf \ | ||
56 | ${sysconfdir}/bluetooth/pin ${sysconfdir}/default/bluetooth" | ||
57 | |||
58 | PACKAGES =+ "${PN}-ciptool ${PN}-bluepin" | ||
59 | FILES_${PN}-ciptool = "/bin/ciptool" | ||
60 | FILES_${PN}-bluepin = "/bin/bluepin" | ||
diff --git a/meta-extras/packages/bluez/bluez-utils/02dtl1_cs.sh b/meta-extras/packages/bluez/bluez-utils/02dtl1_cs.sh new file mode 100644 index 0000000000..fd81508010 --- /dev/null +++ b/meta-extras/packages/bluez/bluez-utils/02dtl1_cs.sh | |||
@@ -0,0 +1,57 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | case "$1" in | ||
4 | suspend) | ||
5 | if [ "`/bin/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 | ||
diff --git a/meta-extras/packages/bluez/bluez-utils/hciattach-ti-bts.patch b/meta-extras/packages/bluez/bluez-utils/hciattach-ti-bts.patch new file mode 100644 index 0000000000..217c32619d --- /dev/null +++ b/meta-extras/packages/bluez/bluez-utils/hciattach-ti-bts.patch | |||
@@ -0,0 +1,489 @@ | |||
1 | --- bluez-utils-3.1/tools/hciattach.c.orig 2006-07-23 14:02:14.000000000 +0200 | ||
2 | +++ bluez-utils-3.1/tools/hciattach.c 2006-07-23 14:06:29.000000000 +0200 | ||
3 | @@ -58,6 +58,8 @@ | ||
4 | #define HCI_UART_3WIRE 2 | ||
5 | #define HCI_UART_H4DS 3 | ||
6 | |||
7 | +#include "ti_bts.h" | ||
8 | + | ||
9 | struct uart_t { | ||
10 | char *type; | ||
11 | int m_id; | ||
12 | @@ -67,6 +69,7 @@ | ||
13 | int speed; | ||
14 | int flags; | ||
15 | int (*init) (int fd, struct uart_t *u, struct termios *ti); | ||
16 | + char *bts; /* bluetooth script */ | ||
17 | }; | ||
18 | |||
19 | #define FLOW_CTL 0x0001 | ||
20 | @@ -256,6 +259,114 @@ | ||
21 | return 0; | ||
22 | } | ||
23 | |||
24 | +static int brf6150(int fd, struct uart_t *u, struct termios *ti) | ||
25 | +{ | ||
26 | + bts_t *bfp; | ||
27 | + int i; | ||
28 | + unsigned long vers; | ||
29 | + unsigned char actionbuf[256]; | ||
30 | + unsigned char resp[128]; /* Response */ | ||
31 | + unsigned long count; | ||
32 | + unsigned short atype; | ||
33 | + | ||
34 | + if (u->bts == NULL) /* no script, ignore */ | ||
35 | + return 0; | ||
36 | + | ||
37 | + bfp = bts_load_script( u->bts, &vers ); | ||
38 | + if (bfp == NULL) | ||
39 | + return -1; | ||
40 | + | ||
41 | + fprintf( stderr, "Loading BTS script version %lu\n", vers ); | ||
42 | + | ||
43 | + while ((count = bts_next_action( bfp, actionbuf, | ||
44 | + sizeof actionbuf - 1, &atype )) != 0) { | ||
45 | + if (atype == ACTION_REMARKS) { | ||
46 | + if (actionbuf[0] != 0) | ||
47 | + fprintf( stderr, "%s\n", actionbuf ); | ||
48 | + } | ||
49 | + else if (atype == ACTION_SEND_COMMAND) { | ||
50 | +#if 0 | ||
51 | + fprintf( stderr, "ACTION_SEND_COMMAND: ", (int)atype ); | ||
52 | + for (i=0; i<count; i++) { | ||
53 | + fprintf( stderr, "0x%02x ", actionbuf[i] ); | ||
54 | + } | ||
55 | + fprintf( stderr, "\n" ); | ||
56 | +#endif | ||
57 | + int n; | ||
58 | + n = write(fd, actionbuf, count); | ||
59 | + if (n < 0 || n < count) { | ||
60 | + perror("Failed to write TI action command"); | ||
61 | + return -1; | ||
62 | + } | ||
63 | + } | ||
64 | + else if (atype == ACTION_WAIT_EVENT) { | ||
65 | + action_wait_t *wait = (action_wait_t *)actionbuf; | ||
66 | +#if 0 | ||
67 | + fprintf( stderr, "ACTION_WAIT_EVENT: %u msec, %u size, data = ", wait->msec, wait->size ); | ||
68 | + for (i=0; i<wait->size; i++) { | ||
69 | + fprintf( stderr, "0x%02x ", wait->data[i] ); | ||
70 | + } | ||
71 | + fprintf( stderr, "\n" ); | ||
72 | +#endif | ||
73 | + usleep(wait->msec); /* seems they give usec, not msec */ | ||
74 | + /* Read reply. */ | ||
75 | + if ((count = read_hci_event(fd, resp, sizeof resp)) < 0) { | ||
76 | + perror("Failed to read TI command response"); | ||
77 | + return -1; | ||
78 | + } | ||
79 | + if (count < wait->size) { | ||
80 | + fprintf( stderr, "TI command response is short."); | ||
81 | + } | ||
82 | + for (i=0; i<wait->size; i++) { | ||
83 | + if (i == 3) continue; /* ignore */ | ||
84 | + if (resp[i] != wait->data[i]) { | ||
85 | + fprintf( stderr, "TI command response does not match expected result.\n" ); | ||
86 | + } | ||
87 | + } | ||
88 | + } | ||
89 | + else if (atype == ACTION_SERIAL_PORT_PARAMETERS) { | ||
90 | + action_serial_t *sercmd = (action_serial_t *)actionbuf; | ||
91 | + | ||
92 | + /* Set actual baudrate */ | ||
93 | + fprintf( stderr, | ||
94 | + "BTS changing baud rate to %u, flow control to %u\n", | ||
95 | + sercmd->baud, sercmd->flow_control ); | ||
96 | + | ||
97 | + tcflush(fd, TCIOFLUSH); | ||
98 | + | ||
99 | + if (sercmd->flow_control) | ||
100 | + ti->c_cflag |= CRTSCTS; | ||
101 | + else | ||
102 | + ti->c_cflag &= ~CRTSCTS; | ||
103 | + if (tcsetattr(fd, TCSANOW, ti) < 0) { | ||
104 | + perror("Can't set port settings"); | ||
105 | + return -1; | ||
106 | + } | ||
107 | + | ||
108 | + u->speed = sercmd->baud; | ||
109 | + | ||
110 | + tcflush(fd, TCIOFLUSH); | ||
111 | + if (set_speed(fd, ti, sercmd->baud) < 0) { | ||
112 | + perror("Can't set baud rate"); | ||
113 | + return -1; | ||
114 | + } | ||
115 | + } | ||
116 | + else if (atype == ACTION_DELAY) { | ||
117 | + action_delay_t *delay = (action_delay_t *)actionbuf; | ||
118 | + usleep(delay->msec); /* seems they give usec, not msec */ | ||
119 | + } | ||
120 | + else { | ||
121 | + fprintf( stderr, "BTS action type = %d: ", (int)atype ); | ||
122 | + for (i=0; i<count; i++) { | ||
123 | + fprintf( stderr, "0x%02x ", actionbuf[i] ); | ||
124 | + } | ||
125 | + fprintf( stderr, "\n" ); | ||
126 | + } | ||
127 | + } | ||
128 | + bts_unload_script( bfp ); | ||
129 | + return 0; | ||
130 | +} | ||
131 | + | ||
132 | static int texas(int fd, struct uart_t *u, struct termios *ti) | ||
133 | { | ||
134 | struct timespec tm = {0, 50000}; | ||
135 | @@ -296,15 +407,26 @@ | ||
136 | } while (resp[4] != cmd[1] && resp[5] != cmd[2]); | ||
137 | |||
138 | /* Verify manufacturer */ | ||
139 | - if ((resp[11] & 0xFF) != 0x0d) | ||
140 | + if (resp[11] != 0x0d) | ||
141 | fprintf(stderr,"WARNING : module's manufacturer is not Texas Instrument\n"); | ||
142 | |||
143 | /* Print LMP version */ | ||
144 | - fprintf(stderr, "Texas module LMP version : 0x%02x\n", resp[10] & 0xFF); | ||
145 | + fprintf(stderr, "TI module LMP version : 0x%02x\n", resp[10]); | ||
146 | |||
147 | /* Print LMP subversion */ | ||
148 | - fprintf(stderr, "Texas module LMP sub-version : 0x%02x%02x\n", resp[14] & 0xFF, resp[13] & 0xFF); | ||
149 | + fprintf(stderr, "TI module LMP sub-version : 0x%02x%02x\n", resp[14], resp[13]); | ||
150 | + if ((resp[14] >> 2) == 3) { | ||
151 | + int err; | ||
152 | + nanosleep(&tm, NULL); | ||
153 | |||
154 | + /* BRF6150 */ | ||
155 | + if ((err=brf6150( fd, u, ti )) != 0) { | ||
156 | + fprintf( stderr, "TI script failed (err=%d)\n", | ||
157 | + err ); | ||
158 | + return -1; | ||
159 | + } | ||
160 | + } | ||
161 | + | ||
162 | nanosleep(&tm, NULL); | ||
163 | return 0; | ||
164 | } | ||
165 | @@ -1103,7 +1225,7 @@ | ||
166 | { | ||
167 | printf("hciattach - HCI UART driver initialization utility\n"); | ||
168 | printf("Usage:\n"); | ||
169 | - printf("\thciattach [-n] [-p] [-b] [-t timeout] [-s initial_speed] <tty> <type | id> [speed] [flow|noflow]\n"); | ||
170 | + printf("\thciattach [-n] [-p] [-b] [-t timeout] [-s initial_speed] [-S bts-script] <tty> <type | id> [speed] [flow|noflow]\n"); | ||
171 | printf("\thciattach -l\n"); | ||
172 | } | ||
173 | |||
174 | @@ -1118,11 +1240,12 @@ | ||
175 | struct sigaction sa; | ||
176 | struct pollfd p; | ||
177 | char dev[PATH_MAX]; | ||
178 | + char *bts = NULL; | ||
179 | |||
180 | detach = 1; | ||
181 | printpid = 0; | ||
182 | |||
183 | - while ((opt=getopt(argc, argv, "bnpt:s:l")) != EOF) { | ||
184 | + while ((opt=getopt(argc, argv, "bnpt:s:S:l")) != EOF) { | ||
185 | switch(opt) { | ||
186 | case 'b': | ||
187 | send_break = 1; | ||
188 | @@ -1144,6 +1267,10 @@ | ||
189 | init_speed = atoi(optarg); | ||
190 | break; | ||
191 | |||
192 | + case 'S': | ||
193 | + bts = optarg; | ||
194 | + break; | ||
195 | + | ||
196 | case 'l': | ||
197 | for (i = 0; uart[i].type; i++) { | ||
198 | printf("%-10s0x%04x,0x%04x\n", uart[i].type, | ||
199 | @@ -1215,6 +1342,8 @@ | ||
200 | if (init_speed) | ||
201 | u->init_speed = init_speed; | ||
202 | |||
203 | + u->bts = bts; | ||
204 | + | ||
205 | memset(&sa, 0, sizeof(sa)); | ||
206 | sa.sa_flags = SA_NOCLDSTOP; | ||
207 | sa.sa_handler = sig_alarm; | ||
208 | --- bluez-utils-3.1/tools/Makefile.am.orig 2006-07-23 14:06:59.000000000 +0200 | ||
209 | +++ bluez-utils-3.1/tools/Makefile.am 2006-07-23 14:07:18.000000000 +0200 | ||
210 | @@ -37,7 +37,7 @@ | ||
211 | |||
212 | noinst_PROGRAMS = hcisecfilter ppporc | ||
213 | |||
214 | -hciattach_SOURCES = hciattach.c hciattach_st.c | ||
215 | +hciattach_SOURCES = hciattach.c hciattach_st.c ti_bts.h ti_bts.c | ||
216 | |||
217 | hciconfig_SOURCES = hciconfig.c csr.h csr.c | ||
218 | hciconfig_LDADD = @BLUEZ_LIBS@ $(top_builddir)/common/libhelper.a | ||
219 | --- bluez-utils-3.1/tools/ti_bts.h.orig 2006-07-23 14:07:26.000000000 +0200 | ||
220 | +++ bluez-utils-3.1/tools/ti_bts.h 2006-07-23 14:07:46.000000000 +0200 | ||
221 | @@ -0,0 +1,116 @@ | ||
222 | +/* | ||
223 | + * Copyright (c) 2005 Texas Instruments, Inc. | ||
224 | + * Ported by SDG Systems, LLC | ||
225 | + * | ||
226 | + * This program is free software; you can redistribute it and/or modify | ||
227 | + * it under the terms of the GNU General Public License version 2 as | ||
228 | + * published by the Free Software Foundation; | ||
229 | + * | ||
230 | + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS | ||
231 | + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
232 | + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. | ||
233 | + * IN NO EVENT SHALL THE COPYRIGHT HOLDER(S) AND AUTHOR(S) BE LIABLE FOR ANY | ||
234 | + * CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES | ||
235 | + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
236 | + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||
237 | + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
238 | + * | ||
239 | + * ALL LIABILITY, INCLUDING LIABILITY FOR INFRINGEMENT OF ANY PATENTS, | ||
240 | + * COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS, RELATING TO USE OF THIS | ||
241 | + * SOFTWARE IS DISCLAIMED. | ||
242 | + * | ||
243 | + */ | ||
244 | + | ||
245 | +#ifndef BT_SCRIPT_H | ||
246 | +#define BT_SCRIPT_H | ||
247 | + | ||
248 | +#ifdef __cplusplus | ||
249 | +extern "C" { | ||
250 | +#endif | ||
251 | + | ||
252 | +/* | ||
253 | + * Define the interface of Bluetooth Script | ||
254 | + */ | ||
255 | + | ||
256 | +typedef void bts_t; | ||
257 | + | ||
258 | + | ||
259 | +#define ACTION_SEND_COMMAND 1 /* Send out raw data (as is) */ | ||
260 | +#define ACTION_WAIT_EVENT 2 /* Wait for data */ | ||
261 | +#define ACTION_SERIAL_PORT_PARAMETERS 3 | ||
262 | +#define ACTION_DELAY 4 | ||
263 | +#define ACTION_RUN_SCRIPT 5 | ||
264 | +#define ACTION_REMARKS 6 | ||
265 | + | ||
266 | +/* | ||
267 | + * Structure for ACTION_SEND_COMMAND | ||
268 | + */ | ||
269 | +typedef struct tagCActionCommand | ||
270 | +{ | ||
271 | + unsigned char data[1]; /* Data to send */ | ||
272 | +} action_command_t; | ||
273 | + | ||
274 | +/* | ||
275 | + * Structure for ACTION_WAIT_EVENT | ||
276 | + */ | ||
277 | +typedef struct tagCActionWaitEvent | ||
278 | +{ | ||
279 | + unsigned long msec; /* in milliseconds */ | ||
280 | + unsigned long size; | ||
281 | + unsigned char data[1]; /* Data to wait for */ | ||
282 | +} action_wait_t; | ||
283 | + | ||
284 | + | ||
285 | +/* | ||
286 | + * Structure for ACTION_SERIAL_PORT_PARAMETERS | ||
287 | + */ | ||
288 | +typedef struct tagCActionSerialPortParameters | ||
289 | +{ | ||
290 | + unsigned long baud; | ||
291 | + unsigned long flow_control; | ||
292 | +} action_serial_t; | ||
293 | + | ||
294 | +/* Flow Control Type */ | ||
295 | +#define FCT_NONE 0 | ||
296 | +#define FCT_HARDWARE 1 | ||
297 | + | ||
298 | +#define DONT_CHANGE 0xFFFFFFFF /* For both baud rate and flow control */ | ||
299 | + | ||
300 | + | ||
301 | +/* | ||
302 | + * Structure for ACTION_DELAY | ||
303 | + */ | ||
304 | +typedef struct tagCActionDelay | ||
305 | +{ | ||
306 | + unsigned long msec; /* in milliseconds */ | ||
307 | +} action_delay_t; | ||
308 | + | ||
309 | +/* | ||
310 | + * Structure for ACTION_RUN_SCRIPT | ||
311 | + */ | ||
312 | +typedef struct tagCActionRunScript | ||
313 | +{ | ||
314 | + char filename[1]; | ||
315 | +} action_run_t; | ||
316 | + | ||
317 | +/* | ||
318 | + * Structure for ACTION_REMARKS | ||
319 | + */ | ||
320 | +typedef struct tagCActionRemarks | ||
321 | +{ | ||
322 | + char m_szRemarks[1]; | ||
323 | +} action_remarks_t; | ||
324 | + | ||
325 | + | ||
326 | +const char *cis_create_filename(const unsigned char* cmdparms); | ||
327 | +bts_t * bts_load_script(const char* fname, unsigned long* version); | ||
328 | +unsigned long bts_next_action(const bts_t* bts_fp, unsigned char* action_buf, | ||
329 | + unsigned long nMaxSize, unsigned short* ptype); | ||
330 | +void bts_unload_script(bts_t* bts_fp); | ||
331 | + | ||
332 | +#ifdef __cplusplus | ||
333 | +}; | ||
334 | +#endif | ||
335 | + | ||
336 | +#endif /* BT_SCRIPT_H */ | ||
337 | + | ||
338 | --- bluez-utils-3.1/tools/ti_bts.c.orig 2006-07-23 14:07:28.000000000 +0200 | ||
339 | +++ bluez-utils-3.1/tools/ti_bts.c 2006-07-23 14:07:46.000000000 +0200 | ||
340 | @@ -0,0 +1,149 @@ | ||
341 | +/* | ||
342 | + * Copyright (c) 2005 Texas Instruments, Inc. | ||
343 | + * Ported by SDG Systems, LLC | ||
344 | + * | ||
345 | + * This program is free software; you can redistribute it and/or modify | ||
346 | + * it under the terms of the GNU General Public License version 2 as | ||
347 | + * published by the Free Software Foundation; | ||
348 | + * | ||
349 | + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS | ||
350 | + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
351 | + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. | ||
352 | + * IN NO EVENT SHALL THE COPYRIGHT HOLDER(S) AND AUTHOR(S) BE LIABLE FOR ANY | ||
353 | + * CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES | ||
354 | + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
355 | + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||
356 | + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
357 | + * | ||
358 | + * ALL LIABILITY, INCLUDING LIABILITY FOR INFRINGEMENT OF ANY PATENTS, | ||
359 | + * COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS, RELATING TO USE OF THIS | ||
360 | + * SOFTWARE IS DISCLAIMED. | ||
361 | + * | ||
362 | + */ | ||
363 | + | ||
364 | + | ||
365 | +#include <stdio.h> | ||
366 | +#include <stdlib.h> | ||
367 | +#include "ti_bts.h" | ||
368 | + | ||
369 | +#ifndef MAKEWORD | ||
370 | +#define MAKEWORD(a, b) ((unsigned short)(((unsigned char)(a)) | ((unsigned short)((unsigned char)(b))) << 8)) | ||
371 | +#endif | ||
372 | + | ||
373 | +#define TI_MANUFACTURER_ID 13 | ||
374 | + | ||
375 | +/* | ||
376 | + * Common Init Script specific | ||
377 | + */ | ||
378 | +const char * | ||
379 | +cis_create_filename(const unsigned char* cmdparms) | ||
380 | +{ | ||
381 | + static char bts_file[50]; | ||
382 | + | ||
383 | + /* Check for TI's id */ | ||
384 | + unsigned short manfid = MAKEWORD(cmdparms[8], cmdparms[9]); | ||
385 | + | ||
386 | + if (TI_MANUFACTURER_ID == manfid) { | ||
387 | + unsigned short version = MAKEWORD(cmdparms[10], cmdparms[11]); | ||
388 | + | ||
389 | + unsigned short chip = (version & 0x7C00) >> 10; | ||
390 | + unsigned short min_ver = (version & 0x007F); | ||
391 | + unsigned short maj_ver = (version & 0x0380) >> 7; | ||
392 | + | ||
393 | + if (0 != (version & 0x8000)) { | ||
394 | + maj_ver |= 0x0008; | ||
395 | + } | ||
396 | + | ||
397 | + sprintf( bts_file, "TIInit_%d.%d.%d.bts", | ||
398 | + (int)chip, (int)maj_ver, (int)min_ver); | ||
399 | + | ||
400 | + return &bts_file[0]; | ||
401 | + } | ||
402 | + return NULL; | ||
403 | +} | ||
404 | + | ||
405 | +typedef struct tagCHeader | ||
406 | +{ | ||
407 | + unsigned long magic; | ||
408 | + unsigned long version; | ||
409 | + unsigned char future[24]; | ||
410 | +} cheader_t; | ||
411 | + | ||
412 | + | ||
413 | +/* The value 0x42535442 stands for (in ASCII) BTSB */ | ||
414 | +/* which is Bluetooth Script Binary */ | ||
415 | +#define FILE_HEADER_MAGIC 0x42535442 | ||
416 | + | ||
417 | + | ||
418 | +bts_t * | ||
419 | +bts_load_script(const char* fname, unsigned long* version) | ||
420 | +{ | ||
421 | + bts_t* bts = NULL; | ||
422 | + FILE* fp = fopen(fname, "rb"); | ||
423 | + | ||
424 | + if (NULL != fp) { | ||
425 | + /* Read header */ | ||
426 | + cheader_t header; | ||
427 | + | ||
428 | + /* Read header */ | ||
429 | + if (1 == fread(&header, sizeof(header), 1, fp)) { | ||
430 | + /* Check magic number for correctness */ | ||
431 | + if (header.magic == FILE_HEADER_MAGIC) { | ||
432 | + /* If user wants the version number */ | ||
433 | + if (NULL != version) { | ||
434 | + *version = header.version; | ||
435 | + } | ||
436 | + bts = (bts_t*)fp; | ||
437 | + } | ||
438 | + } | ||
439 | + /* If failed reading the file, close it */ | ||
440 | + if (NULL == bts) { | ||
441 | + fclose(fp); | ||
442 | + } | ||
443 | + } | ||
444 | + return bts; | ||
445 | +} | ||
446 | + | ||
447 | +unsigned long | ||
448 | +bts_next_action(const bts_t* bts_fp, unsigned char* action_buf, | ||
449 | + unsigned long nMaxSize, unsigned short* ptype) | ||
450 | +{ | ||
451 | + unsigned long bytes = 0; | ||
452 | + FILE* fp = (FILE*)bts_fp; | ||
453 | + unsigned char action_hdr[4]; | ||
454 | + | ||
455 | + if (bts_fp == NULL) | ||
456 | + return 0; | ||
457 | + | ||
458 | + /* Each Action has the following: */ | ||
459 | + /* UINT16 type of this action */ | ||
460 | + /* UINT16 size of rest */ | ||
461 | + /* BYTE[] action buffer (for HCI, includes the type byte e.g. 1 for hci command) */ | ||
462 | + | ||
463 | + if (1 == fread(&action_hdr[0], sizeof(action_hdr), 1, fp)) { | ||
464 | + unsigned short type = *(unsigned short*)&action_hdr[0]; | ||
465 | + unsigned short size = *(unsigned short*)&action_hdr[2]; | ||
466 | + | ||
467 | + if (size <= nMaxSize) { | ||
468 | + int nread = fread(action_buf, sizeof(action_buf[0]), size, fp); | ||
469 | + | ||
470 | + if (nread == size) { | ||
471 | + *ptype = type; | ||
472 | + bytes = (unsigned long)size; | ||
473 | + } | ||
474 | + } | ||
475 | + } | ||
476 | + | ||
477 | + return bytes; | ||
478 | +} | ||
479 | + | ||
480 | +void | ||
481 | +bts_unload_script(bts_t* bts_fp) | ||
482 | +{ | ||
483 | + FILE* fp = (FILE*)bts_fp; | ||
484 | + | ||
485 | + if (NULL != fp) { | ||
486 | + fclose(fp); | ||
487 | + } | ||
488 | +} | ||
489 | + | ||
diff --git a/meta-extras/packages/bluez/bluez-utils/hcid.conf b/meta-extras/packages/bluez/bluez-utils/hcid.conf new file mode 100644 index 0000000000..bb935aa23d --- /dev/null +++ b/meta-extras/packages/bluez/bluez-utils/hcid.conf | |||
@@ -0,0 +1,57 @@ | |||
1 | # | ||
2 | # HCI daemon configuration file. | ||
3 | # | ||
4 | |||
5 | # HCId options | ||
6 | options { | ||
7 | # Automatically initialize new devices | ||
8 | autoinit yes; | ||
9 | |||
10 | # Security Manager mode | ||
11 | # none - Security manager disabled | ||
12 | # auto - Use local PIN for incoming connections | ||
13 | # user - Always ask user for a PIN | ||
14 | # | ||
15 | security auto; | ||
16 | |||
17 | # Pairing mode | ||
18 | # none - Pairing disabled | ||
19 | # multi - Allow pairing with already paired devices | ||
20 | # once - Pair once and deny successive attempts | ||
21 | pairing multi; | ||
22 | |||
23 | # Default PIN code for incoming connections | ||
24 | passkey "BlueZ"; | ||
25 | } | ||
26 | |||
27 | # Default settings for HCI devices | ||
28 | device { | ||
29 | # Local device name | ||
30 | # %d - device id | ||
31 | # %h - host name | ||
32 | name "BlueZ (%d)"; | ||
33 | |||
34 | # Local device class | ||
35 | class 0x120112; | ||
36 | |||
37 | # Default packet type | ||
38 | #pkt_type DH1,DM1,HV1; | ||
39 | |||
40 | # Inquiry and Page scan | ||
41 | iscan enable; pscan enable; | ||
42 | |||
43 | # Default link mode | ||
44 | # none - no specific policy | ||
45 | # accept - always accept incoming connections | ||
46 | # master - become master on incoming connections, | ||
47 | # deny role switch on outgoing connections | ||
48 | lm accept; | ||
49 | |||
50 | # Default link policy | ||
51 | # none - no specific policy | ||
52 | # rswitch - allow role switch | ||
53 | # hold - allow hold mode | ||
54 | # sniff - allow sniff mode | ||
55 | # park - allow park mode | ||
56 | lp rswitch,hold,sniff,park; | ||
57 | } | ||
diff --git a/meta-extras/packages/bluez/bluez-utils_3.4.bb b/meta-extras/packages/bluez/bluez-utils_3.4.bb new file mode 100644 index 0000000000..49e6ded250 --- /dev/null +++ b/meta-extras/packages/bluez/bluez-utils_3.4.bb | |||
@@ -0,0 +1,53 @@ | |||
1 | DESCRIPTION = "Linux Bluetooth Stack Userland Utilities." | ||
2 | SECTION = "console" | ||
3 | PRIORITY = "optional" | ||
4 | DEPENDS = "bluez-libs-${PV} dbus" | ||
5 | PROVIDES = "bluez-utils-dbus" | ||
6 | RPROVIDES_${PN} = "bluez-pan bluez-sdp bluez-utils-dbus" | ||
7 | RREPLACES = "bluez-utils-dbus" | ||
8 | RCONFLICTS_${PN} = "bluez-utils-nodbus" | ||
9 | LICENSE = "GPL" | ||
10 | PR = "r1" | ||
11 | |||
12 | SRC_URI = "http://bluez.sourceforge.net/download/bluez-utils-${PV}.tar.gz \ | ||
13 | file://hcid.conf \ | ||
14 | file://02dtl1_cs.sh \ | ||
15 | file://hciattach-ti-bts.patch;patch=1" | ||
16 | |||
17 | # Almost all serial CF cards w/ manfid 0x0000,0x0000 seem to use the bcs protocol | ||
18 | # Let's default to that instead of 'any' until further notice... | ||
19 | SRC_URI += " file://default-manfid-0x0-to-bcps.patch;patch=1" | ||
20 | |||
21 | S = "${WORKDIR}/bluez-utils-${PV}" | ||
22 | |||
23 | EXTRA_OECONF = "--enable-initscripts --enable-bcm203x --enable-hid2hci" | ||
24 | # --enable-obex enable OBEX support | ||
25 | # --enable-alsa enable ALSA support | ||
26 | # --enable-cups install CUPS backend support | ||
27 | # --enable-bccmd install BCCMD interface utility | ||
28 | # --enable-avctrl install Audio/Video control utility | ||
29 | # --enable-hid2hci install HID mode switching utility | ||
30 | # --enable-dfutool install DFU firmware upgrade utility | ||
31 | |||
32 | inherit autotools update-rc.d | ||
33 | |||
34 | INITSCRIPT_NAME = "bluetooth" | ||
35 | INITSCRIPT_PARAMS = "defaults 23 19" | ||
36 | |||
37 | do_install_append() { | ||
38 | install -d ${D}${base_sbindir} ${D}${base_bindir}/ ${D}${sysconfdir}/apm/event.d/ | ||
39 | mv ${D}${sbindir}/* ${D}${base_sbindir}/ | ||
40 | mv ${D}${bindir}/* ${D}${base_bindir}/ | ||
41 | rmdir ${D}${bindir} ${D}${sbindir} | ||
42 | chmod u+s ${D}${base_sbindir}/hciattach ${D}${base_sbindir}/hciconfig | ||
43 | install -m 0644 ${WORKDIR}/hcid.conf ${D}${sysconfdir}/bluetooth/ | ||
44 | install -m 0755 ${WORKDIR}/02dtl1_cs.sh ${D}${sysconfdir}/apm/event.d/ | ||
45 | } | ||
46 | |||
47 | CONFFILES_${PN} = "${sysconfdir}/bluetooth/hcid.conf ${sysconfdir}/bluetooth/rfcomm.conf \ | ||
48 | ${sysconfdir}/default/bluetooth" | ||
49 | |||
50 | PACKAGES =+ "${PN}-ciptool" | ||
51 | FILES_${PN}-ciptool = "/bin/ciptool" | ||
52 | RREPLACES_${PN}-ciptool = "bluez-utils-dbus-ciptool" | ||
53 | RCONFLICTS_${PN}-ciptool = "bluez-utils-dbus-ciptool bluez-utils-nodbus" | ||
diff --git a/meta-extras/packages/bluez/files/02dtl1_cs.sh b/meta-extras/packages/bluez/files/02dtl1_cs.sh new file mode 100644 index 0000000000..fefc72e07a --- /dev/null +++ b/meta-extras/packages/bluez/files/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 | ||
diff --git a/meta-extras/packages/bluez/files/base.patch b/meta-extras/packages/bluez/files/base.patch new file mode 100644 index 0000000000..337c9aa73e --- /dev/null +++ b/meta-extras/packages/bluez/files/base.patch | |||
@@ -0,0 +1,33 @@ | |||
1 | |||
2 | # | ||
3 | # Patch managed by http://www.holgerschurig.de/patcher.html | ||
4 | # | ||
5 | |||
6 | --- bluez-utils-2.17/pcmcia/bluetooth~base.patch | ||
7 | +++ bluez-utils-2.17/pcmcia/bluetooth | ||
8 | @@ -15,9 +15,16 @@ | ||
9 | |||
10 | if [ -r ./shared ]; then . ./shared ; else . /etc/pcmcia/shared ; fi | ||
11 | |||
12 | +# Give the port some time to complete initialization | ||
13 | +sleep 5 | ||
14 | + | ||
15 | # Get device attributes | ||
16 | get_info $DEVICE | ||
17 | |||
18 | +test "$DEVICE" = "ttyS7" && DEVICE="/dev/tts/7" | ||
19 | +test -z "$MANFID" && MANFID="bcsp" | ||
20 | +test "$MANFID" = "0000,0000" && MANFID="bcsp" | ||
21 | + | ||
22 | # | ||
23 | # Serial devices | ||
24 | # | ||
25 | @@ -25,7 +32,7 @@ | ||
26 | IRQ=`setserial /dev/$DEVICE | sed -e 's/.*IRQ: //'` | ||
27 | setserial /dev/$DEVICE irq 0 ; setserial /dev/$DEVICE irq $IRQ | ||
28 | |||
29 | - /usr/sbin/hciattach $DEVICE $MANFID | ||
30 | + /sbin/hciattach $DEVICE $MANFID | ||
31 | } | ||
32 | stop_serial() { | ||
33 | do_fuser -k -HUP /dev/$DEVICE > /dev/null | ||
diff --git a/meta-extras/packages/bluez/files/blueboxes.patch b/meta-extras/packages/bluez/files/blueboxes.patch new file mode 100644 index 0000000000..c429b06c06 --- /dev/null +++ b/meta-extras/packages/bluez/files/blueboxes.patch | |||
@@ -0,0 +1,18 @@ | |||
1 | |||
2 | # | ||
3 | # Patch managed by http://www.holgerschurig.de/patcher.html | ||
4 | # | ||
5 | |||
6 | --- bluez-utils-2.14/pcmcia/bluetooth.conf~base | ||
7 | +++ bluez-utils-2.14/pcmcia/bluetooth.conf | ||
8 | @@ -26,6 +26,10 @@ | ||
9 | version "Brain Boxes", "Bluetooth PC Card" | ||
10 | bind "serial_cs" class "bluetooth" | ||
11 | |||
12 | +card "F+ Bluetooth_Card, BCSP" | ||
13 | + manfid 0x0160, 0xaba0 | ||
14 | + bind "serial_cs" class "bluetooth" | ||
15 | + | ||
16 | card "IBM Bluetooth PC Card II" | ||
17 | version "IBM", "Bluetooth PC Card II" | ||
18 | bind "serial_cs" class "bluetooth" | ||
diff --git a/meta-extras/packages/bluez/files/bluetooth.conf b/meta-extras/packages/bluez/files/bluetooth.conf new file mode 100644 index 0000000000..872084702a --- /dev/null +++ b/meta-extras/packages/bluez/files/bluetooth.conf | |||
@@ -0,0 +1,13 @@ | |||
1 | # | ||
2 | # additional cards for /etc/pcmcia/bluetooth.conf | ||
3 | # Note for OE: This file is _appended_ to the stock | ||
4 | # bluetooth.conf in bluez-utils, so no need to duplicate | ||
5 | # entries for individual cards. | ||
6 | # | ||
7 | card "CSR BT01x0M Bluetooth CF Card" | ||
8 | version "Bluetooth BT0100M", "", "" | ||
9 | bind "serial_cs" class "bluetooth" | ||
10 | |||
11 | card "Socket Bluetooth CF Card Rev. G" | ||
12 | manfid 0x0104, 0x0096 | ||
13 | bind "serial_cs" class "bluetooth" | ||
diff --git a/meta-extras/packages/bluez/files/bluetooth.default b/meta-extras/packages/bluez/files/bluetooth.default new file mode 100644 index 0000000000..4817d38c60 --- /dev/null +++ b/meta-extras/packages/bluez/files/bluetooth.default | |||
@@ -0,0 +1,37 @@ | |||
1 | # Bluetooth configuraton file | ||
2 | |||
3 | # Start of hcid (allowed values are "true" and "false") | ||
4 | HCID_ENABLE=true | ||
5 | |||
6 | # Config file for hcid | ||
7 | HCID_CONFIG="/etc/bluetooth/hcid.conf" | ||
8 | |||
9 | # Start sdpd (allowed values are "true" and "false") | ||
10 | SDPD_ENABLE=true | ||
11 | |||
12 | # Start hidd (allowed values are "true" and "false") | ||
13 | HIDD_ENABLE=true | ||
14 | |||
15 | # Arguments to hidd | ||
16 | HIDD_OPTIONS="" | ||
17 | |||
18 | # Run hid2hci (allowed values are "true" and "false") | ||
19 | HID2HCI_ENABLE=true | ||
20 | |||
21 | # Bind rfcomm devices (allowed values are "true" and "false") | ||
22 | RFCOMM_ENABLE=true | ||
23 | |||
24 | # Config file for rfcomm | ||
25 | RFCOMM_CONFIG="/etc/bluetooth/rfcomm.conf" | ||
26 | |||
27 | # Start dund (allowed values are "true" and "false") | ||
28 | DUND_ENABLE=false | ||
29 | |||
30 | # Arguments to dund | ||
31 | DUND_OPTIONS="--listen --persist" | ||
32 | |||
33 | # Start pand (allowed values are "true" and "false") | ||
34 | PAND_ENABLE=false | ||
35 | |||
36 | # Arguments to pand | ||
37 | PAND_OPTIONS="--listen --role NAP" | ||
diff --git a/meta-extras/packages/bluez/files/default-manfid-0x0-to-bcps.patch b/meta-extras/packages/bluez/files/default-manfid-0x0-to-bcps.patch new file mode 100644 index 0000000000..3d993543b3 --- /dev/null +++ b/meta-extras/packages/bluez/files/default-manfid-0x0-to-bcps.patch | |||
@@ -0,0 +1,22 @@ | |||
1 | |||
2 | # | ||
3 | # Patch managed by http://www.holgerschurig.de/patcher.html | ||
4 | # | ||
5 | |||
6 | --- bluez-utils-2.16/tools/hciattach.c~default-manfid-0x0-to-bcps | ||
7 | +++ bluez-utils-2.16/tools/hciattach.c | ||
8 | @@ -796,13 +796,12 @@ | ||
9 | } | ||
10 | |||
11 | struct uart_t uart[] = { | ||
12 | + { "bcsp", 0x0000, 0x0000, HCI_UART_BCSP, 115200, 115200, 0, bcsp }, | ||
13 | { "any", 0x0000, 0x0000, HCI_UART_H4, 115200, 115200, FLOW_CTL, NULL }, | ||
14 | { "ericsson", 0x0000, 0x0000, HCI_UART_H4, 57600, 115200, FLOW_CTL, ericsson }, | ||
15 | { "digi", 0x0000, 0x0000, HCI_UART_H4, 9600, 115200, FLOW_CTL, digi }, | ||
16 | { "texas", 0x0000, 0x0000, HCI_UART_H4, 115200, 115200, FLOW_CTL, texas }, | ||
17 | |||
18 | - { "bcsp", 0x0000, 0x0000, HCI_UART_BCSP, 115200, 115200, 0, bcsp }, | ||
19 | - | ||
20 | /* Xircom PCMCIA cards: Credit Card Adapter and Real Port Adapter */ | ||
21 | { "xircom", 0x0105, 0x080a, HCI_UART_H4, 115200, 115200, FLOW_CTL, NULL }, | ||
22 | |||
diff --git a/meta-extras/packages/bluez/files/hciattach-ti-bts.patch b/meta-extras/packages/bluez/files/hciattach-ti-bts.patch new file mode 100644 index 0000000000..8fe37de9d3 --- /dev/null +++ b/meta-extras/packages/bluez/files/hciattach-ti-bts.patch | |||
@@ -0,0 +1,489 @@ | |||
1 | --- bluez-utils-2.24/tools/hciattach.c.orig 2005-12-10 15:14:36.000000000 +0100 | ||
2 | +++ bluez-utils-2.24/tools/hciattach.c 2006-01-22 13:56:13.000000000 +0100 | ||
3 | @@ -57,6 +57,8 @@ | ||
4 | #define HCI_UART_3WIRE 2 | ||
5 | #define HCI_UART_H4DS 3 | ||
6 | |||
7 | +#include "ti_bts.h" | ||
8 | + | ||
9 | struct uart_t { | ||
10 | char *type; | ||
11 | int m_id; | ||
12 | @@ -66,6 +68,7 @@ | ||
13 | int speed; | ||
14 | int flags; | ||
15 | int (*init) (int fd, struct uart_t *u, struct termios *ti); | ||
16 | + char *bts; /* bluetooth script */ | ||
17 | }; | ||
18 | |||
19 | #define FLOW_CTL 0x0001 | ||
20 | @@ -241,6 +244,114 @@ | ||
21 | return 0; | ||
22 | } | ||
23 | |||
24 | +static int brf6150(int fd, struct uart_t *u, struct termios *ti) | ||
25 | +{ | ||
26 | + bts_t *bfp; | ||
27 | + int i; | ||
28 | + unsigned long vers; | ||
29 | + unsigned char actionbuf[256]; | ||
30 | + unsigned char resp[128]; /* Response */ | ||
31 | + unsigned long count; | ||
32 | + unsigned short atype; | ||
33 | + | ||
34 | + if (u->bts == NULL) /* no script, ignore */ | ||
35 | + return 0; | ||
36 | + | ||
37 | + bfp = bts_load_script( u->bts, &vers ); | ||
38 | + if (bfp == NULL) | ||
39 | + return -1; | ||
40 | + | ||
41 | + fprintf( stderr, "Loading BTS script version %lu\n", vers ); | ||
42 | + | ||
43 | + while ((count = bts_next_action( bfp, actionbuf, | ||
44 | + sizeof actionbuf - 1, &atype )) != 0) { | ||
45 | + if (atype == ACTION_REMARKS) { | ||
46 | + if (actionbuf[0] != 0) | ||
47 | + fprintf( stderr, "%s\n", actionbuf ); | ||
48 | + } | ||
49 | + else if (atype == ACTION_SEND_COMMAND) { | ||
50 | +#if 0 | ||
51 | + fprintf( stderr, "ACTION_SEND_COMMAND: ", (int)atype ); | ||
52 | + for (i=0; i<count; i++) { | ||
53 | + fprintf( stderr, "0x%02x ", actionbuf[i] ); | ||
54 | + } | ||
55 | + fprintf( stderr, "\n" ); | ||
56 | +#endif | ||
57 | + int n; | ||
58 | + n = write(fd, actionbuf, count); | ||
59 | + if (n < 0 || n < count) { | ||
60 | + perror("Failed to write TI action command"); | ||
61 | + return -1; | ||
62 | + } | ||
63 | + } | ||
64 | + else if (atype == ACTION_WAIT_EVENT) { | ||
65 | + action_wait_t *wait = (action_wait_t *)actionbuf; | ||
66 | +#if 0 | ||
67 | + fprintf( stderr, "ACTION_WAIT_EVENT: %u msec, %u size, data = ", wait->msec, wait->size ); | ||
68 | + for (i=0; i<wait->size; i++) { | ||
69 | + fprintf( stderr, "0x%02x ", wait->data[i] ); | ||
70 | + } | ||
71 | + fprintf( stderr, "\n" ); | ||
72 | +#endif | ||
73 | + usleep(wait->msec); /* seems they give usec, not msec */ | ||
74 | + /* Read reply. */ | ||
75 | + if ((count = read_hci_event(fd, resp, sizeof resp)) < 0) { | ||
76 | + perror("Failed to read TI command response"); | ||
77 | + return -1; | ||
78 | + } | ||
79 | + if (count < wait->size) { | ||
80 | + fprintf( stderr, "TI command response is short."); | ||
81 | + } | ||
82 | + for (i=0; i<wait->size; i++) { | ||
83 | + if (i == 3) continue; /* ignore */ | ||
84 | + if (resp[i] != wait->data[i]) { | ||
85 | + fprintf( stderr, "TI command response does not match expected result.\n" ); | ||
86 | + } | ||
87 | + } | ||
88 | + } | ||
89 | + else if (atype == ACTION_SERIAL_PORT_PARAMETERS) { | ||
90 | + action_serial_t *sercmd = (action_serial_t *)actionbuf; | ||
91 | + | ||
92 | + /* Set actual baudrate */ | ||
93 | + fprintf( stderr, | ||
94 | + "BTS changing baud rate to %u, flow control to %u\n", | ||
95 | + sercmd->baud, sercmd->flow_control ); | ||
96 | + | ||
97 | + tcflush(fd, TCIOFLUSH); | ||
98 | + | ||
99 | + if (sercmd->flow_control) | ||
100 | + ti->c_cflag |= CRTSCTS; | ||
101 | + else | ||
102 | + ti->c_cflag &= ~CRTSCTS; | ||
103 | + if (tcsetattr(fd, TCSANOW, ti) < 0) { | ||
104 | + perror("Can't set port settings"); | ||
105 | + return -1; | ||
106 | + } | ||
107 | + | ||
108 | + u->speed = sercmd->baud; | ||
109 | + | ||
110 | + tcflush(fd, TCIOFLUSH); | ||
111 | + if (set_speed(fd, ti, sercmd->baud) < 0) { | ||
112 | + perror("Can't set baud rate"); | ||
113 | + return -1; | ||
114 | + } | ||
115 | + } | ||
116 | + else if (atype == ACTION_DELAY) { | ||
117 | + action_delay_t *delay = (action_delay_t *)actionbuf; | ||
118 | + usleep(delay->msec); /* seems they give usec, not msec */ | ||
119 | + } | ||
120 | + else { | ||
121 | + fprintf( stderr, "BTS action type = %d: ", (int)atype ); | ||
122 | + for (i=0; i<count; i++) { | ||
123 | + fprintf( stderr, "0x%02x ", actionbuf[i] ); | ||
124 | + } | ||
125 | + fprintf( stderr, "\n" ); | ||
126 | + } | ||
127 | + } | ||
128 | + bts_unload_script( bfp ); | ||
129 | + return 0; | ||
130 | +} | ||
131 | + | ||
132 | static int texas(int fd, struct uart_t *u, struct termios *ti) | ||
133 | { | ||
134 | struct timespec tm = {0, 50000}; | ||
135 | @@ -281,14 +392,25 @@ | ||
136 | } while (resp[4] != cmd[1] && resp[5] != cmd[2]); | ||
137 | |||
138 | /* Verify manufacturer */ | ||
139 | - if ((resp[11] & 0xFF) != 0x0d) | ||
140 | + if (resp[11] != 0x0d) | ||
141 | fprintf(stderr,"WARNING : module's manufacturer is not Texas Instrument\n"); | ||
142 | |||
143 | /* Print LMP version */ | ||
144 | - fprintf(stderr, "Texas module LMP version : 0x%02x\n", resp[10] & 0xFF); | ||
145 | + fprintf(stderr, "TI module LMP version : 0x%02x\n", resp[10]); | ||
146 | |||
147 | /* Print LMP subversion */ | ||
148 | - fprintf(stderr, "Texas module LMP sub-version : 0x%02x%02x\n", resp[14] & 0xFF, resp[13] & 0xFF); | ||
149 | + fprintf(stderr, "TI module LMP sub-version : 0x%02x%02x\n", resp[14], resp[13]); | ||
150 | + if ((resp[14] >> 2) == 3) { | ||
151 | + int err; | ||
152 | + nanosleep(&tm, NULL); | ||
153 | + | ||
154 | + /* BRF6150 */ | ||
155 | + if ((err=brf6150( fd, u, ti )) != 0) { | ||
156 | + fprintf( stderr, "TI script failed (err=%d)\n", | ||
157 | + err ); | ||
158 | + return -1; | ||
159 | + } | ||
160 | + } | ||
161 | |||
162 | nanosleep(&tm, NULL); | ||
163 | return 0; | ||
164 | @@ -953,7 +1075,7 @@ | ||
165 | { | ||
166 | printf("hciattach - HCI UART driver initialization utility\n"); | ||
167 | printf("Usage:\n"); | ||
168 | - printf("\thciattach [-n] [-p] [-b] [-t timeout] [-s initial_speed] <tty> <type | id> [speed] [flow|noflow]\n"); | ||
169 | + printf("\thciattach [-n] [-p] [-b] [-t timeout] [-s initial_speed] [-S bts-script] <tty> <type | id> [speed] [flow|noflow]\n"); | ||
170 | printf("\thciattach -l\n"); | ||
171 | } | ||
172 | |||
173 | @@ -970,11 +1092,12 @@ | ||
174 | pid_t pid; | ||
175 | struct sigaction sa; | ||
176 | char dev[PATH_MAX]; | ||
177 | + char *bts = NULL; | ||
178 | |||
179 | detach = 1; | ||
180 | printpid = 0; | ||
181 | |||
182 | - while ((opt=getopt(argc, argv, "bnpt:s:l")) != EOF) { | ||
183 | + while ((opt=getopt(argc, argv, "bnpt:s:S:l")) != EOF) { | ||
184 | switch(opt) { | ||
185 | case 'b': | ||
186 | send_break = 1; | ||
187 | @@ -996,6 +1119,10 @@ | ||
188 | init_speed = atoi(optarg); | ||
189 | break; | ||
190 | |||
191 | + case 'S': | ||
192 | + bts = optarg; | ||
193 | + break; | ||
194 | + | ||
195 | case 'l': | ||
196 | for (i = 0; uart[i].type; i++) { | ||
197 | printf("%-10s0x%04x,0x%04x\n", uart[i].type, | ||
198 | @@ -1067,6 +1194,8 @@ | ||
199 | if (init_speed) | ||
200 | u->init_speed = init_speed; | ||
201 | |||
202 | + u->bts = bts; | ||
203 | + | ||
204 | memset(&sa, 0, sizeof(sa)); | ||
205 | sa.sa_flags = SA_NOCLDSTOP; | ||
206 | sa.sa_handler = sig_alarm; | ||
207 | --- bluez-utils-2.24/tools/Makefile.am.orig 2005-12-03 07:22:16.000000000 +0100 | ||
208 | +++ bluez-utils-2.24/tools/Makefile.am 2006-01-22 13:53:59.000000000 +0100 | ||
209 | @@ -37,6 +37,9 @@ | ||
210 | |||
211 | noinst_PROGRAMS = hcisecfilter ppporc | ||
212 | |||
213 | +hciattach_SOURCES = hciattach.c ti_bts.h ti_bts.c | ||
214 | +hciattach_LDADD = @BLUEZ_LIBS@ | ||
215 | + | ||
216 | hciconfig_SOURCES = hciconfig.c csr.h csr.c | ||
217 | hciconfig_LDADD = @BLUEZ_LIBS@ $(top_builddir)/common/libtextfile.a | ||
218 | |||
219 | --- bluez-utils-2.24/tools/ti_bts.h.orig 2006-01-22 13:56:38.000000000 +0100 | ||
220 | +++ bluez-utils-2.24/tools/ti_bts.h 2006-01-22 13:53:59.000000000 +0100 | ||
221 | @@ -0,0 +1,116 @@ | ||
222 | +/* | ||
223 | + * Copyright (c) 2005 Texas Instruments, Inc. | ||
224 | + * Ported by SDG Systems, LLC | ||
225 | + * | ||
226 | + * This program is free software; you can redistribute it and/or modify | ||
227 | + * it under the terms of the GNU General Public License version 2 as | ||
228 | + * published by the Free Software Foundation; | ||
229 | + * | ||
230 | + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS | ||
231 | + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
232 | + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. | ||
233 | + * IN NO EVENT SHALL THE COPYRIGHT HOLDER(S) AND AUTHOR(S) BE LIABLE FOR ANY | ||
234 | + * CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES | ||
235 | + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
236 | + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||
237 | + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
238 | + * | ||
239 | + * ALL LIABILITY, INCLUDING LIABILITY FOR INFRINGEMENT OF ANY PATENTS, | ||
240 | + * COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS, RELATING TO USE OF THIS | ||
241 | + * SOFTWARE IS DISCLAIMED. | ||
242 | + * | ||
243 | + */ | ||
244 | + | ||
245 | +#ifndef BT_SCRIPT_H | ||
246 | +#define BT_SCRIPT_H | ||
247 | + | ||
248 | +#ifdef __cplusplus | ||
249 | +extern "C" { | ||
250 | +#endif | ||
251 | + | ||
252 | +/* | ||
253 | + * Define the interface of Bluetooth Script | ||
254 | + */ | ||
255 | + | ||
256 | +typedef void bts_t; | ||
257 | + | ||
258 | + | ||
259 | +#define ACTION_SEND_COMMAND 1 /* Send out raw data (as is) */ | ||
260 | +#define ACTION_WAIT_EVENT 2 /* Wait for data */ | ||
261 | +#define ACTION_SERIAL_PORT_PARAMETERS 3 | ||
262 | +#define ACTION_DELAY 4 | ||
263 | +#define ACTION_RUN_SCRIPT 5 | ||
264 | +#define ACTION_REMARKS 6 | ||
265 | + | ||
266 | +/* | ||
267 | + * Structure for ACTION_SEND_COMMAND | ||
268 | + */ | ||
269 | +typedef struct tagCActionCommand | ||
270 | +{ | ||
271 | + unsigned char data[1]; /* Data to send */ | ||
272 | +} action_command_t; | ||
273 | + | ||
274 | +/* | ||
275 | + * Structure for ACTION_WAIT_EVENT | ||
276 | + */ | ||
277 | +typedef struct tagCActionWaitEvent | ||
278 | +{ | ||
279 | + unsigned long msec; /* in milliseconds */ | ||
280 | + unsigned long size; | ||
281 | + unsigned char data[1]; /* Data to wait for */ | ||
282 | +} action_wait_t; | ||
283 | + | ||
284 | + | ||
285 | +/* | ||
286 | + * Structure for ACTION_SERIAL_PORT_PARAMETERS | ||
287 | + */ | ||
288 | +typedef struct tagCActionSerialPortParameters | ||
289 | +{ | ||
290 | + unsigned long baud; | ||
291 | + unsigned long flow_control; | ||
292 | +} action_serial_t; | ||
293 | + | ||
294 | +/* Flow Control Type */ | ||
295 | +#define FCT_NONE 0 | ||
296 | +#define FCT_HARDWARE 1 | ||
297 | + | ||
298 | +#define DONT_CHANGE 0xFFFFFFFF /* For both baud rate and flow control */ | ||
299 | + | ||
300 | + | ||
301 | +/* | ||
302 | + * Structure for ACTION_DELAY | ||
303 | + */ | ||
304 | +typedef struct tagCActionDelay | ||
305 | +{ | ||
306 | + unsigned long msec; /* in milliseconds */ | ||
307 | +} action_delay_t; | ||
308 | + | ||
309 | +/* | ||
310 | + * Structure for ACTION_RUN_SCRIPT | ||
311 | + */ | ||
312 | +typedef struct tagCActionRunScript | ||
313 | +{ | ||
314 | + char filename[1]; | ||
315 | +} action_run_t; | ||
316 | + | ||
317 | +/* | ||
318 | + * Structure for ACTION_REMARKS | ||
319 | + */ | ||
320 | +typedef struct tagCActionRemarks | ||
321 | +{ | ||
322 | + char m_szRemarks[1]; | ||
323 | +} action_remarks_t; | ||
324 | + | ||
325 | + | ||
326 | +const char *cis_create_filename(const unsigned char* cmdparms); | ||
327 | +bts_t * bts_load_script(const char* fname, unsigned long* version); | ||
328 | +unsigned long bts_next_action(const bts_t* bts_fp, unsigned char* action_buf, | ||
329 | + unsigned long nMaxSize, unsigned short* ptype); | ||
330 | +void bts_unload_script(bts_t* bts_fp); | ||
331 | + | ||
332 | +#ifdef __cplusplus | ||
333 | +}; | ||
334 | +#endif | ||
335 | + | ||
336 | +#endif /* BT_SCRIPT_H */ | ||
337 | + | ||
338 | --- bluez-utils-2.24/tools/ti_bts.c.orig 2006-01-22 13:56:36.000000000 +0100 | ||
339 | +++ bluez-utils-2.24/tools/ti_bts.c 2006-01-22 13:56:31.000000000 +0100 | ||
340 | @@ -0,0 +1,149 @@ | ||
341 | +/* | ||
342 | + * Copyright (c) 2005 Texas Instruments, Inc. | ||
343 | + * Ported by SDG Systems, LLC | ||
344 | + * | ||
345 | + * This program is free software; you can redistribute it and/or modify | ||
346 | + * it under the terms of the GNU General Public License version 2 as | ||
347 | + * published by the Free Software Foundation; | ||
348 | + * | ||
349 | + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS | ||
350 | + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
351 | + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. | ||
352 | + * IN NO EVENT SHALL THE COPYRIGHT HOLDER(S) AND AUTHOR(S) BE LIABLE FOR ANY | ||
353 | + * CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES | ||
354 | + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
355 | + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||
356 | + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
357 | + * | ||
358 | + * ALL LIABILITY, INCLUDING LIABILITY FOR INFRINGEMENT OF ANY PATENTS, | ||
359 | + * COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS, RELATING TO USE OF THIS | ||
360 | + * SOFTWARE IS DISCLAIMED. | ||
361 | + * | ||
362 | + */ | ||
363 | + | ||
364 | + | ||
365 | +#include <stdio.h> | ||
366 | +#include <stdlib.h> | ||
367 | +#include "ti_bts.h" | ||
368 | + | ||
369 | +#ifndef MAKEWORD | ||
370 | +#define MAKEWORD(a, b) ((unsigned short)(((unsigned char)(a)) | ((unsigned short)((unsigned char)(b))) << 8)) | ||
371 | +#endif | ||
372 | + | ||
373 | +#define TI_MANUFACTURER_ID 13 | ||
374 | + | ||
375 | +/* | ||
376 | + * Common Init Script specific | ||
377 | + */ | ||
378 | +const char * | ||
379 | +cis_create_filename(const unsigned char* cmdparms) | ||
380 | +{ | ||
381 | + static char bts_file[50]; | ||
382 | + | ||
383 | + /* Check for TI's id */ | ||
384 | + unsigned short manfid = MAKEWORD(cmdparms[8], cmdparms[9]); | ||
385 | + | ||
386 | + if (TI_MANUFACTURER_ID == manfid) { | ||
387 | + unsigned short version = MAKEWORD(cmdparms[10], cmdparms[11]); | ||
388 | + | ||
389 | + unsigned short chip = (version & 0x7C00) >> 10; | ||
390 | + unsigned short min_ver = (version & 0x007F); | ||
391 | + unsigned short maj_ver = (version & 0x0380) >> 7; | ||
392 | + | ||
393 | + if (0 != (version & 0x8000)) { | ||
394 | + maj_ver |= 0x0008; | ||
395 | + } | ||
396 | + | ||
397 | + sprintf( bts_file, "TIInit_%d.%d.%d.bts", | ||
398 | + (int)chip, (int)maj_ver, (int)min_ver); | ||
399 | + | ||
400 | + return &bts_file[0]; | ||
401 | + } | ||
402 | + return NULL; | ||
403 | +} | ||
404 | + | ||
405 | +typedef struct tagCHeader | ||
406 | +{ | ||
407 | + unsigned long magic; | ||
408 | + unsigned long version; | ||
409 | + unsigned char future[24]; | ||
410 | +} cheader_t; | ||
411 | + | ||
412 | + | ||
413 | +/* The value 0x42535442 stands for (in ASCII) BTSB */ | ||
414 | +/* which is Bluetooth Script Binary */ | ||
415 | +#define FILE_HEADER_MAGIC 0x42535442 | ||
416 | + | ||
417 | + | ||
418 | +bts_t * | ||
419 | +bts_load_script(const char* fname, unsigned long* version) | ||
420 | +{ | ||
421 | + bts_t* bts = NULL; | ||
422 | + FILE* fp = fopen(fname, "rb"); | ||
423 | + | ||
424 | + if (NULL != fp) { | ||
425 | + /* Read header */ | ||
426 | + cheader_t header; | ||
427 | + | ||
428 | + /* Read header */ | ||
429 | + if (1 == fread(&header, sizeof(header), 1, fp)) { | ||
430 | + /* Check magic number for correctness */ | ||
431 | + if (header.magic == FILE_HEADER_MAGIC) { | ||
432 | + /* If user wants the version number */ | ||
433 | + if (NULL != version) { | ||
434 | + *version = header.version; | ||
435 | + } | ||
436 | + bts = (bts_t*)fp; | ||
437 | + } | ||
438 | + } | ||
439 | + /* If failed reading the file, close it */ | ||
440 | + if (NULL == bts) { | ||
441 | + fclose(fp); | ||
442 | + } | ||
443 | + } | ||
444 | + return bts; | ||
445 | +} | ||
446 | + | ||
447 | +unsigned long | ||
448 | +bts_next_action(const bts_t* bts_fp, unsigned char* action_buf, | ||
449 | + unsigned long nMaxSize, unsigned short* ptype) | ||
450 | +{ | ||
451 | + unsigned long bytes = 0; | ||
452 | + FILE* fp = (FILE*)bts_fp; | ||
453 | + unsigned char action_hdr[4]; | ||
454 | + | ||
455 | + if (bts_fp == NULL) | ||
456 | + return 0; | ||
457 | + | ||
458 | + /* Each Action has the following: */ | ||
459 | + /* UINT16 type of this action */ | ||
460 | + /* UINT16 size of rest */ | ||
461 | + /* BYTE[] action buffer (for HCI, includes the type byte e.g. 1 for hci command) */ | ||
462 | + | ||
463 | + if (1 == fread(&action_hdr[0], sizeof(action_hdr), 1, fp)) { | ||
464 | + unsigned short type = *(unsigned short*)&action_hdr[0]; | ||
465 | + unsigned short size = *(unsigned short*)&action_hdr[2]; | ||
466 | + | ||
467 | + if (size <= nMaxSize) { | ||
468 | + int nread = fread(action_buf, sizeof(action_buf[0]), size, fp); | ||
469 | + | ||
470 | + if (nread == size) { | ||
471 | + *ptype = type; | ||
472 | + bytes = (unsigned long)size; | ||
473 | + } | ||
474 | + } | ||
475 | + } | ||
476 | + | ||
477 | + return bytes; | ||
478 | +} | ||
479 | + | ||
480 | +void | ||
481 | +bts_unload_script(bts_t* bts_fp) | ||
482 | +{ | ||
483 | + FILE* fp = (FILE*)bts_fp; | ||
484 | + | ||
485 | + if (NULL != fp) { | ||
486 | + fclose(fp); | ||
487 | + } | ||
488 | +} | ||
489 | + | ||
diff --git a/meta-extras/packages/bluez/files/hciattach_devlength.patch b/meta-extras/packages/bluez/files/hciattach_devlength.patch new file mode 100644 index 0000000000..8d84cb1b00 --- /dev/null +++ b/meta-extras/packages/bluez/files/hciattach_devlength.patch | |||
@@ -0,0 +1,11 @@ | |||
1 | --- bluez-utils-2.21/tools/hciattach.c.orig 2005-12-15 16:29:55.000000000 +0100 | ||
2 | +++ bluez-utils-2.21/tools/hciattach.c 2005-12-15 16:29:37.000000000 +0100 | ||
3 | @@ -973,7 +973,7 @@ | ||
4 | int send_break = 0; | ||
5 | pid_t pid; | ||
6 | struct sigaction sa; | ||
7 | - char dev[20]; | ||
8 | + char dev[25]; | ||
9 | |||
10 | detach = 1; | ||
11 | printpid = 0; | ||
diff --git a/meta-extras/packages/bluez/files/hcid.conf b/meta-extras/packages/bluez/files/hcid.conf new file mode 100644 index 0000000000..44e9c46fb0 --- /dev/null +++ b/meta-extras/packages/bluez/files/hcid.conf | |||
@@ -0,0 +1,72 @@ | |||
1 | # | ||
2 | # HCI daemon configuration file. | ||
3 | # | ||
4 | # $Id: hcid.conf,v 1.4 2004/04/29 20:14:21 holtmann Exp $ | ||
5 | # | ||
6 | |||
7 | # HCId options | ||
8 | options { | ||
9 | # Automatically initialize new devices | ||
10 | autoinit yes; | ||
11 | |||
12 | # Security Manager mode | ||
13 | # none - Security manager disabled | ||
14 | # auto - Use local PIN for incoming connections | ||
15 | # user - Always ask user for a PIN | ||
16 | # | ||
17 | security auto; | ||
18 | |||
19 | # Pairing mode | ||
20 | # none - Pairing disabled | ||
21 | # multi - Allow pairing with already paired devices | ||
22 | # once - Pair once and deny successive attempts | ||
23 | pairing multi; | ||
24 | |||
25 | # PIN helper | ||
26 | pin_helper /bin/bluepin; | ||
27 | |||
28 | # D-Bus PIN helper | ||
29 | # dbus_pin_helper; | ||
30 | } | ||
31 | |||
32 | # Default settings for HCI devices | ||
33 | device { | ||
34 | # Local device name | ||
35 | # %d - device id | ||
36 | # %h - host name | ||
37 | name "%h"; | ||
38 | |||
39 | # Local device class | ||
40 | class 0x120112; | ||
41 | |||
42 | # Default packet type | ||
43 | #pkt_type DH1,DM1,HV1; | ||
44 | |||
45 | # Inquiry and Page scan | ||
46 | iscan enable; pscan enable; | ||
47 | |||
48 | # Default link mode | ||
49 | # none - no specific policy | ||
50 | # accept - always accept incoming connections | ||
51 | # master - become master on incoming connections, | ||
52 | # deny role switch on outgoing connections | ||
53 | # | ||
54 | #lm accept,master; | ||
55 | # | ||
56 | lm accept; | ||
57 | |||
58 | # Default link policy | ||
59 | # none - no specific policy | ||
60 | # rswitch - allow role switch | ||
61 | # hold - allow hold mode | ||
62 | # sniff - allow sniff mode | ||
63 | # park - allow park mode | ||
64 | # | ||
65 | #lp hold,sniff; | ||
66 | # | ||
67 | lp rswitch,hold,sniff,park; | ||
68 | |||
69 | # Authentication and Encryption | ||
70 | #auth enable; | ||
71 | encrypt enable; | ||
72 | } | ||
diff --git a/meta-extras/packages/bluez/files/no-user-include.patch b/meta-extras/packages/bluez/files/no-user-include.patch new file mode 100644 index 0000000000..8c1b1b6d6d --- /dev/null +++ b/meta-extras/packages/bluez/files/no-user-include.patch | |||
@@ -0,0 +1,18 @@ | |||
1 | Do not add -I/usr/include to the compile line just because we will | ||
2 | install bluez-utils there says zecke... | ||
3 | |||
4 | Index: bluez-utils-2.25/acinclude.m4 | ||
5 | =================================================================== | ||
6 | --- bluez-utils-2.25.orig/acinclude.m4 2006-05-18 12:39:57.473577920 +0200 | ||
7 | +++ bluez-utils-2.25/acinclude.m4 2006-05-19 00:58:52.694599848 +0200 | ||
8 | @@ -69,7 +69,9 @@ | ||
9 | ac_save_LDFLAGS=$LDFLAGS | ||
10 | |||
11 | BLUEZ_CFLAGS="" | ||
12 | - test -d "${bluez_prefix}/include" && BLUEZ_CFLAGS="$BLUEZ_CFLAGS -I${bluez_prefix}/include" | ||
13 | + if test "$cross_compiling" = no; then | ||
14 | + test -d "${bluez_prefix}/include" && BLUEZ_CFLAGS="$BLUEZ_CFLAGS -I${bluez_prefix}/include" | ||
15 | + fi | ||
16 | |||
17 | CPPFLAGS="$CPPFLAGS $BLUEZ_CFLAGS" | ||
18 | AC_CHECK_HEADER(bluetooth/bluetooth.h, dummy=yes, AC_MSG_ERROR(Bluetooth header files not found)) | ||
diff --git a/meta-extras/packages/bluez/files/openmn/bluetooth.default b/meta-extras/packages/bluez/files/openmn/bluetooth.default new file mode 100644 index 0000000000..06c52d7960 --- /dev/null +++ b/meta-extras/packages/bluez/files/openmn/bluetooth.default | |||
@@ -0,0 +1,37 @@ | |||
1 | # Bluetooth configuraton file | ||
2 | |||
3 | # Start of hcid (allowed values are "true" and "false") | ||
4 | HCID_ENABLE=true | ||
5 | |||
6 | # Config file for hcid | ||
7 | HCID_CONFIG="/etc/bluetooth/hcid.conf" | ||
8 | |||
9 | # Start sdpd (allowed values are "true" and "false") | ||
10 | SDPD_ENABLE=false | ||
11 | |||
12 | # Start hidd (allowed values are "true" and "false") | ||
13 | HIDD_ENABLE=false | ||
14 | |||
15 | # Arguments to hidd | ||
16 | HIDD_OPTIONS="" | ||
17 | |||
18 | # Run hid2hci (allowed values are "true" and "false") | ||
19 | HID2HCI_ENABLE=false | ||
20 | |||
21 | # Bind rfcomm devices (allowed values are "true" and "false") | ||
22 | RFCOMM_ENABLE=false | ||
23 | |||
24 | # Config file for rfcomm | ||
25 | RFCOMM_CONFIG="/etc/bluetooth/rfcomm.conf" | ||
26 | |||
27 | # Start dund (allowed values are "true" and "false") | ||
28 | DUND_ENABLE=false | ||
29 | |||
30 | # Arguments to dund | ||
31 | DUND_OPTIONS="--listen --persist" | ||
32 | |||
33 | # Start pand (allowed values are "true" and "false") | ||
34 | PAND_ENABLE=false | ||
35 | |||
36 | # Arguments to pand | ||
37 | PAND_OPTIONS="--listen --role NAP" | ||
diff --git a/meta-extras/packages/bluez/files/openmn/hcid.conf b/meta-extras/packages/bluez/files/openmn/hcid.conf new file mode 100644 index 0000000000..46a5d5fd54 --- /dev/null +++ b/meta-extras/packages/bluez/files/openmn/hcid.conf | |||
@@ -0,0 +1,70 @@ | |||
1 | # | ||
2 | # HCI daemon configuration file. | ||
3 | # | ||
4 | # $Id: hcid.conf,v 1.4 2004/04/29 20:14:21 holtmann Exp $ | ||
5 | # | ||
6 | |||
7 | # HCId options | ||
8 | options { | ||
9 | # Automatically initialize new devices | ||
10 | autoinit yes; | ||
11 | |||
12 | # Security Manager mode | ||
13 | # none - Security manager disabled | ||
14 | # auto - Use local PIN for incoming connections | ||
15 | # user - Always ask user for a PIN | ||
16 | # | ||
17 | security auto; | ||
18 | |||
19 | # Pairing mode | ||
20 | # none - Pairing disabled | ||
21 | # multi - Allow pairing with already paired devices | ||
22 | # once - Pair once and deny successive attempts | ||
23 | pairing multi; | ||
24 | |||
25 | # PIN helper | ||
26 | # pin_helper /bin/bluepin; | ||
27 | |||
28 | # D-Bus PIN helper | ||
29 | # dbus_pin_helper; | ||
30 | } | ||
31 | |||
32 | # Default settings for HCI devices | ||
33 | device { | ||
34 | # Local device name | ||
35 | # %d - device id | ||
36 | # %h - host name | ||
37 | name "%h"; | ||
38 | |||
39 | # Local device class | ||
40 | class 0x820100; | ||
41 | |||
42 | # Default packet type | ||
43 | #pkt_type DH1,DM1,HV1; | ||
44 | |||
45 | # Inquiry and Page scan | ||
46 | iscan enable; pscan enable; | ||
47 | |||
48 | # Default link mode | ||
49 | # none - no specific policy | ||
50 | # accept - always accept incoming connections | ||
51 | # master - become master on incoming connections, | ||
52 | # deny role switch on outgoing connections | ||
53 | # | ||
54 | lm accept,master; | ||
55 | |||
56 | # Default link policy | ||
57 | # none - no specific policy | ||
58 | # rswitch - allow role switch | ||
59 | # hold - allow hold mode | ||
60 | # sniff - allow sniff mode | ||
61 | # park - allow park mode | ||
62 | # | ||
63 | #lp hold,sniff; | ||
64 | # | ||
65 | lp rswitch,hold,sniff,park; | ||
66 | |||
67 | # Authentication and Encryption | ||
68 | auth enable; | ||
69 | encrypt enable; | ||
70 | } | ||
diff --git a/meta-extras/packages/bluez/files/openzaurus/bluetooth.default b/meta-extras/packages/bluez/files/openzaurus/bluetooth.default new file mode 100644 index 0000000000..e63ab137cc --- /dev/null +++ b/meta-extras/packages/bluez/files/openzaurus/bluetooth.default | |||
@@ -0,0 +1,37 @@ | |||
1 | # Bluetooth configuraton file | ||
2 | |||
3 | # Start of hcid (allowed values are "true" and "false") | ||
4 | HCID_ENABLE=true | ||
5 | |||
6 | # Config file for hcid | ||
7 | HCID_CONFIG="/etc/bluetooth/hcid.conf" | ||
8 | |||
9 | # Start sdpd (allowed values are "true" and "false") | ||
10 | SDPD_ENABLE=true | ||
11 | |||
12 | # Start hidd (allowed values are "true" and "false") | ||
13 | HIDD_ENABLE=false | ||
14 | |||
15 | # Arguments to hidd | ||
16 | HIDD_OPTIONS="" | ||
17 | |||
18 | # Run hid2hci (allowed values are "true" and "false") | ||
19 | HID2HCI_ENABLE=true | ||
20 | |||
21 | # Bind rfcomm devices (allowed values are "true" and "false") | ||
22 | RFCOMM_ENABLE=true | ||
23 | |||
24 | # Config file for rfcomm | ||
25 | RFCOMM_CONFIG="/etc/bluetooth/rfcomm.conf" | ||
26 | |||
27 | # Start dund (allowed values are "true" and "false") | ||
28 | DUND_ENABLE=false | ||
29 | |||
30 | # Arguments to dund | ||
31 | DUND_OPTIONS="--listen --persist" | ||
32 | |||
33 | # Start pand (allowed values are "true" and "false") | ||
34 | PAND_ENABLE=false | ||
35 | |||
36 | # Arguments to pand | ||
37 | PAND_OPTIONS="--listen --role NAP" | ||
diff --git a/meta-extras/packages/bluez/files/slugos/bluetooth.default b/meta-extras/packages/bluez/files/slugos/bluetooth.default new file mode 100644 index 0000000000..10f628e314 --- /dev/null +++ b/meta-extras/packages/bluez/files/slugos/bluetooth.default | |||
@@ -0,0 +1,37 @@ | |||
1 | # Bluetooth configuraton file | ||
2 | |||
3 | # Start of hcid (allowed values are "true" and "false") | ||
4 | HCID_ENABLE=true | ||
5 | |||
6 | # Config file for hcid | ||
7 | HCID_CONFIG="/etc/bluetooth/hcid.conf" | ||
8 | |||
9 | # Start sdpd (allowed values are "true" and "false") | ||
10 | SDPD_ENABLE=true | ||
11 | |||
12 | # Start hidd (allowed values are "true" and "false") | ||
13 | HIDD_ENABLE=false | ||
14 | |||
15 | # Arguments to hidd | ||
16 | HIDD_OPTIONS="" | ||
17 | |||
18 | # Run hid2hci (allowed values are "true" and "false") | ||
19 | HID2HCI_ENABLE=false | ||
20 | |||
21 | # Bind rfcomm devices (allowed values are "true" and "false") | ||
22 | RFCOMM_ENABLE=true | ||
23 | |||
24 | # Config file for rfcomm | ||
25 | RFCOMM_CONFIG="/etc/bluetooth/rfcomm.conf" | ||
26 | |||
27 | # Start dund (allowed values are "true" and "false") | ||
28 | DUND_ENABLE=true | ||
29 | |||
30 | # Arguments to dund | ||
31 | DUND_OPTIONS="--listen --persist" | ||
32 | |||
33 | # Start pand (allowed values are "true" and "false") | ||
34 | PAND_ENABLE=true | ||
35 | |||
36 | # Arguments to pand | ||
37 | PAND_OPTIONS="--listen --role NAP" | ||
diff --git a/meta-extras/packages/bluez/files/slugos/hcid.conf b/meta-extras/packages/bluez/files/slugos/hcid.conf new file mode 100644 index 0000000000..46a5d5fd54 --- /dev/null +++ b/meta-extras/packages/bluez/files/slugos/hcid.conf | |||
@@ -0,0 +1,70 @@ | |||
1 | # | ||
2 | # HCI daemon configuration file. | ||
3 | # | ||
4 | # $Id: hcid.conf,v 1.4 2004/04/29 20:14:21 holtmann Exp $ | ||
5 | # | ||
6 | |||
7 | # HCId options | ||
8 | options { | ||
9 | # Automatically initialize new devices | ||
10 | autoinit yes; | ||
11 | |||
12 | # Security Manager mode | ||
13 | # none - Security manager disabled | ||
14 | # auto - Use local PIN for incoming connections | ||
15 | # user - Always ask user for a PIN | ||
16 | # | ||
17 | security auto; | ||
18 | |||
19 | # Pairing mode | ||
20 | # none - Pairing disabled | ||
21 | # multi - Allow pairing with already paired devices | ||
22 | # once - Pair once and deny successive attempts | ||
23 | pairing multi; | ||
24 | |||
25 | # PIN helper | ||
26 | # pin_helper /bin/bluepin; | ||
27 | |||
28 | # D-Bus PIN helper | ||
29 | # dbus_pin_helper; | ||
30 | } | ||
31 | |||
32 | # Default settings for HCI devices | ||
33 | device { | ||
34 | # Local device name | ||
35 | # %d - device id | ||
36 | # %h - host name | ||
37 | name "%h"; | ||
38 | |||
39 | # Local device class | ||
40 | class 0x820100; | ||
41 | |||
42 | # Default packet type | ||
43 | #pkt_type DH1,DM1,HV1; | ||
44 | |||
45 | # Inquiry and Page scan | ||
46 | iscan enable; pscan enable; | ||
47 | |||
48 | # Default link mode | ||
49 | # none - no specific policy | ||
50 | # accept - always accept incoming connections | ||
51 | # master - become master on incoming connections, | ||
52 | # deny role switch on outgoing connections | ||
53 | # | ||
54 | lm accept,master; | ||
55 | |||
56 | # Default link policy | ||
57 | # none - no specific policy | ||
58 | # rswitch - allow role switch | ||
59 | # hold - allow hold mode | ||
60 | # sniff - allow sniff mode | ||
61 | # park - allow park mode | ||
62 | # | ||
63 | #lp hold,sniff; | ||
64 | # | ||
65 | lp rswitch,hold,sniff,park; | ||
66 | |||
67 | # Authentication and Encryption | ||
68 | auth enable; | ||
69 | encrypt enable; | ||
70 | } | ||
diff --git a/meta-extras/packages/maemo-mapper/files/fix_segfault.patch b/meta-extras/packages/maemo-mapper/files/fix_segfault.patch new file mode 100644 index 0000000000..23730e8c01 --- /dev/null +++ b/meta-extras/packages/maemo-mapper/files/fix_segfault.patch | |||
@@ -0,0 +1,31 @@ | |||
1 | src/maemo-mapper.c | 10 +++++----- | ||
2 | 1 file changed, 5 insertions(+), 5 deletions(-) | ||
3 | |||
4 | Index: trunk/src/maemo-mapper.c | ||
5 | =================================================================== | ||
6 | --- trunk.orig/src/maemo-mapper.c 2006-11-28 15:11:49.000000000 +0000 | ||
7 | +++ trunk/src/maemo-mapper.c 2006-11-28 22:40:19.000000000 +0000 | ||
8 | @@ -140,8 +140,8 @@ | ||
9 | #define HILDON_HARDKEY_RIGHT GDK_Right | ||
10 | #define HILDON_HARDKEY_SELECT GDK_Return | ||
11 | #define HILDON_HARDKEY_FULLSCREEN GDK_F10 | ||
12 | -#define HILDON_HARDKEY_INCREASE GDK_F6 | ||
13 | -#define HILDON_HARDKEY_DECREASE GDK_F5 | ||
14 | +#define HILDON_HARDKEY_INCREASE GDK_plus | ||
15 | +#define HILDON_HARDKEY_DECREASE GDK_minus | ||
16 | #define HILDON_HARDKEY_ESC GDK_Escape | ||
17 | #define HILDON_COLOR_BUTTON GTK_COLOR_BUTTON | ||
18 | |||
19 | @@ -3117,9 +3117,9 @@ set_conn_state(ConnState new_conn_state) | ||
20 | gtk_widget_destroy(_fix_banner); | ||
21 | _fix_banner = NULL; | ||
22 | } | ||
23 | - if(!_connect_banner) | ||
24 | - _connect_banner = hildon_banner_show_animation( | ||
25 | - _window, NULL, _("Searching for GPS receiver")); | ||
26 | +// if(!_connect_banner) | ||
27 | +// _connect_banner = hildon_banner_show_animation( | ||
28 | +// _window, NULL, _("Searching for GPS receiver")); | ||
29 | break; | ||
30 | case RCVR_UP: | ||
31 | if(_connect_banner) | ||
diff --git a/meta-extras/packages/maemo-mapper/maemo-mapper-nohildon_svn.bb b/meta-extras/packages/maemo-mapper/maemo-mapper-nohildon_svn.bb new file mode 100644 index 0000000000..d3805561f2 --- /dev/null +++ b/meta-extras/packages/maemo-mapper/maemo-mapper-nohildon_svn.bb | |||
@@ -0,0 +1,22 @@ | |||
1 | DESCRIPTION = "GPS navigation/map display software" | ||
2 | LICENSE = "GPL" | ||
3 | DEPENDS = "sqlite3 gtk+ gnome-vfs-dbus dbus bluez-libs" | ||
4 | RDEPENDS = "bluez-utils" | ||
5 | PV = "1.3.2+svn${SRCDATE}" | ||
6 | PR = "r1" | ||
7 | |||
8 | # Only works with SRCDATE="20061114" | ||
9 | SRC_URI = "svn://garage.maemo.org/svn/maemo-mapper;proto=https;module=trunk \ | ||
10 | http://home.tal.org/%7Emilang/n770/maemo-mapper-desktop-20061114-001.patch;patch=1;pnum=0 \ | ||
11 | file://fix_segfault.patch;patch=1" | ||
12 | |||
13 | S = "${WORKDIR}/trunk" | ||
14 | |||
15 | inherit autotools pkgconfig | ||
16 | |||
17 | do_install_append () { | ||
18 | install -d ${D}${datadir}/applications/ | ||
19 | mv ${D}/maemo-mapper.desktop ${D}${datadir}/applications/ | ||
20 | } | ||
21 | |||
22 | #FILES_${PN} += "${datadir}/icons" | ||
diff --git a/meta-extras/packages/sqlite/sqlite3-3.3.7/cross-compile.patch b/meta-extras/packages/sqlite/sqlite3-3.3.7/cross-compile.patch new file mode 100644 index 0000000000..31d4f0d162 --- /dev/null +++ b/meta-extras/packages/sqlite/sqlite3-3.3.7/cross-compile.patch | |||
@@ -0,0 +1,92 @@ | |||
1 | --- sqlite-3.3.7/configure.ac.orig 2006-08-21 00:20:50.000000000 +0200 | ||
2 | +++ sqlite-3.3.7/configure.ac 2006-08-21 00:22:35.000000000 +0200 | ||
3 | @@ -187,10 +187,11 @@ | ||
4 | default_build_cflags="-g" | ||
5 | if test "$config_BUILD_CC" = ""; then | ||
6 | AC_PROG_CC | ||
7 | - if test "$cross_compiling" = "yes"; then | ||
8 | - AC_MSG_ERROR([unable to find a compiler for building build tools]) | ||
9 | - fi | ||
10 | - BUILD_CC=$CC | ||
11 | +# if test "$cross_compiling" = "yes"; then | ||
12 | +# AC_MSG_ERROR([unable to find a compiler for building build tools]) | ||
13 | +# fi | ||
14 | +# BUILD_CC=$CC | ||
15 | +BUILD_CC=gcc | ||
16 | default_build_cflags=$CFLAGS | ||
17 | else | ||
18 | BUILD_CC=$config_BUILD_CC | ||
19 | @@ -238,6 +239,12 @@ | ||
20 | TARGET_LINK=$config_TARGET_LINK | ||
21 | fi | ||
22 | AC_MSG_RESULT($TARGET_LINK) | ||
23 | +if test "$config_TARGET_LFLAGS" != ""; then | ||
24 | + TARGET_LFLAGS=$config_TARGET_LFLAGS | ||
25 | + else | ||
26 | + TARGET_LFLAGS=$BUILD_LFLAGS | ||
27 | + fi | ||
28 | +AC_MSG_RESULT($TARGET_LFLAGS) | ||
29 | AC_MSG_CHECKING([switches on the target compiler]) | ||
30 | if test "$config_TARGET_TFLAGS" != ""; then | ||
31 | TARGET_TFLAGS=$config_TARGET_TFLAGS | ||
32 | @@ -592,15 +599,7 @@ | ||
33 | # Figure out what C libraries are required to compile programs | ||
34 | # that use "readline()" library. | ||
35 | # | ||
36 | -if test "$config_TARGET_READLINE_LIBS" != ""; then | ||
37 | - TARGET_READLINE_LIBS="$config_TARGET_READLINE_LIBS" | ||
38 | -else | ||
39 | - CC=$TARGET_CC | ||
40 | - LIBS="" | ||
41 | - AC_SEARCH_LIBS(tgetent, [readline ncurses curses termcap]) | ||
42 | - AC_CHECK_LIB([readline], [readline]) | ||
43 | - TARGET_READLINE_LIBS="$LIBS" | ||
44 | -fi | ||
45 | +TARGET_READLINE_LIBS="-lreadline" | ||
46 | AC_SUBST(TARGET_READLINE_LIBS) | ||
47 | |||
48 | ########## | ||
49 | @@ -615,41 +614,8 @@ | ||
50 | ########## | ||
51 | # Figure out where to get the READLINE header files. | ||
52 | # | ||
53 | -AC_MSG_CHECKING([readline header files]) | ||
54 | -found=no | ||
55 | -if test "$config_TARGET_READLINE_INC" != ""; then | ||
56 | - TARGET_READLINE_INC=$config_TARGET_READLINE_INC | ||
57 | - found=yes | ||
58 | -fi | ||
59 | -if test "$found" = "yes"; then | ||
60 | - AC_MSG_RESULT($TARGET_READLINE_INC) | ||
61 | -else | ||
62 | - AC_MSG_RESULT(not specified: still searching...) | ||
63 | - AC_CHECK_HEADER(readline.h, [found=yes]) | ||
64 | -fi | ||
65 | -if test "$found" = "no"; then | ||
66 | - for dir in /usr /usr/local /usr/local/readline /usr/contrib /mingw; do | ||
67 | - AC_CHECK_FILE($dir/include/readline.h, found=yes) | ||
68 | - if test "$found" = "yes"; then | ||
69 | - TARGET_READLINE_INC="-I$dir/include" | ||
70 | - break | ||
71 | - fi | ||
72 | - AC_CHECK_FILE($dir/include/readline/readline.h, found=yes) | ||
73 | - if test "$found" = "yes"; then | ||
74 | - TARGET_READLINE_INC="-I$dir/include/readline" | ||
75 | - break | ||
76 | - fi | ||
77 | - done | ||
78 | -fi | ||
79 | -if test "$found" = "yes"; then | ||
80 | - if test "$TARGET_READLINE_LIBS" = ""; then | ||
81 | - TARGET_HAVE_READLINE=0 | ||
82 | - else | ||
83 | - TARGET_HAVE_READLINE=1 | ||
84 | - fi | ||
85 | -else | ||
86 | - TARGET_HAVE_READLINE=0 | ||
87 | -fi | ||
88 | +TARGET_READLINE_INC="" | ||
89 | +TARGET_HAVE_READLINE=1 | ||
90 | AC_SUBST(TARGET_READLINE_INC) | ||
91 | AC_SUBST(TARGET_HAVE_READLINE) | ||
92 | |||
diff --git a/meta-extras/packages/sqlite/sqlite3-3.3.7/ldflags.patch b/meta-extras/packages/sqlite/sqlite3-3.3.7/ldflags.patch new file mode 100644 index 0000000000..ee5105ffff --- /dev/null +++ b/meta-extras/packages/sqlite/sqlite3-3.3.7/ldflags.patch | |||
@@ -0,0 +1,67 @@ | |||
1 | --- sqlite-3.3.7/Makefile.in.orig 2006-08-20 23:05:36.000000000 +0200 | ||
2 | +++ sqlite-3.3.7/Makefile.in 2006-08-20 23:42:49.000000000 +0200 | ||
3 | @@ -31,6 +31,10 @@ | ||
4 | # | ||
5 | TCC = @TARGET_CC@ @TARGET_CFLAGS@ -I. -I${TOP}/src | ||
6 | |||
7 | +# OE overrides | ||
8 | +# | ||
9 | +TARGET_LFLAGS = @TARGET_LFLAGS@ | ||
10 | + | ||
11 | # Define -DNDEBUG to compile without debugging (i.e., for production usage) | ||
12 | # Omitting the define will cause extra debugging code to be inserted and | ||
13 | # includes extra comments when "EXPLAIN stmt" is used. | ||
14 | @@ -257,17 +261,17 @@ | ||
15 | | $(NAWK) '{print $$5,$$6}' >last_change | ||
16 | |||
17 | libsqlite3.la: $(LIBOBJ) | ||
18 | - $(LTLINK) -o libsqlite3.la $(LIBOBJ) $(LIBPTHREAD) \ | ||
19 | + $(LTLINK) -o libsqlite3.la $(LIBOBJ) $(TARGET_LFLAGS) $(LIBPTHREAD) \ | ||
20 | ${ALLOWRELEASE} -rpath $(libdir) -version-info "8:6:8" | ||
21 | |||
22 | libtclsqlite3.la: tclsqlite.lo libsqlite3.la | ||
23 | $(LTLINK) -o libtclsqlite3.la tclsqlite.lo \ | ||
24 | - $(LIBOBJ) @TCL_STUB_LIB_SPEC@ $(LIBPTHREAD) \ | ||
25 | + $(LIBOBJ) @TCL_STUB_LIB_SPEC@ $(TARGET_LFLAGS) $(LIBPTHREAD) \ | ||
26 | -rpath $(libdir)/sqlite \ | ||
27 | -version-info "8:6:8" | ||
28 | |||
29 | sqlite3$(TEXE): $(TOP)/src/shell.c libsqlite3.la sqlite3.h | ||
30 | - $(LTLINK) $(READLINE_FLAGS) $(LIBPTHREAD) \ | ||
31 | + $(LTLINK) $(TARGET_LFLAGS) $(READLINE_FLAGS) $(LIBPTHREAD) \ | ||
32 | -o $@ $(TOP)/src/shell.c libsqlite3.la \ | ||
33 | $(LIBREADLINE) $(TLIBS) | ||
34 | |||
35 | @@ -456,12 +460,12 @@ | ||
36 | |||
37 | tclsqlite3: tclsqlite-shell.lo libsqlite3.la | ||
38 | $(LTLINK) -o tclsqlite3 tclsqlite-shell.lo \ | ||
39 | - libsqlite3.la $(LIBTCL) | ||
40 | + libsqlite3.la $(TARGET_LFLAGS) $(LIBTCL) | ||
41 | |||
42 | testfixture$(TEXE): $(TOP)/src/tclsqlite.c libsqlite3.la $(TESTSRC) | ||
43 | $(LTLINK) -DTCLSH=1 -DSQLITE_TEST=1 -DSQLITE_CRASH_TEST=1 \ | ||
44 | $(TEMP_STORE) -o testfixture $(TESTSRC) $(TOP)/src/tclsqlite.c \ | ||
45 | - libsqlite3.la $(LIBTCL) | ||
46 | + libsqlite3.la $(TARGET_LFLAGS) $(LIBTCL) | ||
47 | |||
48 | |||
49 | fulltest: testfixture$(TEXE) sqlite3$(TEXE) | ||
50 | @@ -471,7 +475,7 @@ | ||
51 | ./testfixture $(TOP)/test/quick.test | ||
52 | |||
53 | sqlite3_analyzer$(TEXE): $(TOP)/src/tclsqlite.c libtclsqlite3.la \ | ||
54 | - $(TESTSRC) $(TOP)/tool/spaceanal.tcl | ||
55 | + $(TARGET_LFLAGS) $(TESTSRC) $(TOP)/tool/spaceanal.tcl | ||
56 | sed \ | ||
57 | -e '/^#/d' \ | ||
58 | -e 's,\\,\\\\,g' \ | ||
59 | @@ -481,7 +485,7 @@ | ||
60 | $(TOP)/tool/spaceanal.tcl >spaceanal_tcl.h | ||
61 | $(LTLINK) -DTCLSH=2 -DSQLITE_TEST=1 $(TEMP_STORE)\ | ||
62 | -o sqlite3_analyzer$(EXE) $(TESTSRC) $(TOP)/src/tclsqlite.c \ | ||
63 | - libtclsqlite3.la $(LIBTCL) | ||
64 | + libtclsqlite3.la $(TARGET_LFLAGS) $(LIBTCL) | ||
65 | |||
66 | # Rules used to build documentation | ||
67 | # | ||
diff --git a/meta-extras/packages/sqlite/sqlite3-3.3.7/libtool.patch b/meta-extras/packages/sqlite/sqlite3-3.3.7/libtool.patch new file mode 100644 index 0000000000..ccf9993ed2 --- /dev/null +++ b/meta-extras/packages/sqlite/sqlite3-3.3.7/libtool.patch | |||
@@ -0,0 +1,25 @@ | |||
1 | Index: sqlite-3.2.1/Makefile.in | ||
2 | =================================================================== | ||
3 | --- sqlite-3.2.1.orig/Makefile.in 2005-03-23 17:09:39.000000000 +0100 | ||
4 | +++ sqlite-3.2.1/Makefile.in 2005-04-25 23:11:20.000000000 +0200 | ||
5 | @@ -15,7 +15,10 @@ | ||
6 | # The toplevel directory of the source tree. This is the directory | ||
7 | # that contains this "Makefile.in" and the "configure.in" script. | ||
8 | # | ||
9 | -TOP = @srcdir@ | ||
10 | +TOP = $(srcdir) | ||
11 | +srcdir = @srcdir@ | ||
12 | +top_srcdir = @top_srcdir@ | ||
13 | +top_builddir = . | ||
14 | |||
15 | # C Compiler and options for use in building executables that | ||
16 | # will run on the platform that is doing the build. | ||
17 | @@ -96,7 +99,7 @@ | ||
18 | exec_prefix = @exec_prefix@ | ||
19 | libdir = @libdir@ | ||
20 | INSTALL = @INSTALL@ | ||
21 | -LIBTOOL = ./libtool | ||
22 | +LIBTOOL = @LIBTOOL@ | ||
23 | ALLOWRELEASE = @ALLOWRELEASE@ | ||
24 | |||
25 | # libtool compile/link/install | ||
diff --git a/meta-extras/packages/sqlite/sqlite3.inc b/meta-extras/packages/sqlite/sqlite3.inc new file mode 100644 index 0000000000..01290c2e41 --- /dev/null +++ b/meta-extras/packages/sqlite/sqlite3.inc | |||
@@ -0,0 +1,44 @@ | |||
1 | DESCRIPTION = "An Embeddable SQL Database Engine" | ||
2 | SECTION = "libs" | ||
3 | PRIORITY = "optional" | ||
4 | DEPENDS = "readline ncurses" | ||
5 | LICENSE = "PD" | ||
6 | |||
7 | SRC_URI = "http://www.sqlite.org/sqlite-${PV}.tar.gz \ | ||
8 | file://cross-compile.patch;patch=1 \ | ||
9 | file://libtool.patch;patch=1 \ | ||
10 | file://ldflags.patch;patch=1" | ||
11 | S = "${WORKDIR}/sqlite-${PV}" | ||
12 | |||
13 | inherit autotools pkgconfig | ||
14 | |||
15 | EXTRA_OECONF = "--disable-tcl --enable-shared \ | ||
16 | --enable-threadsafe" | ||
17 | export config_BUILD_CC = "${BUILD_CC}" | ||
18 | export config_BUILD_CFLAGS = "${BUILD_CFLAGS}" | ||
19 | export config_BUILD_LIBS = "${BUILD_LDFLAGS}" | ||
20 | export config_TARGET_CC = "${CC}" | ||
21 | export config_TARGET_LINK = "${CCLD}" | ||
22 | export config_TARGET_CFLAGS = "${CFLAGS}" | ||
23 | export config_TARGET_LFLAGS = "${LDFLAGS}" | ||
24 | |||
25 | do_compile_prepend() { | ||
26 | oe_runmake sqlite3.h | ||
27 | install -m 0644 sqlite3.h ${STAGING_INCDIR} | ||
28 | } | ||
29 | |||
30 | do_stage() { | ||
31 | oe_libinstall -so libsqlite3 ${STAGING_LIBDIR} | ||
32 | } | ||
33 | |||
34 | #do_install() { | ||
35 | # oe_runmake install DESTDIR=${D} prefix=${prefix} exec_prefix=${exec_prefix} | ||
36 | #} | ||
37 | |||
38 | PACKAGES = "libsqlite libsqlite-dev libsqlite-doc sqlite3 sqlite3-dbg" | ||
39 | FILES_sqlite3 = "${bindir}/*" | ||
40 | FILES_libsqlite = "${libdir}/*.so.*" | ||
41 | FILES_libsqlite-dev = "${libdir}/*.a ${libdir}/*.la ${libdir}/*.so \ | ||
42 | ${libdir}/pkgconfig ${includedir}" | ||
43 | FILES_libsqlite-doc = "${docdir} ${mandir} ${infodir}" | ||
44 | AUTO_LIBNAME_PKGS = "libsqlite" | ||
diff --git a/meta-extras/packages/sqlite/sqlite3_3.3.7.bb b/meta-extras/packages/sqlite/sqlite3_3.3.7.bb new file mode 100644 index 0000000000..d21fb6ad3e --- /dev/null +++ b/meta-extras/packages/sqlite/sqlite3_3.3.7.bb | |||
@@ -0,0 +1,2 @@ | |||
1 | require sqlite3.inc | ||
2 | PR = "r2" | ||