summaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-connectivity
diff options
context:
space:
mode:
authorMartin Jansa <Martin.Jansa@gmail.com>2011-04-10 13:24:47 +0200
committerMartin Jansa <Martin.Jansa@gmail.com>2011-04-10 14:43:41 +0200
commit89500c583e0f1dc1b4ffdf72914e08e505e427e0 (patch)
treeb073036cc61aa34ca5ac9eec4d617366e0dcb3d5 /meta-oe/recipes-connectivity
parente66079da37992abd54486488aa06a99bf7a4198c (diff)
downloadmeta-openembedded-89500c583e0f1dc1b4ffdf72914e08e505e427e0.tar.gz
recipes,classes: import a lot of recipes from meta-shr
* tested on shr-lite-image for om-gta02 and nokia900 (with meta-shr layer)
Diffstat (limited to 'meta-oe/recipes-connectivity')
-rw-r--r--meta-oe/recipes-connectivity/bluez/bluez4.inc71
-rw-r--r--meta-oe/recipes-connectivity/bluez/bluez4/bluetooth.conf16
-rw-r--r--meta-oe/recipes-connectivity/bluez/bluez4/fix-dfutool-usb-declaration-mismatch.patch13
-rw-r--r--meta-oe/recipes-connectivity/bluez/bluez4/hid2hci_usb_init.patch33
-rw-r--r--meta-oe/recipes-connectivity/bluez/bluez4/sbc-thumb.patch11
-rw-r--r--meta-oe/recipes-connectivity/bluez/bluez4_4.91.bb15
-rw-r--r--meta-oe/recipes-connectivity/connman/connman.inc79
-rwxr-xr-xmeta-oe/recipes-connectivity/connman/connman/connman42
-rw-r--r--meta-oe/recipes-connectivity/connman/connman/link-against-libnl2.patch13
-rwxr-xr-xmeta-oe/recipes-connectivity/connman/connman/shr/connman42
-rw-r--r--meta-oe/recipes-connectivity/connman/connman_0.72.bb31
-rw-r--r--meta-oe/recipes-connectivity/phonet-utils/phonet-utils_git.bb18
12 files changed, 384 insertions, 0 deletions
diff --git a/meta-oe/recipes-connectivity/bluez/bluez4.inc b/meta-oe/recipes-connectivity/bluez/bluez4.inc
new file mode 100644
index 000000000..747ae77e6
--- /dev/null
+++ b/meta-oe/recipes-connectivity/bluez/bluez4.inc
@@ -0,0 +1,71 @@
1DESCRIPTION = "Linux Bluetooth Stack Userland V4"
2HOMEPAGE = "http://www.bluez.org"
3SECTION = "libs"
4PRIORITY = "optional"
5LICENSE = "GPLv2/LGPLv2.1"
6LIC_FILES_CHKSUM = "file://COPYING;md5=12f884d2ae1ff87c09e5b7ccc2c4ca7e \
7 file://COPYING.LIB;md5=fb504b67c50331fc78734fed90fb0e09 \
8"
9DEPENDS = "gst-plugins-base alsa-lib virtual/libusb0 dbus-glib"
10INC_PR = "r8"
11
12# temporary solution until bug 5176 is properly fixed
13PROVIDES += "bluez-utils bluez-libs bluez-utils-dbus"
14RPROVIDES_bluez4 += "bluez-utils bluez-libs bluez-utils-dbus"
15RPROVIDES_bluez4-dev = "bluez-libs-dev"
16
17SRC_URI = "\
18 http://www.kernel.org/pub/linux/bluetooth/bluez-${PV}.tar.gz \
19 file://fix-dfutool-usb-declaration-mismatch.patch \
20 file://bluetooth.conf \
21"
22S = "${WORKDIR}/bluez-${PV}"
23
24inherit autotools update-rc.d
25
26EXTRA_OECONF = "\
27 --enable-gstreamer \
28 --enable-alsa \
29 --enable-usb \
30 --enable-netlink \
31 --enable-tools \
32 --enable-bccmd \
33 --enable-hid2hci \
34 --enable-dfutool \
35 --enable-hidd \
36 --enable-pand \
37 --enable-dund \
38 --disable-cups \
39 --enable-test \
40 --enable-manpages \
41 --enable-configfiles \
42 --enable-initscripts \
43 --disable-pcmciarules \
44"
45
46do_install_append() {
47 install -m 0644 ${S}/audio/audio.conf ${D}/${sysconfdir}/bluetooth/
48 install -m 0644 ${S}/network/network.conf ${D}/${sysconfdir}/bluetooth/
49 install -m 0644 ${S}/input/input.conf ${D}/${sysconfdir}/bluetooth/
50 # at_console doesn't really work with the current state of OE, so punch some more holes so people can actually use BT
51 install -m 0644 ${WORKDIR}/bluetooth.conf ${D}/${sysconfdir}/dbus-1/system.d/
52}
53
54INITSCRIPT_NAME = "bluetooth"
55INITSCRIPT_PARAMS = "defaults 23 19"
56
57PACKAGES =+ "gst-plugin-bluez libasound-module-bluez"
58
59FILES_gst-plugin-bluez = "${libdir}/gstreamer-0.10/lib*.so"
60FILES_libasound-module-bluez = "${libdir}/alsa-lib/lib*.so ${datadir}/alsa/bluetooth.conf"
61FILES_${PN} += "${libdir}/bluetooth/plugins/*.so ${base_libdir}/udev"
62FILES_${PN}-dev += "\
63 ${libdir}/bluetooth/plugins/*.la \
64 ${libdir}/alsa-lib/*.la \
65 ${libdir}/gstreamer-0.10/*.la \
66"
67
68FILES_${PN}-dbg += "\
69 ${libdir}/bluetooth/plugins/.debug \
70 ${libdir}/*/.debug \
71"
diff --git a/meta-oe/recipes-connectivity/bluez/bluez4/bluetooth.conf b/meta-oe/recipes-connectivity/bluez/bluez4/bluetooth.conf
new file mode 100644
index 000000000..ca5e9e4f2
--- /dev/null
+++ b/meta-oe/recipes-connectivity/bluez/bluez4/bluetooth.conf
@@ -0,0 +1,16 @@
1<!-- This configuration file specifies the required security policies
2 for Bluetooth core daemon to work. -->
3
4<!DOCTYPE busconfig PUBLIC "-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN"
5 "http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
6<busconfig>
7
8 <!-- ../system.conf have denied everything, so we just punch some holes -->
9
10 <policy context="default">
11 <allow own="org.bluez"/>
12 <allow send_destination="org.bluez"/>
13 <allow send_interface="org.bluez.Agent"/>
14 </policy>
15
16</busconfig>
diff --git a/meta-oe/recipes-connectivity/bluez/bluez4/fix-dfutool-usb-declaration-mismatch.patch b/meta-oe/recipes-connectivity/bluez/bluez4/fix-dfutool-usb-declaration-mismatch.patch
new file mode 100644
index 000000000..b1ee510e8
--- /dev/null
+++ b/meta-oe/recipes-connectivity/bluez/bluez4/fix-dfutool-usb-declaration-mismatch.patch
@@ -0,0 +1,13 @@
1Index: bluez-4.27/tools/dfutool.c
2===================================================================
3--- bluez-4.27.orig/tools/dfutool.c
4+++ bluez-4.27/tools/dfutool.c
5@@ -59,7 +59,7 @@
6 #endif
7
8 #ifdef NEED_USB_GET_BUSSES
9-static inline struct usb_bus *usb_get_busses(void)
10+inline struct usb_bus *usb_get_busses(void)
11 {
12 return usb_busses;
13 }
diff --git a/meta-oe/recipes-connectivity/bluez/bluez4/hid2hci_usb_init.patch b/meta-oe/recipes-connectivity/bluez/bluez4/hid2hci_usb_init.patch
new file mode 100644
index 000000000..ed15fd5a1
--- /dev/null
+++ b/meta-oe/recipes-connectivity/bluez/bluez4/hid2hci_usb_init.patch
@@ -0,0 +1,33 @@
1# Signed-off-by: Khem Raj <raj.khem@gmail.com>
2#
3# Use the new usb1 API for usb_init() and check for fails from
4# usb_init (). Currently we see a crash on a system which does
5# not have USB because usb_init() fails and it cleans up all initialized
6# data (e.g. ctx) which is used in subsequent calls to libusb
7# We return immediately if usb_init() fails for some reason.
8
9Index: bluez-4.24/tools/hid2hci.c
10===================================================================
11--- bluez-4.24.orig/tools/hid2hci.c 2008-10-25 23:40:34.000000000 -0700
12+++ bluez-4.24/tools/hid2hci.c 2008-12-29 22:06:04.000000000 -0800
13@@ -337,7 +337,7 @@
14 int main(int argc, char *argv[])
15 {
16 struct device_info dev[16];
17- int i, opt, num, quiet = 0, mode = HCI;
18+ int i, ret, opt, num, quiet = 0, mode = HCI;
19
20 while ((opt = getopt_long(argc, argv, "+01qh", main_options, NULL)) != -1) {
21 switch (opt) {
22@@ -361,8 +361,9 @@
23 argc -= optind;
24 argv += optind;
25 optind = 0;
26-
27- usb_init();
28+ ret = libusb_init();
29+ if (ret < 0)
30+ return ret;
31
32 num = find_devices(mode, dev, sizeof(dev) / sizeof(dev[0]));
33 if (num <= 0) {
diff --git a/meta-oe/recipes-connectivity/bluez/bluez4/sbc-thumb.patch b/meta-oe/recipes-connectivity/bluez/bluez4/sbc-thumb.patch
new file mode 100644
index 000000000..350542605
--- /dev/null
+++ b/meta-oe/recipes-connectivity/bluez/bluez4/sbc-thumb.patch
@@ -0,0 +1,11 @@
1--- bluez/sbc/sbc_math.h~ 2008-03-05 20:18:03.000000000 +0000
2+++ bluez/sbc/sbc_math.h 2008-10-27 13:39:27.000000000 +0000
3@@ -59,7 +59,7 @@
4
5 #define SBC_FIXED_0(val) { val = 0; }
6 #define MUL(a, b) ((a) * (b))
7-#ifdef __arm__
8+#if defined(__arm__) && !defined(__thumb__)
9 #define MULA(a, b, res) ({ \
10 int tmp = res; \
11 __asm__( \
diff --git a/meta-oe/recipes-connectivity/bluez/bluez4_4.91.bb b/meta-oe/recipes-connectivity/bluez/bluez4_4.91.bb
new file mode 100644
index 000000000..ebb2dab58
--- /dev/null
+++ b/meta-oe/recipes-connectivity/bluez/bluez4_4.91.bb
@@ -0,0 +1,15 @@
1require bluez4.inc
2
3SRC_URI[md5sum] = "3059b7ef5168c84cd0c6a67034ce79f9"
4SRC_URI[sha256sum] = "11e9279e2669db996afd464b96d2c68f41f157f6eb9b8842a0bbcad8a4eac18d"
5
6DEPENDS += "libsndfile1"
7
8PR = "${INC_PR}.0"
9
10# Not all distros have a recent enough udev
11BTUDEV = " --disable-udevrules"
12BTUDEV_angstrom = " --enable-udevrules"
13BTUDEV_shr = " --enable-udevrules"
14
15EXTRA_OECONF += "${BTUDEV}"
diff --git a/meta-oe/recipes-connectivity/connman/connman.inc b/meta-oe/recipes-connectivity/connman/connman.inc
new file mode 100644
index 000000000..69f91b3a3
--- /dev/null
+++ b/meta-oe/recipes-connectivity/connman/connman.inc
@@ -0,0 +1,79 @@
1SUMMARY = "A daemon for managing internet connections within embedded devices"
2DESCRIPTION = "The ConnMan project provides a daemon for managing \
3internet connections within embedded devices running the Linux \
4operating system. The Connection Manager is designed to be slim and \
5to use as few resources as possible, so it can be easily integrated. \
6It is a fully modular system that can be extended, through plug-ins, \
7to support all kinds of wired or wireless technologies. Also, \
8configuration methods, like DHCP and domain name resolving, are \
9implemented using plug-ins."
10HOMEPAGE = "http://connman.net/"
11BUGTRACKER = "http://bugs.meego.com/buglist.cgi?quicksearch=connman"
12LICENSE = "GPLv2"
13LIC_FILES_CHKSUM = "file://COPYING;md5=12f884d2ae1ff87c09e5b7ccc2c4ca7e \
14 file://src/main.c;beginline=1;endline=20;md5=4b55b550fa6b33cc2055ef30dd262b3e"
15
16# we need to define the depends here, the dynamic stuff is too late
17DEPENDS = "libnl wpa-supplicant dbus glib-2.0 ppp busybox dhcp resolvconf bluez4"
18
19EXTRA_OECONF += "\
20 ac_cv_path_WPASUPPLICANT=/usr/sbin/wpa_supplicant \
21 ac_cv_path_DHCLIENT=/sbin/dhclient \
22 ac_cv_path_UDHCPC=/sbin/udhcpc \
23 ac_cv_path_RESOLVCONF=/sbin/resolvconf \
24 ac_cv_path_PPPD=/usr/sbin/pppd \
25"
26
27INITSCRIPT_NAME = "connman"
28INITSCRIPT_PARAMS = "start 05 5 2 . stop 22 0 1 6 ."
29
30PARALLEL_MAKE = ""
31
32inherit autotools pkgconfig update-rc.d
33
34do_configure_append() {
35 ln -sf . include/connman
36}
37
38do_compile_append() {
39 sed -i -e s:deny:allow:g src/connman-dbus.conf
40}
41
42do_install_append() {
43 install -d ${D}${sysconfdir}/init.d
44 install -m 0755 ${WORKDIR}/connman ${D}${sysconfdir}/init.d/connman
45}
46
47python populate_packages_prepend() {
48 depmap = dict( pppd="ppp", udhcp="busybox connman-scripts", dhclient="dhcp-client", wifi="wpa-supplicant", resolvconf="resolvconf", bluetooth="bluez4" )
49 packages = []
50 hook = lambda file,pkg,b,c,d:packages.append((file,pkg))
51 plugin_dir = bb.data.expand('${libdir}/connman/plugins/', d)
52 plugin_name = bb.data.expand('${PN}-plugin-%s', d)
53 do_split_packages(d, plugin_dir, '^(.*).so$', plugin_name, '${PN} plugin for %s', extra_depends='', hook=hook )
54 for (file, package) in packages:
55 plugintype = package.split( '-' )[-1]
56 if plugintype in depmap:
57 rdepends = bb.data.getVar( "RDEPENDS_%s" % package, d )
58 bb.note( "Adding rdependency on %s to package %s" % ( depmap[plugintype], package ) )
59 bb.data.setVar("RDEPENDS_%s" % package, depmap[plugintype], d)
60}
61
62PACKAGES_DYNAMIC = "${PN}-plugin-*"
63
64PACKAGES += "${PN}-scripts ${PN}-test-utils"
65
66FILES_${PN} = "${bindir}/* ${sbindir}/* ${libexecdir}/* ${libdir}/lib*.so.* \
67 ${sysconfdir} ${sharedstatedir} ${localstatedir} \
68 ${base_bindir}/* ${base_sbindir}/* ${base_libdir}/*.so* ${datadir}/${PN} \
69 ${datadir}/pixmaps ${datadir}/applications \
70 ${datadir}/idl ${datadir}/omf ${datadir}/sounds \
71 ${libdir}/bonobo/servers \
72 ${datadir}/dbus-1/system-services/*"
73
74FILES_${PN}-test-utils += "${libdir}/connman/test/*"
75
76FILES_${PN}-scripts += "${libdir}/connman/scripts"
77FILES_${PN}-dbg += "${libdir}/connman/*/.debug"
78FILES_${PN}-dev += "${libdir}/connman/*/*.la"
79
diff --git a/meta-oe/recipes-connectivity/connman/connman/connman b/meta-oe/recipes-connectivity/connman/connman/connman
new file mode 100755
index 000000000..f8154f68f
--- /dev/null
+++ b/meta-oe/recipes-connectivity/connman/connman/connman
@@ -0,0 +1,42 @@
1#!/bin/sh
2
3DAEMON=/usr/sbin/connmand
4PIDFILE=/var/run/connmand.pid
5DESC="Connection Manager"
6
7if [ -f /etc/default/connman ] ; then
8 . /etc/default/connman
9fi
10
11set -e
12
13do_start() {
14 $DAEMON
15}
16
17do_stop() {
18 start-stop-daemon --stop --name connmand --quiet
19}
20
21case "$1" in
22 start)
23 echo "Starting $DESC"
24 do_start
25 ;;
26 stop)
27 echo "Stopping $DESC"
28 do_stop
29 ;;
30 restart|force-reload)
31 echo "Restarting $DESC"
32 do_stop
33 sleep 1
34 do_start
35 ;;
36 *)
37 echo "Usage: $0 {start|stop|restart|force-reload}" >&2
38 exit 1
39 ;;
40esac
41
42exit 0
diff --git a/meta-oe/recipes-connectivity/connman/connman/link-against-libnl2.patch b/meta-oe/recipes-connectivity/connman/connman/link-against-libnl2.patch
new file mode 100644
index 000000000..5be161820
--- /dev/null
+++ b/meta-oe/recipes-connectivity/connman/connman/link-against-libnl2.patch
@@ -0,0 +1,13 @@
1Index: connman-0.46/configure.ac
2===================================================================
3--- connman-0.46.orig/configure.ac
4+++ connman-0.46/configure.ac
5@@ -326,7 +326,7 @@
6 AC_ARG_ENABLE(tools, AC_HELP_STRING([--enable-tools],
7 [enable testing tools]), [enable_tools=${enableval}])
8 if (test "${enable_tools}" = "yes"); then
9- PKG_CHECK_MODULES(NETLINK, libnl-1, dummy=yes,
10+ PKG_CHECK_MODULES(NETLINK, libnl-2.0, dummy=yes,
11 AC_MSG_ERROR(Netlink library is required))
12 AC_SUBST(NETLINK_CFLAGS)
13 AC_SUBST(NETLINK_LIBS)
diff --git a/meta-oe/recipes-connectivity/connman/connman/shr/connman b/meta-oe/recipes-connectivity/connman/connman/shr/connman
new file mode 100755
index 000000000..708b1b4cd
--- /dev/null
+++ b/meta-oe/recipes-connectivity/connman/connman/shr/connman
@@ -0,0 +1,42 @@
1#!/bin/sh
2
3DAEMON="/usr/sbin/connmand -I usb0"
4PIDFILE=/var/run/connmand.pid
5DESC="Connection Manager"
6
7if [ -f /etc/default/connman ] ; then
8 . /etc/default/connman
9fi
10
11set -e
12
13do_start() {
14 $DAEMON
15}
16
17do_stop() {
18 start-stop-daemon --stop --name connmand --quiet
19}
20
21case "$1" in
22 start)
23 echo "Starting $DESC"
24 do_start
25 ;;
26 stop)
27 echo "Stopping $DESC"
28 do_stop
29 ;;
30 restart|force-reload)
31 echo "Restarting $DESC"
32 do_stop
33 sleep 1
34 do_start
35 ;;
36 *)
37 echo "Usage: $0 {start|stop|restart|force-reload}" >&2
38 exit 1
39 ;;
40esac
41
42exit 0
diff --git a/meta-oe/recipes-connectivity/connman/connman_0.72.bb b/meta-oe/recipes-connectivity/connman/connman_0.72.bb
new file mode 100644
index 000000000..8eb1e147f
--- /dev/null
+++ b/meta-oe/recipes-connectivity/connman/connman_0.72.bb
@@ -0,0 +1,31 @@
1require connman.inc
2# connman requires libXtables now
3DEPENDS += "iptables"
4PR = "r0"
5
6EXTRA_OECONF += "\
7 --disable-gtk-doc \
8 --enable-debug \
9 --enable-threads \
10 --enable-loopback \
11 --enable-ethernet \
12 --enable-wifi \
13 --disable-wimax \
14 --enable-bluetooth \
15 --enable-ofono \
16 --enable-resolvconf \
17 --enable-dnsproxy \
18 --enable-tools \
19 --disable-polkit \
20 --enable-client \
21 --enable-fake \
22"
23
24SRC_URI = "\
25 http://www.kernel.org/pub/linux/network/connman/connman-${PV}.tar.gz \
26 file://link-against-libnl2.patch \
27 file://connman \
28"
29
30SRC_URI[md5sum] = "800f9356e0471c88819eee7184713a1f"
31SRC_URI[sha256sum] = "9c8ad312573683fc9f50d5042d4a87ddc8e0700b27ac1b0fb8dc2e8b7424a60f"
diff --git a/meta-oe/recipes-connectivity/phonet-utils/phonet-utils_git.bb b/meta-oe/recipes-connectivity/phonet-utils/phonet-utils_git.bb
new file mode 100644
index 000000000..257f0121a
--- /dev/null
+++ b/meta-oe/recipes-connectivity/phonet-utils/phonet-utils_git.bb
@@ -0,0 +1,18 @@
1DESCRIPTION = "This small package provides a few command line tools for Linux Phonet"
2HOMEPAGE = ""
3LICENSE = "GPLv2"
4LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
5SRC_URI = "git://gitorious.org/meego-cellular/phonet-utils.git;branch=master;protocol=git"
6PR = "r0"
7S = "${WORKDIR}/git"
8SRCREV = "4acfa720fd37d178a048fc2be17180137d4a70ea"
9PV = "0.0.0+gitr${SRCPV}"
10
11do_compile () {
12 make
13}
14
15do_install () {
16 DESTDIR=${D} oe_runmake install
17}
18