bluez: Update bluez4 version from OE.dev and drop bluez 3.x

Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
This commit is contained in:
Richard Purdie 2009-06-01 14:17:44 +01:00
parent 3051258e33
commit 4ae5537fff
15 changed files with 139 additions and 408 deletions

View File

@ -1,21 +0,0 @@
DESCRIPTION = "Linux Bluetooth Stack Userland Libaries."
SECTION = "libs"
PRIORITY = "optional"
HOMEPAGE = "http://www.bluez.org"
LICENSE = "GPL"
SRC_URI = "http://bluez.sourceforge.net/download/bluez-libs-${PV}.tar.gz"
inherit autotools pkgconfig
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"
do_stage() {
oe_libinstall -a -so -C src libbluetooth ${STAGING_LIBDIR}
install -d ${STAGING_INCDIR}/bluetooth/
for f in ${HEADERS}
do
install -m 0644 include/$f ${STAGING_INCDIR}/bluetooth/$f
done
}

View File

@ -1 +0,0 @@
require bluez-libs.inc

View File

@ -1,57 +0,0 @@
#
# HCI daemon configuration file.
#
# HCId options
options {
# Automatically initialize new devices
autoinit yes;
# Security Manager mode
# none - Security manager disabled
# auto - Use local PIN for incoming connections
# user - Always ask user for a PIN
#
security auto;
# Pairing mode
# none - Pairing disabled
# multi - Allow pairing with already paired devices
# once - Pair once and deny successive attempts
pairing multi;
# Default PIN code for incoming connections
passkey "1234";
}
# Default settings for HCI devices
device {
# Local device name
# %d - device id
# %h - host name
name "%h (%d)";
# Local device class
class 0x120112;
# Default packet type
#pkt_type DH1,DM1,HV1;
# Inquiry and Page scan
iscan enable; pscan enable;
# Default link mode
# none - no specific policy
# accept - always accept incoming connections
# master - become master on incoming connections,
# deny role switch on outgoing connections
lm accept;
# Default link policy
# none - no specific policy
# rswitch - allow role switch
# hold - allow hold mode
# sniff - allow sniff mode
# park - allow park mode
lp rswitch,hold,sniff,park;
}

View File

@ -1,141 +0,0 @@
DESCRIPTION = "Linux Bluetooth Stack Userland Utilities."
SECTION = "console"
PRIORITY = "optional"
DEPENDS = "gstreamer gst-plugins-base bluez-libs-${PV} libusb-compat dbus glib-2.0"
PROVIDES = "bluez-utils-dbus"
RPROVIDES_${PN} = "bluez-pan bluez-sdp bluez-utils-dbus"
RREPLACES = "bluez-utils-dbus"
RCONFLICTS_${PN} = "bluez-utils-nodbus"
LICENSE = "GPL"
FILESPATH = "${FILE_DIRNAME}/bluez-utils-${PV}:${FILE_DIRNAME}/bluez-utils"
S = "${WORKDIR}/bluez-utils-${PV}"
inherit autotools update-rc.d
EXTRA_OECONF = " \
--enable-bccmd \
--enable-hid2hci \
--enable-alsa \
--enable-cups \
--enable-glib \
--disable-sdpd \
--enable-network \
--enable-serial \
--enable-input \
--enable-audio \
--enable-echo \
--enable-configfile \
--enable-initscripts \
--enable-test \
"
# The config options are explained below:
# --enable-obex enable OBEX support
# --enable-alsa enable ALSA support, not needed for nokia770, nokia800 and om-gtao1
# --enable-cups install CUPS backend support
# --enable-bccmd install BCCMD interface utility
# --enable-avctrl install Audio/Video control utility
# --enable-hid2hci install HID mode switching utility
# --enable-dfutool install DFU firmware upgrade utility
# --enable-glib For systems that use and install GLib anyway
# --disable-sdpd The sdpd is obsolete and should no longer be used. This of course requires that hcid will be started with -s to enable the SDP server
#Following services can be enabled so far:
# --enable-network
# --enable-serial
# --enable-input
# --enable-audio
# --enable-echo
#There is no need to modify any init script. They will be started
#automatically or on demand. Only /etc/bluetooth/*.service files should
#be patched to change name or the autostart value.
# --enable-configfile
# --enable-initscripts
#For even smaller -doc packages
# --disable-manpages
# --disable-pcmciarules
#I haven't seen any embedded device with HID proxy support. So simply
#disable it:
# --disable-hid2hci
OE_LT_RPATH_ALLOW = "any"
OE_LT_RPATH_ALLOW[export]="1"
do_install_append() {
install -d ${D}${base_sbindir} ${D}${base_bindir}/ ${D}${sysconfdir}/apm/event.d/
if [ "${sbindir}" != "${base_sbindir}" ]; then
mv ${D}${sbindir}/* ${D}${base_sbindir}/
rmdir ${D}${sbindir}
fi
if [ "${bindir}" != "${base_bindir}" ]; then
mv ${D}${bindir}/* ${D}${base_bindir}/
rmdir ${D}${bindir}
fi
chmod u+s ${D}${base_sbindir}/hciattach ${D}${base_sbindir}/hciconfig
install -m 0644 ${WORKDIR}/hcid.conf ${D}${sysconfdir}/bluetooth/
install -m 0644 ${S}/rfcomm/rfcomm.conf ${D}${sysconfdir}/bluetooth/
install -m 0755 ${S}/daemon/.libs/passkey-agent ${D}${base_bindir}/ ||true
install -m 0755 ${S}/test/.libs/passkey-agent ${D}${base_bindir}/ ||true
}
INITSCRIPT_NAME = "bluetooth"
INITSCRIPT_PARAMS = "defaults 23 19"
PACKAGES =+ "${PN}-compat"
FILES_${PN} = " \
${base_sbindir}/hcid \
${libdir}/bluetooth \
${sysconfdir}/init.d/bluetooth \
${sysconfdir}/bluetooth/*.service \
${sysconfdir}/bluetooth/hcid.conf \
${sysconfdir}/default \
${sysconfdir}/dbus-1 \
${base_sbindir}/hciattach \
"
FILES_${PN}-dbg += " \
${libdir}/bluetooth/.debug \
${libdir}/cups/backend/.debug \
${libdir}/alsa-lib/.debug \
"
FILES_${PN}-compat = " \
${base_bindir}/sdptool \
${base_bindir}/dund \
${base_bindir}/rctest \
${base_bindir}/ciptool \
${base_bindir}/l2test \
${base_bindir}/rfcomm \
${base_bindir}/hcitool \
${base_bindir}/pand \
${base_bindir}/hidd \
${base_bindir}/l2ping \
${base_sbindir}/hciconfig \
${base_sbindir}/bccmd \
${base_sbindir}/hciemu \
${base_sbindir}/hid2hci \
${base_bindir}/passkey-agent \
${sysconfdir}/bluetooth/rfcomm.conf \
"

View File

@ -1,64 +0,0 @@
require bluez-utils3.inc
PR = "r1"
SRC_URI = "http://bluez.sourceforge.net/download/bluez-utils-${PV}.tar.gz \
file://hcid.conf \
"
# see bluez-utils3.inc for the explanation of these option
EXTRA_OECONF = " \
--enable-bccmd \
--enable-hid2hci \
--enable-hidd \
--enable-pand \
--enable-dund \
--disable-alsa \
--disable-cups \
--enable-glib \
--disable-sdpd \
--enable-network \
--enable-serial \
--enable-input \
--enable-audio \
--enable-echo \
--enable-configfile \
--enable-initscripts \
--enable-test \
"
CONFFILES_${PN} = " \
${sysconfdir}/bluetooth/hcid.conf \
${sysconfdir}/default/bluetooth \
"
CONFFILES_${PN}-compat = " \
${sysconfdir}/bluetooth/rfcomm.conf \
"
PACKAGES =+ "bluez-audio"
FILES_${PN} = " \
${base_sbindir}/hcid \
${libdir}/bluetooth/plugins/*.so \
${sysconfdir}/init.d/bluetooth \
${sysconfdir}/bluetooth/hcid.conf \
${sysconfdir}/default \
${sysconfdir}/dbus-1 \
${base_sbindir}/hciattach \
"
FILES_bluez-audio = " \
${libdir}/bluetooth/plugins/libaudio.so \
${libdir}/gstreamer-0.10/*.so \
"
FILES_${PN}-dbg += " \
${libdir}/bluetooth/plugins/.debug \
${libdir}/gstreamer-0.10/.debug \
"
FILES_${PN}-dev += " \
${libdir}/bluetooth/plugins/*.la \
${libdir}/gstreamer-0.10/*.la \
"

View File

@ -1,41 +0,0 @@
DESCRIPTION = "BlueZ - Bluetooth protocol stack for Linux"
SECTION = "console"
PRIORITY = "optional"
DEPENDS = "gstreamer gst-plugins-base libusb dbus"
PROVIDES = "bluez-utils-dbus"
RPROVIDES_${PN} = "bluez-pan bluez-sdp bluez-utils-dbus"
RREPLACES_${PN} = "bluez-utils-dbus"
RCONFLICTS_${PN} = "bluez-utils-nodbus"
LICENSE = "GPL"
SRC_URI = "http://www.kernel.org/pub/linux/bluetooth/bluez-${PV}.tar.gz"
S = "${WORKDIR}/bluez-${PV}"
inherit autotools update-rc.d pkgconfig
INITSCRIPT_NAME = "bluetooth"
INITSCRIPT_PARAMS = "defaults 23 19"
do_install_append() {
install -d ${D}${base_sbindir} ${D}${base_bindir}/
echo base_sbindir is: ${D}${base_sbindir}
mv ${D}${sbindir}/* ${D}${base_sbindir}/
mv ${D}${bindir}/* ${D}${base_bindir}/
rmdir ${D}${bindir} ${D}${sbindir}
chmod u+s ${D}${base_sbindir}/hciattach ${D}${base_sbindir}/hciconfig
}
PACKAGES =+ "${PN}-alsa ${PN}-alsa-dev gst-plugin-bluez gst-plugin-bluez-dev ${PN}-lib ${PN}-lib-dev ${PN}-lib-dbg"
FILES_${PN}-alsa = " ${libdir}/alsa-lib/*.so "
FILES_${PN}-alsa-dev += " ${libdir}/alsa-lib/*.la "
FILES_gst-plugin-bluez = "${libdir}/gstreamer-*/*.so"
FILES_gst-plugin-bluez-dev = "${libdir}/gstreamer-*/*.la"
FILES_${PN}-lib = "${libdir}/libbluetooth.so.*"
FILES_${PN}-lib-dev = "${libdir}/libbluetooth.so \
${libdir}/*.la \
${includedir}/bluetooth \
${libdir}/pkgconfig/bluez.pc \
"

View File

@ -0,0 +1,16 @@
<!-- This configuration file specifies the required security policies
for Bluetooth core daemon to work. -->
<!DOCTYPE busconfig PUBLIC "-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN"
"http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
<busconfig>
<!-- ../system.conf have denied everything, so we just punch some holes -->
<policy context="default">
<allow own="org.bluez"/>
<allow send_destination="org.bluez"/>
<allow send_interface="org.bluez.Agent"/>
</policy>
</busconfig>

View File

@ -0,0 +1,13 @@
Index: bluez-4.27/tools/dfutool.c
===================================================================
--- bluez-4.27.orig/tools/dfutool.c
+++ bluez-4.27/tools/dfutool.c
@@ -59,7 +59,7 @@
#endif
#ifdef NEED_USB_GET_BUSSES
-static inline struct usb_bus *usb_get_busses(void)
+inline struct usb_bus *usb_get_busses(void)
{
return usb_busses;
}

View File

@ -0,0 +1,33 @@
# Signed-off-by: Khem Raj <raj.khem@gmail.com>
#
# Use the new usb1 API for usb_init() and check for fails from
# usb_init (). Currently we see a crash on a system which does
# not have USB because usb_init() fails and it cleans up all initialized
# data (e.g. ctx) which is used in subsequent calls to libusb
# We return immediately if usb_init() fails for some reason.
Index: bluez-4.24/tools/hid2hci.c
===================================================================
--- bluez-4.24.orig/tools/hid2hci.c 2008-10-25 23:40:34.000000000 -0700
+++ bluez-4.24/tools/hid2hci.c 2008-12-29 22:06:04.000000000 -0800
@@ -337,7 +337,7 @@
int main(int argc, char *argv[])
{
struct device_info dev[16];
- int i, opt, num, quiet = 0, mode = HCI;
+ int i, ret, opt, num, quiet = 0, mode = HCI;
while ((opt = getopt_long(argc, argv, "+01qh", main_options, NULL)) != -1) {
switch (opt) {
@@ -361,8 +361,9 @@
argc -= optind;
argv += optind;
optind = 0;
-
- usb_init();
+ ret = libusb_init();
+ if (ret < 0)
+ return ret;
num = find_devices(mode, dev, sizeof(dev) / sizeof(dev[0]));
if (num <= 0) {

View File

@ -0,0 +1,11 @@
--- bluez/sbc/sbc_math.h~ 2008-03-05 20:18:03.000000000 +0000
+++ bluez/sbc/sbc_math.h 2008-10-27 13:39:27.000000000 +0000
@@ -59,7 +59,7 @@
#define SBC_FIXED_0(val) { val = 0; }
#define MUL(a, b) ((a) * (b))
-#ifdef __arm__
+#if defined(__arm__) && !defined(__thumb__)
#define MULA(a, b, res) ({ \
int tmp = res; \
__asm__( \

View File

@ -1,50 +0,0 @@
require bluez4.inc
DEPENDS += "glib-2.0"
PR = "r4"
PACKAGES =+ "${PN}-compat"
CONFFILES_${PN} = " \
${sysconfdir}/bluetooth/main.conf \
"
CONFFILES_${PN}-compat = " \
${sysconfdir}/bluetooth/rfcomm.conf \
"
FILES_${PN} = " \
${base_sbindir}/bluetoothd \
${libdir}/bluetooth \
${sysconfdir}/init.d/bluetooth \
${sysconfdir}/bluetooth/*.service \
${sysconfdir}/bluetooth/main.conf \
${sysconfdir}/default \
${sysconfdir}/dbus-1 \
${base_sbindir}/hciattach \
${base_sbindir}/hid2hci \
"
FILES_${PN}-dbg += " \
${libdir}/bluetooth/.debug \
${libdir}/cups/backend/.debug \
${libdir}/alsa-lib/.debug \
"
FILES_${PN}-lib-dbg += " ${libdir}/bluetooth/plugins/.debug/*.so"
FILES_${PN}-compat = " \
${base_sbindir}/bccmd \
${base_sbindir}/hciconfig \
${base_bindir}/ciptool \
${base_bindir}/dfutool \
${base_bindir}/dund \
${base_bindir}/hcitool \
${base_bindir}/hidd \
${base_bindir}/l2ping \
${base_bindir}/pand \
${base_bindir}/rfcomm \
${base_bindir}/sdptool \
${sysconfdir}/bluetooth/rfcomm.conf \
"

View File

@ -0,0 +1,66 @@
DESCRIPTION = "Linux Bluetooth Stack Userland V4"
SECTION = "libs"
PRIORITY = "optional"
DEPENDS = "gst-plugins-base alsa-lib libusb-compat dbus-glib"
HOMEPAGE = "http://www.bluez.org"
LICENSE = "GPL"
# For angstrom we want this to replace at least bluez-libs
PROVIDES_append_angstrom = " bluez-utils bluez-libs"
ASNEEDED = ""
SRC_URI = "\
http://www.kernel.org/pub/linux/bluetooth/bluez-${PV}.tar.gz \
file://fix-dfutool-usb-declaration-mismatch.patch;patch=1 \
file://sbc-thumb.patch;patch=1 \
file://bluetooth.conf \
"
S = "${WORKDIR}/bluez-${PV}"
inherit autotools_stage
AUTOTOOLS_STAGE_PKGCONFIG = "1"
EXTRA_OECONF = "\
--enable-gstreamer \
--enable-alsa \
--enable-usb \
--enable-netlink \
--enable-tools \
--enable-bccmd \
--enable-hid2hci \
--enable-dfutool \
--enable-hidd \
--enable-pandd \
--enable-dund \
--disable-cups \
--enable-test \
--enable-manpages \
--enable-configfiles \
--enable-initscripts \
--disable-pcmciarules \
"
do_install_append() {
install -m 0644 ${S}/audio/audio.conf ${D}/${sysconfdir}/bluetooth/
install -m 0644 ${S}/network/network.conf ${D}/${sysconfdir}/bluetooth/
install -m 0644 ${S}/input/input.conf ${D}/${sysconfdir}/bluetooth/
# at_console doesn't really work with the current state of OE, so punch some more holes so people can actually use BT
install -m 0644 ${WORKDIR}/bluetooth.conf ${D}/${sysconfdir}/dbus-1/system.d/
}
PACKAGES =+ "gst-plugin-bluez libasound-module-bluez"
FILES_gst-plugin-bluez = "${libdir}/gstreamer-0.10/lib*.so"
FILES_libasound-module-bluez = "${libdir}/alsa-lib/lib*.so"
FILES_${PN} += "${libdir}/bluetooth/plugins/*.so"
FILES_${PN}-dev += "\
${libdir}/bluetooth/plugins/*.la \
${libdir}/alsa-lib/*.la \
${libdir}/gstreamer-0.10/*.la \
"
FILES_${PN}-dbg += "\
${libdir}/bluetooth/plugins/.debug \
${libdir}/*/.debug \
"

View File

@ -1,11 +0,0 @@
DESCRIPTION = "Linux Bluetooth Stack Userland."
SECTION = "libs"
PRIORITY = "optional"
HOMEPAGE = "http://www.bluez.org"
LICENSE = "GPL"
PR = "r0"
SRC_URI = "http://www.kernel.org/pub/linux/bluetooth/bluez-${PV}.tar.gz"
S = "${WORKDIR}/bluez-${PV}"
inherit autotools pkgconfig

View File

@ -1,22 +0,0 @@
#
# Patch managed by http://www.holgerschurig.de/patcher.html
#
--- bluez-utils-2.16/tools/hciattach.c~default-manfid-0x0-to-bcps
+++ bluez-utils-2.16/tools/hciattach.c
@@ -796,13 +796,12 @@
}
struct uart_t uart[] = {
+ { "bcsp", 0x0000, 0x0000, HCI_UART_BCSP, 115200, 115200, 0, bcsp },
{ "any", 0x0000, 0x0000, HCI_UART_H4, 115200, 115200, FLOW_CTL, NULL },
{ "ericsson", 0x0000, 0x0000, HCI_UART_H4, 57600, 115200, FLOW_CTL, ericsson },
{ "digi", 0x0000, 0x0000, HCI_UART_H4, 9600, 115200, FLOW_CTL, digi },
{ "texas", 0x0000, 0x0000, HCI_UART_H4, 115200, 115200, FLOW_CTL, texas },
- { "bcsp", 0x0000, 0x0000, HCI_UART_BCSP, 115200, 115200, 0, bcsp },
-
/* Xircom PCMCIA cards: Credit Card Adapter and Real Port Adapter */
{ "xircom", 0x0105, 0x080a, HCI_UART_H4, 115200, 115200, FLOW_CTL, NULL },