From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from mail-bk0-x232.google.com ([2a00:1450:4008:c01::232]) by metis.ext.pengutronix.de with esmtp (Exim 4.72) (envelope-from ) id 1WTWYb-0006VX-2O for ptxdist@pengutronix.de; Fri, 28 Mar 2014 14:10:51 +0100 Received: by mail-bk0-f50.google.com with SMTP id w10so911896bkz.9 for ; Fri, 28 Mar 2014 06:10:43 -0700 (PDT) Received: from omega.Speedport_W_921V_1_24_000 (p4FD334D9.dip0.t-ipconnect.de. [79.211.52.217]) by mx.google.com with ESMTPSA id ew15sm5127707bkb.1.2014.03.28.06.10.40 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 28 Mar 2014 06:10:41 -0700 (PDT) Date: Fri, 28 Mar 2014 14:10:35 +0100 From: Alexander Aring Message-ID: <20140328131030.GA29424@omega.Speedport_W_921V_1_24_000> References: <1396006229-10616-1-git-send-email-alex.aring@gmail.com> <20140328125539.GX10959@pengutronix.de> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20140328125539.GX10959@pengutronix.de> Subject: Re: [ptxdist] [PATCH] libusb: drop libusb and use libusbx Reply-To: ptxdist@pengutronix.de List-Id: PTXdist Development Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: ptxdist-bounces@pengutronix.de Errors-To: ptxdist-bounces@pengutronix.de To: ptxdist@pengutronix.de Hi Michael, On Fri, Mar 28, 2014 at 01:55:39PM +0100, Michael Olbrich wrote: > On Fri, Mar 28, 2014 at 12:30:29PM +0100, Alexander Aring wrote: > > This patch drops the libusb support and add the libusbx instead. > > > > We can do that because libusb and libusbx offers the same API, original > > text from libusbx project website: > > > > "If you are an existing user of libusb, you don't have to change > > anything. Just download the libusbx library and use it in your code. The > > library is designed as a drop in replacement for libusb, so please give > > it a try. If you don't like it, which we very much doubt, you can always > > revert..." > > > > Another point is that libusbx website says that the libusb project is > > somehow died and will not longer release new releases: > > > > "The reason for the fork is that, despite having dedicated members, > > libusb has still not been able to produce a new release for the past 2 > > years. When a project fails to produce regular releases, we consider > > that you, its user, are paying the ultimate price. This is because it > > means that patches and new feature are being witheld and you end up > > wasting your time." > > > > This patch fix also a few Kconfig bugs which I detected: > > > > i) switch to "--disable-static", otherwise it was "--enable-shared > > --enable-static" > > > > ii) correct use of --disable-log and --enable-debug-log, there was an > > option for these two configure flags but also was a static > > "--disable-log --disable-debug-log" in the configure call, which > > makes no sense. > > > > iii) also adding some new disable flags like --disable-timerfd, > > --disable-system-log and --enable-tests-build > > Using libusbx sounds good. Any reason for --disable-timerfd and > --enable-tests-build? I've not tested it yet, but it looks good so far. > for disable-timerfd: I don't know what a timerfd is, fd maybe stands for filedescriptor... I googled it and it's this: http://man7.org/linux/man-pages/man2/timerfd_create.2.html Yea, I can enable it or we don't make anything and let's do configure the work. timerfd is [default=auto]. Maybe there exists also some LIBC dependencies like in uclibc, then I need to check that, then we should do nothing with this flag, or? for enable-test-builds: configure says "build example applications [default=no]", I don't know what for examples it builds but then we need to install these applications in targetinstall aswell. I think we don't need these examples. > Michael > > > iv) I add "--disable-udev" there but we should have a --enable-udev... > > The old one has no kind of udev support and I got a recursive > > dependency detection because udev-legacy needs usbutils which needs ... > > +20100101 rsc: added as http://libusb.org/ticket/24 > > + > > +Signed-off-by: Alexander Aring > > +--- > > + libusb-1.0.pc.in | 2 +- > > + 1 file changed, 1 insertion(+), 1 deletion(-) > > + > > +diff --git a/libusb-1.0.pc.in b/libusb-1.0.pc.in > > +index 7bc33c1..ec361a5 100644 > > +--- a/libusb-1.0.pc.in > > ++++ b/libusb-1.0.pc.in > > +@@ -6,6 +6,6 @@ includedir=@includedir@ > > + Name: libusbx-1.0 > > + Description: C API for USB device access from Linux, Mac OS X, Windows and OpenBSD/NetBSD userspace > > + Version: @VERSION@ > > +-Libs: -L${libdir} -lusb-1.0 > > ++Libs: -L${libdir} -lusb-1.0 -lusb-1.0 -lrt -lpthread yea, I will fix that in v2. > > + Libs.private: @LIBS@ > > + Cflags: -I${includedir}/libusb-1.0 > > +-- > > +1.9.1 > > + > > diff --git a/patches/libusbx-1.0.18/series b/patches/libusbx-1.0.18/series > > new file mode 100644 > > index 0000000..4284244 > > --- /dev/null > > +++ b/patches/libusbx-1.0.18/series > > @@ -0,0 +1 @@ ... > > - --disable-examples-build \ > > - --enable-static \ > > + --disable-static \ > > --enable-shared \ > > - --$(call ptx/endis, PTXCONF_LIBUSB_DISABLE_LOG)-log > > - > > -ifdef PTXCONF_LIBUSB_DEBUG_LOG > > -LIBUSB_AUTOCONF += --enable-debug-log > > -endif > > + --disable-udev \ > > + --disable-timerfd \ > > + --$(call ptx/disen, PTXCONF_LIBUSB_DISABLE_LOG)-log \ I also change the negative logic here, it was endis before. Maybe we should change that in PTXCONF_LIBUSB_LOG and there is also one dependency like PTXCONF_LIBUSB_DEBUG_LOG, but then we can also add a PTXCONF_LIBUSB_SYSTEM_LOG for the --enable-system-log parameter. - Alex -- ptxdist mailing list ptxdist@pengutronix.de