diff mbox

ofono package

Message ID CAAfyv35Rq_ad_obvHC2QZdhBvebLqpsRO7G0B4qpkGZuEYamuA@mail.gmail.com
State Superseded, archived
Headers show

Commit Message

Belisko Marek March 23, 2012, 12:54 a.m. UTC
Hi,

I'm trying to add ofono package to buildroot but facing strange
problems with bluetooth support.


From 12a05a615d38f3a72e04231a7b57402c50d0f7dd Mon Sep 17 00:00:00 2001
From: Marek Belisko <marek.belisko@open-nandra.com>
Date: Fri, 23 Mar 2012 01:49:16 +0100
Subject: [PATCH] Add ofono package.

Signed-off-by: Marek Belisko <marek.belisko@open-nandra.com>
---
 package/Config.in       |    1 +
 package/ofono/Config.in |   18 ++++++++++++++++++
 package/ofono/ofono.mk  |   26 ++++++++++++++++++++++++++
 3 files changed, 45 insertions(+), 0 deletions(-)
 create mode 100644 package/ofono/Config.in
 create mode 100644 package/ofono/ofono.mk

Comments

Yegor Yefremov March 23, 2012, 8:36 a.m. UTC | #1
On Fri, Mar 23, 2012 at 1:54 AM, Belisko Marek <marek.belisko@gmail.com> wrote:
> Hi,
>
> I'm trying to add ofono package to buildroot but facing strange
> problems with bluetooth support.
>
>
> From 12a05a615d38f3a72e04231a7b57402c50d0f7dd Mon Sep 17 00:00:00 2001
> From: Marek Belisko <marek.belisko@open-nandra.com>
> Date: Fri, 23 Mar 2012 01:49:16 +0100
> Subject: [PATCH] Add ofono package.
>
> Signed-off-by: Marek Belisko <marek.belisko@open-nandra.com>
> ---
>  package/Config.in       |    1 +
>  package/ofono/Config.in |   18 ++++++++++++++++++
>  package/ofono/ofono.mk  |   26 ++++++++++++++++++++++++++
>  3 files changed, 45 insertions(+), 0 deletions(-)
>  create mode 100644 package/ofono/Config.in
>  create mode 100644 package/ofono/ofono.mk
>
> diff --git a/package/Config.in b/package/Config.in
> index 50ef982..c37be8e 100644
> --- a/package/Config.in
> +++ b/package/Config.in
> @@ -201,6 +201,7 @@ source "package/memtester/Config.in"
>  source "package/minicom/Config.in"
>  source "package/mtd/Config.in"
>  source "package/ntfs-3g/Config.in"
> +source "package/ofono/Config.in"
>  source "package/open2300/Config.in"
>  source "package/openocd/Config.in"
>  source "package/parted/Config.in"
> diff --git a/package/ofono/Config.in b/package/ofono/Config.in
> new file mode 100644
> index 0000000..3760880
> --- /dev/null
> +++ b/package/ofono/Config.in
> @@ -0,0 +1,18 @@
> +config BR2_PACKAGE_OFONO
> +       bool "ofono"
> +       select BR2_PACKAGE_LIBCAP_NG
> +       select BR2_PACKAGE_LIBGLIB2
> +       help
> +         oFono.org is a place to bring developers together around designing an
> +         infrastructure for building mobile telephony (GSM/UMTS) applications.
> +
> +if BR2_PACKAGE_OFONO
> +
> +config BR2_PACKAGE_OFONO_BLUETOOTH
> +        bool "ofono with bluetooth support"
> +       select BR2_PACKAGE_BLUEZ_UTILS
> +        help
> +         Enable bluetooh support.
> +endif
> +
> +
> diff --git a/package/ofono/ofono.mk b/package/ofono/ofono.mk
> new file mode 100644
> index 0000000..d998091
> --- /dev/null
> +++ b/package/ofono/ofono.mk
> @@ -0,0 +1,26 @@
> +#############################################################
> +#
> +# ofono
> +#
> +#############################################################
> +OFONO_VERSION = 1.5
> +OFONO_SITE = git://git.kernel.org/pub/scm/network/ofono/ofono.git
> +
> +OFONO_DEPENDENCIES = host-pkg-config libglib2 libcap-ng bluez_utils
> +
> +OFONO_CONF_OPT = --disable-test
> +
> +ifneq ($(BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_UDEV),y)
> +       OFONO_CONF_OPT += --disable-udev
> +endif
> +
> +ifneq ($(BR2_PACKAGE_OFONO_BLUETOOTH),y)
> +       OFONO_CONF_OPT += --disable-bluetooth
> +endif
> +
> +define OFONO_CONFIGURE_CMDS
> +       (cd $(@D) && ./bootstrap-configure $(OFONO_CONF_OPT))
> +endef
> +
> +$(eval $(call AUTOTARGETS))
> +
> --
> 1.7.5.4
>
>
> When run make I always got:
> checking for dbus_watch_get_unix_fd in -ldbus-1... yes
> checking for dbus_connection_can_send_type in -ldbus-1... yes
> checking for CAPNG... yes
> checking for USB... yes
> checking for BLUEZ... no
> configure: error: Bluetooth library >= 4.30 is required
>
> bluez is in staging and pkg-config should find it but it's not.
>
> I'm I missing something?

How did you manage to find DBUS?

checking for signalfd... yes
checking for dlopen in -ldl... yes
checking for GLIB... yes
checking for DBUS... no
configure: error: D-Bus >= 1.0 is required

Yegor
Belisko Marek March 23, 2012, 8:41 a.m. UTC | #2
On Fri, Mar 23, 2012 at 9:36 AM, Yegor Yefremov
<yegorslists@googlemail.com> wrote:
> On Fri, Mar 23, 2012 at 1:54 AM, Belisko Marek <marek.belisko@gmail.com> wrote:
>> Hi,
>>
>> I'm trying to add ofono package to buildroot but facing strange
>> problems with bluetooth support.
>>
>>
>> From 12a05a615d38f3a72e04231a7b57402c50d0f7dd Mon Sep 17 00:00:00 2001
>> From: Marek Belisko <marek.belisko@open-nandra.com>
>> Date: Fri, 23 Mar 2012 01:49:16 +0100
>> Subject: [PATCH] Add ofono package.
>>
>> Signed-off-by: Marek Belisko <marek.belisko@open-nandra.com>
>> ---
>>  package/Config.in       |    1 +
>>  package/ofono/Config.in |   18 ++++++++++++++++++
>>  package/ofono/ofono.mk  |   26 ++++++++++++++++++++++++++
>>  3 files changed, 45 insertions(+), 0 deletions(-)
>>  create mode 100644 package/ofono/Config.in
>>  create mode 100644 package/ofono/ofono.mk
>>
>> diff --git a/package/Config.in b/package/Config.in
>> index 50ef982..c37be8e 100644
>> --- a/package/Config.in
>> +++ b/package/Config.in
>> @@ -201,6 +201,7 @@ source "package/memtester/Config.in"
>>  source "package/minicom/Config.in"
>>  source "package/mtd/Config.in"
>>  source "package/ntfs-3g/Config.in"
>> +source "package/ofono/Config.in"
>>  source "package/open2300/Config.in"
>>  source "package/openocd/Config.in"
>>  source "package/parted/Config.in"
>> diff --git a/package/ofono/Config.in b/package/ofono/Config.in
>> new file mode 100644
>> index 0000000..3760880
>> --- /dev/null
>> +++ b/package/ofono/Config.in
>> @@ -0,0 +1,18 @@
>> +config BR2_PACKAGE_OFONO
>> +       bool "ofono"
>> +       select BR2_PACKAGE_LIBCAP_NG
>> +       select BR2_PACKAGE_LIBGLIB2
>> +       help
>> +         oFono.org is a place to bring developers together around designing an
>> +         infrastructure for building mobile telephony (GSM/UMTS) applications.
>> +
>> +if BR2_PACKAGE_OFONO
>> +
>> +config BR2_PACKAGE_OFONO_BLUETOOTH
>> +        bool "ofono with bluetooth support"
>> +       select BR2_PACKAGE_BLUEZ_UTILS
>> +        help
>> +         Enable bluetooh support.
>> +endif
>> +
>> +
>> diff --git a/package/ofono/ofono.mk b/package/ofono/ofono.mk
>> new file mode 100644
>> index 0000000..d998091
>> --- /dev/null
>> +++ b/package/ofono/ofono.mk
>> @@ -0,0 +1,26 @@
>> +#############################################################
>> +#
>> +# ofono
>> +#
>> +#############################################################
>> +OFONO_VERSION = 1.5
>> +OFONO_SITE = git://git.kernel.org/pub/scm/network/ofono/ofono.git
>> +
>> +OFONO_DEPENDENCIES = host-pkg-config libglib2 libcap-ng bluez_utils
>> +
>> +OFONO_CONF_OPT = --disable-test
>> +
>> +ifneq ($(BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_UDEV),y)
>> +       OFONO_CONF_OPT += --disable-udev
>> +endif
>> +
>> +ifneq ($(BR2_PACKAGE_OFONO_BLUETOOTH),y)
>> +       OFONO_CONF_OPT += --disable-bluetooth
>> +endif
>> +
>> +define OFONO_CONFIGURE_CMDS
>> +       (cd $(@D) && ./bootstrap-configure $(OFONO_CONF_OPT))
>> +endef
>> +
>> +$(eval $(call AUTOTARGETS))
>> +
>> --
>> 1.7.5.4
>>
>>
>> When run make I always got:
>> checking for dbus_watch_get_unix_fd in -ldbus-1... yes
>> checking for dbus_connection_can_send_type in -ldbus-1... yes
>> checking for CAPNG... yes
>> checking for USB... yes
>> checking for BLUEZ... no
>> configure: error: Bluetooth library >= 4.30 is required
>>
>> bluez is in staging and pkg-config should find it but it's not.
>>
>> I'm I missing something?
>
> How did you manage to find DBUS?
Ups never get such an error. I think I have dependency to DBUS then
just remove it but it will stay prepared in staging so I don't have
such a problem.
Sorry.
>
> checking for signalfd... yes
> checking for dlopen in -ldl... yes
> checking for GLIB... yes
> checking for DBUS... no
> configure: error: D-Bus >= 1.0 is required
>
> Yegor

marek
Thomas Petazzoni March 23, 2012, 8:45 a.m. UTC | #3
Le Fri, 23 Mar 2012 09:41:59 +0100,
Belisko Marek <marek.belisko@gmail.com> a écrit :

> >> When run make I always got:
> >> checking for dbus_watch_get_unix_fd in -ldbus-1... yes
> >> checking for dbus_connection_can_send_type in -ldbus-1... yes
> >> checking for CAPNG... yes
> >> checking for USB... yes
> >> checking for BLUEZ... no
> >> configure: error: Bluetooth library >= 4.30 is required

Can you post:

 * The relevant part of configure.{in,ac} which implements the BLUEZ
   check

 * The relevant part of config.log (which explains why the test is
   failing)

Thanks,

Thomas
Yegor Yefremov March 23, 2012, 8:57 a.m. UTC | #4
On Fri, Mar 23, 2012 at 9:45 AM, Thomas Petazzoni
<thomas.petazzoni@free-electrons.com> wrote:
> Le Fri, 23 Mar 2012 09:41:59 +0100,
> Belisko Marek <marek.belisko@gmail.com> a écrit :
>
>> >> When run make I always got:
>> >> checking for dbus_watch_get_unix_fd in -ldbus-1... yes
>> >> checking for dbus_connection_can_send_type in -ldbus-1... yes
>> >> checking for CAPNG... yes
>> >> checking for USB... yes
>> >> checking for BLUEZ... no
>> >> configure: error: Bluetooth library >= 4.30 is required
>
> Can you post:
>
>  * The relevant part of configure.{in,ac} which implements the BLUEZ
>   check
>
>  * The relevant part of config.log (which explains why the test is
>   failing)


I think I know the problem. As far as I can see hosts pkg-config will
be used, not BR one. ofono could find dbus and capng first after I
installed these packages on my host.

Yegor
Thomas Petazzoni March 23, 2012, 9:11 a.m. UTC | #5
Le Fri, 23 Mar 2012 09:36:02 +0100,
Yegor Yefremov <yegorslists@googlemail.com> a écrit :

> > +define OFONO_CONFIGURE_CMDS
> > +       (cd $(@D) && ./bootstrap-configure $(OFONO_CONF_OPT))
> > +endef

This is not correct, and will fail to set the right path and pkg-config
environment variables. Why is such a special bootstrap-configure script
needed?

If this bootstrap stuff is used to regenerate the configure script and
Makefile.am, then use OFONO_AUTORECONF=YES.

Otherwise, if you really need to do this special configure command,
then do something like:

	(cd $(@D) && \
		$(TARGET_CONFIGURE_OPTS) \
		$(TARGET_CONFIGURE_ARGS) \
		$(OFONO_CONF_ENV) \
		./bootstrap-configure \
		$(OFONO_CONF_OPT))

But since you're not passing --host=something, I am quite skeptical
on how it can guess which cross-compiler should be used.

Thomas
Thomas Petazzoni March 23, 2012, 9:20 a.m. UTC | #6
Le Fri, 23 Mar 2012 10:11:00 +0100,
Thomas Petazzoni <thomas.petazzoni@free-electrons.com> a écrit :

> If this bootstrap stuff is used to regenerate the configure script and
> Makefile.am, then use OFONO_AUTORECONF=YES.

Looking at the package source code, setting OFONO_AUTORECONF=YES should
be sufficient. Just remove your OFONO_CONFIGURE_CMDS and see if it
works.

Regards,

Thomas
Yegor Yefremov March 23, 2012, 9:29 a.m. UTC | #7
Am 23.03.2012 10:20, schrieb Thomas Petazzoni:
> Le Fri, 23 Mar 2012 10:11:00 +0100,
> Thomas Petazzoni <thomas.petazzoni@free-electrons.com> a écrit :
> 
>> If this bootstrap stuff is used to regenerate the configure script and
>> Makefile.am, then use OFONO_AUTORECONF=YES.
> 
> Looking at the package source code, setting OFONO_AUTORECONF=YES should
> be sufficient. Just remove your OFONO_CONFIGURE_CMDS and see if it
> works.

It works, but I found one more dependency, that is not in BR yet: http://live.gnome.org/NetworkManager/MobileBroadband/ServiceProviders#Checkout.2BAC8-Clone

http://git.gnome.org/browse/mobile-broadband-provider-info/

Marek: could you add this package?

Yegor
Belisko Marek March 23, 2012, 9:32 a.m. UTC | #8
On Fri, Mar 23, 2012 at 10:29 AM, Yegor Yefremov
<yegor_sub1@visionsystems.de> wrote:
> Am 23.03.2012 10:20, schrieb Thomas Petazzoni:
>> Le Fri, 23 Mar 2012 10:11:00 +0100,
>> Thomas Petazzoni <thomas.petazzoni@free-electrons.com> a écrit :
>>
>>> If this bootstrap stuff is used to regenerate the configure script and
>>> Makefile.am, then use OFONO_AUTORECONF=YES.
>>
>> Looking at the package source code, setting OFONO_AUTORECONF=YES should
>> be sufficient. Just remove your OFONO_CONFIGURE_CMDS and see if it
>> works.
>
> It works, but I found one more dependency, that is not in BR yet: http://live.gnome.org/NetworkManager/MobileBroadband/ServiceProviders#Checkout.2BAC8-Clone
>
> http://git.gnome.org/browse/mobile-broadband-provider-info/
>
> Marek: could you add this package?
Yes of course. Will send updated patch. What about bluez?
Just use bluez_utils or keep libbluez?
>
> Yegor

marek
Yegor Yefremov March 23, 2012, 9:53 a.m. UTC | #9
On Fri, Mar 23, 2012 at 10:32 AM, Belisko Marek <marek.belisko@gmail.com> wrote:
> On Fri, Mar 23, 2012 at 10:29 AM, Yegor Yefremov
> <yegor_sub1@visionsystems.de> wrote:
>> Am 23.03.2012 10:20, schrieb Thomas Petazzoni:
>>> Le Fri, 23 Mar 2012 10:11:00 +0100,
>>> Thomas Petazzoni <thomas.petazzoni@free-electrons.com> a écrit :
>>>
>>>> If this bootstrap stuff is used to regenerate the configure script and
>>>> Makefile.am, then use OFONO_AUTORECONF=YES.
>>>
>>> Looking at the package source code, setting OFONO_AUTORECONF=YES should
>>> be sufficient. Just remove your OFONO_CONFIGURE_CMDS and see if it
>>> works.
>>
>> It works, but I found one more dependency, that is not in BR yet: http://live.gnome.org/NetworkManager/MobileBroadband/ServiceProviders#Checkout.2BAC8-Clone
>>
>> http://git.gnome.org/browse/mobile-broadband-provider-info/
>>
>> Marek: could you add this package?
> Yes of course. Will send updated patch. What about bluez?
> Just use bluez_utils or keep libbluez?

Let Peter and Thomas to device. I don't have a strong opinion here.

Yegor
Belisko Marek March 23, 2012, 11:44 a.m. UTC | #10
On Fri, Mar 23, 2012 at 10:53 AM, Yegor Yefremov
<yegorslists@googlemail.com> wrote:
> On Fri, Mar 23, 2012 at 10:32 AM, Belisko Marek <marek.belisko@gmail.com> wrote:
>> On Fri, Mar 23, 2012 at 10:29 AM, Yegor Yefremov
>> <yegor_sub1@visionsystems.de> wrote:
>>> Am 23.03.2012 10:20, schrieb Thomas Petazzoni:
>>>> Le Fri, 23 Mar 2012 10:11:00 +0100,
>>>> Thomas Petazzoni <thomas.petazzoni@free-electrons.com> a écrit :
>>>>
>>>>> If this bootstrap stuff is used to regenerate the configure script and
>>>>> Makefile.am, then use OFONO_AUTORECONF=YES.
>>>>
>>>> Looking at the package source code, setting OFONO_AUTORECONF=YES should
>>>> be sufficient. Just remove your OFONO_CONFIGURE_CMDS and see if it
>>>> works.
>>>
>>> It works, but I found one more dependency, that is not in BR yet: http://live.gnome.org/NetworkManager/MobileBroadband/ServiceProviders#Checkout.2BAC8-Clone
>>>
>>> http://git.gnome.org/browse/mobile-broadband-provider-info/
>>>
>>> Marek: could you add this package?
>> Yes of course. Will send updated patch. What about bluez?
>> Just use bluez_utils or keep libbluez?
>
> Let Peter and Thomas to device. I don't have a strong opinion here.
Peter, Thomas any objections to add separate libbluez instead whole bluez_utils?
>
> Yegor
diff mbox

Patch

diff --git a/package/Config.in b/package/Config.in
index 50ef982..c37be8e 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -201,6 +201,7 @@  source "package/memtester/Config.in"
 source "package/minicom/Config.in"
 source "package/mtd/Config.in"
 source "package/ntfs-3g/Config.in"
+source "package/ofono/Config.in"
 source "package/open2300/Config.in"
 source "package/openocd/Config.in"
 source "package/parted/Config.in"
diff --git a/package/ofono/Config.in b/package/ofono/Config.in
new file mode 100644
index 0000000..3760880
--- /dev/null
+++ b/package/ofono/Config.in
@@ -0,0 +1,18 @@ 
+config BR2_PACKAGE_OFONO
+	bool "ofono"
+	select BR2_PACKAGE_LIBCAP_NG
+	select BR2_PACKAGE_LIBGLIB2
+	help
+	  oFono.org is a place to bring developers together around designing an
+	  infrastructure for building mobile telephony (GSM/UMTS) applications.
+
+if BR2_PACKAGE_OFONO
+
+config BR2_PACKAGE_OFONO_BLUETOOTH
+        bool "ofono with bluetooth support"
+	select BR2_PACKAGE_BLUEZ_UTILS
+        help
+	  Enable bluetooh support.
+endif
+
+
diff --git a/package/ofono/ofono.mk b/package/ofono/ofono.mk
new file mode 100644
index 0000000..d998091
--- /dev/null
+++ b/package/ofono/ofono.mk
@@ -0,0 +1,26 @@ 
+#############################################################
+#
+# ofono
+#
+#############################################################
+OFONO_VERSION = 1.5
+OFONO_SITE = git://git.kernel.org/pub/scm/network/ofono/ofono.git
+
+OFONO_DEPENDENCIES = host-pkg-config libglib2 libcap-ng bluez_utils
+
+OFONO_CONF_OPT = --disable-test
+
+ifneq ($(BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_UDEV),y)
+	OFONO_CONF_OPT += --disable-udev
+endif
+
+ifneq ($(BR2_PACKAGE_OFONO_BLUETOOTH),y)
+	OFONO_CONF_OPT += --disable-bluetooth
+endif
+
+define OFONO_CONFIGURE_CMDS
+	(cd $(@D) && ./bootstrap-configure $(OFONO_CONF_OPT))
+endef
+
+$(eval $(call AUTOTARGETS))
+