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