Patchwork libusb: disable on avr32

login
register
mail settings
Submitter Simon Dawson
Date Nov. 17, 2012, 7:55 p.m.
Message ID <1353182156-28906-1-git-send-email-spdawson@gmail.com>
Download mbox | patch
Permalink /patch/199871/
State Changes Requested
Headers show

Comments

Simon Dawson - Nov. 17, 2012, 7:55 p.m.
From: Simon Dawson <spdawson@gmail.com>

For target architecture avr32, the gpsd package fails to build when
libusb is selected. The following autobuild failure illustrates the problem.

  http://autobuild.buildroot.net/results/aa3d4763a0e90c995bc8431cf345730ee22e65a1/build-end.log

The issue is that libusb requires timerfd_settime and timerfd_create, but
the underlying syscalls are not implemented on avr32.

This patch disables the libusb package for the avr32 target architecture.

Signed-off-by: Simon Dawson <spdawson@gmail.com>
---
 package/libusb/Config.in |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
Peter Korsgaard - Nov. 17, 2012, 7:58 p.m.
>>>>> "spdawson" == spdawson  <spdawson@gmail.com> writes:

 spdawson> From: Simon Dawson <spdawson@gmail.com>
 spdawson> For target architecture avr32, the gpsd package fails to build when
 spdawson> libusb is selected. The following autobuild failure illustrates the problem.

 spdawson>   http://autobuild.buildroot.net/results/aa3d4763a0e90c995bc8431cf345730ee22e65a1/build-end.log

 spdawson> The issue is that libusb requires timerfd_settime and timerfd_create, but
 spdawson> the underlying syscalls are not implemented on avr32.

 spdawson> This patch disables the libusb package for the avr32 target architecture.

What about libusb's reverse dependencies?

git grep 'select BR2_PACKAGE_LIBUSB'
package/bluez_utils/Config.in:  select BR2_PACKAGE_LIBUSB
package/ccid/Config.in: select BR2_PACKAGE_LIBUSB
package/libftdi/Config.in:      select BR2_PACKAGE_LIBUSB
package/libftdi/Config.in:      select BR2_PACKAGE_LIBUSB_COMPAT
package/libhid/Config.in:       select BR2_PACKAGE_LIBUSB
package/libhid/Config.in:       select BR2_PACKAGE_LIBUSB_COMPAT
package/libiqrf/Config.in:      select BR2_PACKAGE_LIBUSB
package/libnfc/Config.in:       select BR2_PACKAGE_LIBUSB
package/libnfc/Config.in:       select BR2_PACKAGE_LIBUSB_COMPAT
package/openocd/Config.in:      select BR2_PACKAGE_LIBUSB
package/openocd/Config.in:      select BR2_PACKAGE_LIBUSB_COMPAT
package/pcsc-lite/Config.in:    select BR2_PACKAGE_LIBUSB
package/python-nfc/Config.in:   select BR2_PACKAGE_LIBUSB
package/python-nfc/Config.in:   select BR2_PACKAGE_LIBUSB_COMPAT
package/usb_modeswitch/Config.in:       select BR2_PACKAGE_LIBUSB
package/usb_modeswitch/Config.in:       select BR2_PACKAGE_LIBUSB_COMPAT
package/usbutils/Config.in:     select BR2_PACKAGE_LIBUSB
Simon Dawson - Nov. 17, 2012, 8:02 p.m.
Hi Peter; thanks for the feedback.

On 17 November 2012 19:58, Peter Korsgaard <jacmet@uclibc.org> wrote:
> What about libusb's reverse dependencies?
>
> git grep 'select BR2_PACKAGE_LIBUSB'
> package/bluez_utils/Config.in:  select BR2_PACKAGE_LIBUSB
> package/ccid/Config.in: select BR2_PACKAGE_LIBUSB
> package/libftdi/Config.in:      select BR2_PACKAGE_LIBUSB
> package/libftdi/Config.in:      select BR2_PACKAGE_LIBUSB_COMPAT
> package/libhid/Config.in:       select BR2_PACKAGE_LIBUSB
> package/libhid/Config.in:       select BR2_PACKAGE_LIBUSB_COMPAT
> package/libiqrf/Config.in:      select BR2_PACKAGE_LIBUSB
> package/libnfc/Config.in:       select BR2_PACKAGE_LIBUSB
> package/libnfc/Config.in:       select BR2_PACKAGE_LIBUSB_COMPAT
> package/openocd/Config.in:      select BR2_PACKAGE_LIBUSB
> package/openocd/Config.in:      select BR2_PACKAGE_LIBUSB_COMPAT
> package/pcsc-lite/Config.in:    select BR2_PACKAGE_LIBUSB
> package/python-nfc/Config.in:   select BR2_PACKAGE_LIBUSB
> package/python-nfc/Config.in:   select BR2_PACKAGE_LIBUSB_COMPAT
> package/usb_modeswitch/Config.in:       select BR2_PACKAGE_LIBUSB
> package/usb_modeswitch/Config.in:       select BR2_PACKAGE_LIBUSB_COMPAT
> package/usbutils/Config.in:     select BR2_PACKAGE_LIBUSB

Ah, yes. What's the right thing to do here? I don't really like the
thought of that "depends on !BR2_avr32" all over the place, but I
guess that's the cleanest solution, right?

Simon.
Peter Korsgaard - Nov. 17, 2012, 8:13 p.m.
>>>>> "Simon" == Simon Dawson <spdawson@gmail.com> writes:

 Simon> Hi Peter; thanks for the feedback.
 Simon> On 17 November 2012 19:58, Peter Korsgaard <jacmet@uclibc.org> wrote:
 >> What about libusb's reverse dependencies?
 >> 
 >> git grep 'select BR2_PACKAGE_LIBUSB'
 >> package/bluez_utils/Config.in:  select BR2_PACKAGE_LIBUSB
 >> package/ccid/Config.in: select BR2_PACKAGE_LIBUSB
 >> package/libftdi/Config.in:      select BR2_PACKAGE_LIBUSB
 >> package/libftdi/Config.in:      select BR2_PACKAGE_LIBUSB_COMPAT
 >> package/libhid/Config.in:       select BR2_PACKAGE_LIBUSB
 >> package/libhid/Config.in:       select BR2_PACKAGE_LIBUSB_COMPAT
 >> package/libiqrf/Config.in:      select BR2_PACKAGE_LIBUSB
 >> package/libnfc/Config.in:       select BR2_PACKAGE_LIBUSB
 >> package/libnfc/Config.in:       select BR2_PACKAGE_LIBUSB_COMPAT
 >> package/openocd/Config.in:      select BR2_PACKAGE_LIBUSB
 >> package/openocd/Config.in:      select BR2_PACKAGE_LIBUSB_COMPAT
 >> package/pcsc-lite/Config.in:    select BR2_PACKAGE_LIBUSB
 >> package/python-nfc/Config.in:   select BR2_PACKAGE_LIBUSB
 >> package/python-nfc/Config.in:   select BR2_PACKAGE_LIBUSB_COMPAT
 >> package/usb_modeswitch/Config.in:       select BR2_PACKAGE_LIBUSB
 >> package/usb_modeswitch/Config.in:       select BR2_PACKAGE_LIBUSB_COMPAT
 >> package/usbutils/Config.in:     select BR2_PACKAGE_LIBUSB

 Simon> Ah, yes. What's the right thing to do here? I don't really like the
 Simon> thought of that "depends on !BR2_avr32" all over the place, but I
 Simon> guess that's the cleanest solution, right?

Yes, that's the only solution we have right now.

Remember to look recursively upwards. These libusb users might be
selected by other packages.
Simon Dawson - Nov. 17, 2012, 8:19 p.m.
On 17 November 2012 20:13, Peter Korsgaard <jacmet@uclibc.org> wrote:
> Yes, that's the only solution we have right now.
>
> Remember to look recursively upwards. These libusb users might be
> selected by other packages.

Okay; thanks Peter.

Simon.

Patch

diff --git a/package/libusb/Config.in b/package/libusb/Config.in
index 2eed3fa..cbaeac6 100644
--- a/package/libusb/Config.in
+++ b/package/libusb/Config.in
@@ -1,5 +1,6 @@ 
 config BR2_PACKAGE_LIBUSB
 	bool "libusb"
+	depends on !BR2_avr32 # timerfd not in uClibc-0.9.31
 	depends on BR2_TOOLCHAIN_HAS_THREADS
 	help
 	  Userspace library for accessing USB devices
@@ -7,4 +8,4 @@  config BR2_PACKAGE_LIBUSB
 	  http://libusb.sourceforge.net/
 
 comment "libusb needs a toolchain with thread support"
-	depends on !BR2_TOOLCHAIN_HAS_THREADS
+	depends on !BR2_TOOLCHAIN_HAS_THREADS && !BR2_avr32