summaryrefslogtreecommitdiffstats
path: root/yocto-poky/meta/recipes-bsp/usbutils
diff options
context:
space:
mode:
Diffstat (limited to 'yocto-poky/meta/recipes-bsp/usbutils')
-rw-r--r--yocto-poky/meta/recipes-bsp/usbutils/usbutils-008/iconv.patch41
-rw-r--r--yocto-poky/meta/recipes-bsp/usbutils/usbutils/Fix-NULL-pointer-crash.patch28
-rw-r--r--yocto-poky/meta/recipes-bsp/usbutils/usbutils/iconv.patch40
-rw-r--r--yocto-poky/meta/recipes-bsp/usbutils/usbutils/usb-devices-avoid-dependency-on-bash.patch30
-rw-r--r--yocto-poky/meta/recipes-bsp/usbutils/usbutils_007.bb31
-rw-r--r--yocto-poky/meta/recipes-bsp/usbutils/usbutils_008.bb28
6 files changed, 198 insertions, 0 deletions
diff --git a/yocto-poky/meta/recipes-bsp/usbutils/usbutils-008/iconv.patch b/yocto-poky/meta/recipes-bsp/usbutils/usbutils-008/iconv.patch
new file mode 100644
index 000000000..645556717
--- /dev/null
+++ b/yocto-poky/meta/recipes-bsp/usbutils/usbutils-008/iconv.patch
@@ -0,0 +1,41 @@
+This patch adds support for detecting iconv support using autotools
+uclibc does not have iconv implementation inside libc like glibc, therefore
+the existing checks were not sufficient, it worked for glibc but not for
+uclibc. The new patch portably detects the iconv support and adds the
+libiconv to linker cmdline
+
+This patch should be submitted upstream too
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+Index: usbutils-008/configure.ac
+===================================================================
+--- usbutils-008.orig/configure.ac
++++ usbutils-008/configure.ac
+@@ -10,7 +10,9 @@ AC_USE_SYSTEM_EXTENSIONS
+ AC_SYS_LARGEFILE
+
+ AC_CHECK_HEADERS([byteswap.h])
+-AC_CHECK_FUNCS([nl_langinfo iconv])
++
++AM_GNU_GETTEXT
++AM_ICONV
+
+ PKG_CHECK_MODULES(LIBUSB, libusb-1.0 >= 1.0.0)
+
+Index: usbutils-008/Makefile.am
+===================================================================
+--- usbutils-008.orig/Makefile.am
++++ usbutils-008/Makefile.am
+@@ -29,7 +29,8 @@ lsusb_CPPFLAGS = \
+
+ lsusb_LDADD = \
+ $(LIBUSB_LIBS) \
+- $(UDEV_LIBS)
++ $(UDEV_LIBS) \
++ $(LIBICONV)
+
+ man_MANS = \
+ lsusb.8 \
diff --git a/yocto-poky/meta/recipes-bsp/usbutils/usbutils/Fix-NULL-pointer-crash.patch b/yocto-poky/meta/recipes-bsp/usbutils/usbutils/Fix-NULL-pointer-crash.patch
new file mode 100644
index 000000000..0efdc59fc
--- /dev/null
+++ b/yocto-poky/meta/recipes-bsp/usbutils/usbutils/Fix-NULL-pointer-crash.patch
@@ -0,0 +1,28 @@
+Fix NULL pointer crash.
+
+Before use usbbuslist, we should check if it is valid.
+
+Upstream-Status: Pending
+Signed-off-by: Roy.Li <rongqing.li@windriver.com>
+---
+ lsusb-t.c | 4 ++++
+ 1 files changed, 4 insertions(+), 0 deletions(-)
+
+diff --git a/lsusb-t.c b/lsusb-t.c
+index f604155..583a46a 100644
+--- a/lsusb-t.c
++++ b/lsusb-t.c
+@@ -643,6 +643,10 @@ static void sort_busses(void)
+ /* need to reverse sort bus numbers */
+ struct usbbusnode *t, *p, **pp;
+ int swapped;
++
++ if (!usbbuslist)
++ return;
++
+ do {
+ p = usbbuslist;
+ pp = &usbbuslist;
+--
+1.7.4.1
+
diff --git a/yocto-poky/meta/recipes-bsp/usbutils/usbutils/iconv.patch b/yocto-poky/meta/recipes-bsp/usbutils/usbutils/iconv.patch
new file mode 100644
index 000000000..c557334a7
--- /dev/null
+++ b/yocto-poky/meta/recipes-bsp/usbutils/usbutils/iconv.patch
@@ -0,0 +1,40 @@
+This patch adds support for detecting iconv support using autotools
+uclibc does not have iconv implementation inside libc like glibc, therefore
+the existing checks were not sufficient, it worked for glibc but not for
+uclibc. The new patch portably detects the iconv support and adds the
+libiconv to linker cmdline
+
+This patch should be submitted upstream too
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+Index: usbutils-007/configure.ac
+===================================================================
+--- usbutils-007.orig/configure.ac
++++ usbutils-007/configure.ac
+@@ -10,7 +10,9 @@ AC_USE_SYSTEM_EXTENSIONS
+ AC_SYS_LARGEFILE
+
+ AC_CHECK_HEADERS([byteswap.h])
+-AC_CHECK_FUNCS([nl_langinfo iconv])
++
++AM_GNU_GETTEXT
++AM_ICONV
+
+ AC_ARG_ENABLE(zlib,
+ AS_HELP_STRING(--disable-zlib,disable support for zlib))
+Index: usbutils-007/Makefile.am
+===================================================================
+--- usbutils-007.orig/Makefile.am
++++ usbutils-007/Makefile.am
+@@ -27,7 +27,7 @@ lsusb_CPPFLAGS = \
+ -DDATADIR=\"$(datadir)\"
+
+ lsusb_LDADD = \
+- $(LIBUSB_LIBS)
++ $(LIBUSB_LIBS) $(LIBICONV)
+
+ if HAVE_ZLIB
+ lsusb_CPPFLAGS += -DHAVE_LIBZ
diff --git a/yocto-poky/meta/recipes-bsp/usbutils/usbutils/usb-devices-avoid-dependency-on-bash.patch b/yocto-poky/meta/recipes-bsp/usbutils/usbutils/usb-devices-avoid-dependency-on-bash.patch
new file mode 100644
index 000000000..a6b241f85
--- /dev/null
+++ b/yocto-poky/meta/recipes-bsp/usbutils/usbutils/usb-devices-avoid-dependency-on-bash.patch
@@ -0,0 +1,30 @@
+From 333d5fbbc03481f1aa222bd68c2609db168ae3e0 Mon Sep 17 00:00:00 2001
+From: Paul Eggleton <paul.eggleton@linux.intel.com>
+Date: Thu, 26 Jul 2012 10:37:32 +0100
+Subject: [PATCH] usb-devices: avoid dependency on bash
+
+By virtue of having #!/bin/bash this script declared that it requires
+bash, however manual examination, checkbashisms and tests with dash
+and busybox show that it doesn't contain any bashisms, so change the
+header to avoid the dependency.
+
+Upstream-Status: Pending
+
+Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
+---
+ usb-devices | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/usb-devices b/usb-devices
+index b2052e2..14a5358 100755
+--- a/usb-devices
++++ b/usb-devices
+@@ -1,4 +1,4 @@
+-#!/bin/bash
++#!/bin/sh
+
+ # Copyright: 2009 Greg Kroah-Hartman <greg@kroah.com>
+ # 2009 Randy Dunlap <rdunlap@xenotime.net>
+--
+1.7.9.5
+
diff --git a/yocto-poky/meta/recipes-bsp/usbutils/usbutils_007.bb b/yocto-poky/meta/recipes-bsp/usbutils/usbutils_007.bb
new file mode 100644
index 000000000..b93b2bd9e
--- /dev/null
+++ b/yocto-poky/meta/recipes-bsp/usbutils/usbutils_007.bb
@@ -0,0 +1,31 @@
+SUMMARY = "Host side USB console utilities"
+DESCRIPTION = "Contains the lsusb utility for inspecting the devices connected to the USB bus."
+HOMEPAGE = "http://www.linux-usb.org"
+SECTION = "base"
+
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f"
+
+DEPENDS = "libusb zlib virtual/libiconv"
+
+SRC_URI = "${KERNELORG_MIRROR}/linux/utils/usb/usbutils/usbutils-${PV}.tar.gz \
+ file://usb-devices-avoid-dependency-on-bash.patch \
+ file://Fix-NULL-pointer-crash.patch \
+ file://iconv.patch \
+ "
+
+SRC_URI[md5sum] = "be6c42294be5c940f208190d3479d50c"
+SRC_URI[sha256sum] = "e65c234cadf7c81b6b1567c440e3b9b31b44f51c27df3e45741b88848d8b37d3"
+
+inherit autotools gettext pkgconfig
+
+do_install_append() {
+ # We only need the compressed copy, remove the uncompressed version
+ rm -f ${D}${datadir}/usb.ids
+}
+
+PACKAGES += "${PN}-ids"
+FILES_${PN}-dev += "${datadir}/pkgconfig"
+FILES_${PN}-ids = "${datadir}/usb*"
+
+RDEPENDS_${PN} = "${PN}-ids"
diff --git a/yocto-poky/meta/recipes-bsp/usbutils/usbutils_008.bb b/yocto-poky/meta/recipes-bsp/usbutils/usbutils_008.bb
new file mode 100644
index 000000000..0f2d8d47c
--- /dev/null
+++ b/yocto-poky/meta/recipes-bsp/usbutils/usbutils_008.bb
@@ -0,0 +1,28 @@
+SUMMARY = "Host side USB console utilities"
+DESCRIPTION = "Contains the lsusb utility for inspecting the devices connected to the USB bus."
+HOMEPAGE = "http://www.linux-usb.org"
+SECTION = "base"
+
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
+
+DEPENDS = "libusb zlib virtual/libiconv systemd"
+
+SRC_URI = "${KERNELORG_MIRROR}/linux/utils/usb/usbutils/usbutils-${PV}.tar.gz \
+ file://usb-devices-avoid-dependency-on-bash.patch \
+ file://Fix-NULL-pointer-crash.patch \
+ file://iconv.patch \
+ "
+
+SRC_URI[md5sum] = "cb20148c2e784577e924a7b4c560c8fb"
+SRC_URI[sha256sum] = "6d5f16c2961df37e22e492c736a3e162a8fde24480f23a40d85f79af80d3fe95"
+
+inherit autotools gettext pkgconfig distro_features_check
+# This version of usbutils relies on the udev from systemd, so unless
+# we can decouple udev from system, we require systemd for now.
+REQUIRED_DISTRO_FEATURES = "systemd"
+
+FILES_${PN}-dev += "${datadir}/pkgconfig"
+
+RDEPENDS_${PN} = "libudev"
+RDEPENDS_${PN}-ptest = "libboost-system libboost-thread"
OpenPOWER on IntegriCloud