diff options
Diffstat (limited to 'meta/recipes-bsp/usbutils')
3 files changed, 87 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 0000000000..0efdc59fc6 --- /dev/null +++ b/meta/recipes-bsp/usbutils/usbutils/Fix-NULL-pointer-crash.patch | |||
@@ -0,0 +1,28 @@ | |||
1 | Fix NULL pointer crash. | ||
2 | |||
3 | Before use usbbuslist, we should check if it is valid. | ||
4 | |||
5 | Upstream-Status: Pending | ||
6 | Signed-off-by: Roy.Li <rongqing.li@windriver.com> | ||
7 | --- | ||
8 | lsusb-t.c | 4 ++++ | ||
9 | 1 files changed, 4 insertions(+), 0 deletions(-) | ||
10 | |||
11 | diff --git a/lsusb-t.c b/lsusb-t.c | ||
12 | index 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 | -- | ||
27 | 1.7.4.1 | ||
28 | |||
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 0000000000..a6b241f854 --- /dev/null +++ b/meta/recipes-bsp/usbutils/usbutils/usb-devices-avoid-dependency-on-bash.patch | |||
@@ -0,0 +1,30 @@ | |||
1 | From 333d5fbbc03481f1aa222bd68c2609db168ae3e0 Mon Sep 17 00:00:00 2001 | ||
2 | From: Paul Eggleton <paul.eggleton@linux.intel.com> | ||
3 | Date: Thu, 26 Jul 2012 10:37:32 +0100 | ||
4 | Subject: [PATCH] usb-devices: avoid dependency on bash | ||
5 | |||
6 | By virtue of having #!/bin/bash this script declared that it requires | ||
7 | bash, however manual examination, checkbashisms and tests with dash | ||
8 | and busybox show that it doesn't contain any bashisms, so change the | ||
9 | header to avoid the dependency. | ||
10 | |||
11 | Upstream-Status: Pending | ||
12 | |||
13 | Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> | ||
14 | --- | ||
15 | usb-devices | 2 +- | ||
16 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
17 | |||
18 | diff --git a/usb-devices b/usb-devices | ||
19 | index 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 | -- | ||
29 | 1.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 0000000000..45f829fe7f --- /dev/null +++ b/meta/recipes-bsp/usbutils/usbutils_007.bb | |||
@@ -0,0 +1,29 @@ | |||
1 | SUMMARY = "Host side USB console utilities." | ||
2 | DESCRIPTION = "Contains the lsusb utility for inspecting the devices connected to the USB bus." | ||
3 | HOMEPAGE = "http://www.linux-usb.org" | ||
4 | SECTION = "base" | ||
5 | |||
6 | LICENSE = "GPLv2+" | ||
7 | LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f" | ||
8 | |||
9 | DEPENDS = "libusb zlib" | ||
10 | |||
11 | SRC_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 | |||
15 | SRC_URI[md5sum] = "be6c42294be5c940f208190d3479d50c" | ||
16 | SRC_URI[sha256sum] = "e65c234cadf7c81b6b1567c440e3b9b31b44f51c27df3e45741b88848d8b37d3" | ||
17 | |||
18 | inherit autotools | ||
19 | |||
20 | do_install_append() { | ||
21 | # We only need the compressed copy, remove the uncompressed version | ||
22 | rm -f ${D}${datadir}/usb.ids | ||
23 | } | ||
24 | |||
25 | PACKAGES += "${PN}-ids" | ||
26 | FILES_${PN}-dev += "${datadir}/pkgconfig" | ||
27 | FILES_${PN}-ids = "${datadir}/usb*" | ||
28 | |||
29 | RDEPENDS_${PN} = "${PN}-ids" | ||