From 7ebeb6ba4bca44cd304b73aa596de78fd977ab85 Mon Sep 17 00:00:00 2001 From: Martin Jansa Date: Thu, 10 Mar 2016 11:27:06 +0100 Subject: dfu-util: upgrade to 0.9 * drop commit 0792623dfa8156fb0af3f3949c901665e2df3d04 Author: Stefan `Sec` Zehl Date: Wed Jul 29 01:39:11 2015 +0200 Fix/reimplement USBPATH support Using libusb functions to retrieve port and bus numbers. Thanks to Topi Kuutela for reviewing and testing the patch. Also thanks to Timo Poikola and Topi Kuutela for having submitted alternative patches. https://sourceforge.net/p/dfu-util/tickets/6/ Signed-off-by: Martin Jansa --- .../dfu-util/dfu-util-native_0.8.bb | 19 ------ .../dfu-util/dfu-util-native_0.9.bb | 16 +++++ ...1-Revert-Makefile.am-Drop-static-dfu-util.patch | 68 ++++++++++++++++++++++ ...0001-configure.ac-Don-t-check-for-usbpath.patch | 38 ------------ ...2-Revert-Makefile.am-Drop-static-dfu-util.patch | 68 ---------------------- meta-oe/recipes-support/dfu-util/dfu-util_0.8.bb | 17 ------ meta-oe/recipes-support/dfu-util/dfu-util_0.9.bb | 14 +++++ 7 files changed, 98 insertions(+), 142 deletions(-) delete mode 100644 meta-oe/recipes-support/dfu-util/dfu-util-native_0.8.bb create mode 100644 meta-oe/recipes-support/dfu-util/dfu-util-native_0.9.bb create mode 100644 meta-oe/recipes-support/dfu-util/dfu-util/0001-Revert-Makefile.am-Drop-static-dfu-util.patch delete mode 100644 meta-oe/recipes-support/dfu-util/dfu-util/0001-configure.ac-Don-t-check-for-usbpath.patch delete mode 100644 meta-oe/recipes-support/dfu-util/dfu-util/0002-Revert-Makefile.am-Drop-static-dfu-util.patch delete mode 100644 meta-oe/recipes-support/dfu-util/dfu-util_0.8.bb create mode 100644 meta-oe/recipes-support/dfu-util/dfu-util_0.9.bb (limited to 'meta-oe/recipes-support') diff --git a/meta-oe/recipes-support/dfu-util/dfu-util-native_0.8.bb b/meta-oe/recipes-support/dfu-util/dfu-util-native_0.8.bb deleted file mode 100644 index 8be9d850e0..0000000000 --- a/meta-oe/recipes-support/dfu-util/dfu-util-native_0.8.bb +++ /dev/null @@ -1,19 +0,0 @@ -require dfu-util_${PV}.bb - -inherit native deploy -do_deploy[sstate-outputdirs] = "${DEPLOY_DIR_TOOLS}" - -DEPENDS = "libusb1-native" - -FILESPATH =. "${FILE_DIRNAME}/${BPN}-${PV}:" -SRC_URI += "file://0002-Revert-Makefile.am-Drop-static-dfu-util.patch" - -do_deploy() { - install -d ${DEPLOY_DIR_TOOLS} - install -m 0755 src/dfu-util_static ${DEPLOY_DIR_TOOLS}/dfu-util-${PV} - rm -f ${DEPLOY_DIR_TOOLS}/dfu-util - ln -sf ./dfu-util-${PV} ${DEPLOY_DIR_TOOLS}/dfu-util - -} - -addtask deploy before do_package after do_install diff --git a/meta-oe/recipes-support/dfu-util/dfu-util-native_0.9.bb b/meta-oe/recipes-support/dfu-util/dfu-util-native_0.9.bb new file mode 100644 index 0000000000..7a7a662ab3 --- /dev/null +++ b/meta-oe/recipes-support/dfu-util/dfu-util-native_0.9.bb @@ -0,0 +1,16 @@ +require dfu-util_${PV}.bb + +inherit native deploy + +DEPENDS = "libusb1-native" + +SRC_URI += "file://0001-Revert-Makefile.am-Drop-static-dfu-util.patch" + +do_deploy[sstate-outputdirs] = "${DEPLOY_DIR_TOOLS}" +do_deploy() { + install -d ${DEPLOY_DIR_TOOLS} + install -m 0755 src/dfu-util_static ${DEPLOY_DIR_TOOLS}/dfu-util-${PV} + rm -f ${DEPLOY_DIR_TOOLS}/dfu-util + ln -sf ./dfu-util-${PV} ${DEPLOY_DIR_TOOLS}/dfu-util +} +addtask deploy before do_package after do_install diff --git a/meta-oe/recipes-support/dfu-util/dfu-util/0001-Revert-Makefile.am-Drop-static-dfu-util.patch b/meta-oe/recipes-support/dfu-util/dfu-util/0001-Revert-Makefile.am-Drop-static-dfu-util.patch new file mode 100644 index 0000000000..1c6ad0807e --- /dev/null +++ b/meta-oe/recipes-support/dfu-util/dfu-util/0001-Revert-Makefile.am-Drop-static-dfu-util.patch @@ -0,0 +1,68 @@ +From c2aab3b9ae1febcb6b4c6561a59df1930a57b394 Mon Sep 17 00:00:00 2001 +From: Martin JaMa Jansa +Date: Thu, 11 Aug 2011 11:19:52 +0200 +Subject: [PATCH] Revert "Makefile.am: Drop static dfu-util" + +This reverts commit fe0426ddc04f503d148c5e5f931f16b8f674f071. + +Signed-off-by: Martin JaMa Jansa +--- + configure.ac | 2 +- + src/Makefile.am | 22 +++++++++++++++++++++- + 2 files changed, 22 insertions(+), 2 deletions(-) + +diff --git a/configure.ac b/configure.ac +index f5a43b8..6a3757e 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -21,7 +21,7 @@ AS_IF([test x$native_libusb = xno], [ + AC_MSG_ERROR([*** Required libusb-1.0 >= 1.0.0 not installed ***])) + ]) + +-LIBS="$LIBS $USB_LIBS" ++LIBS="$LIBS $USB_LIBS -lpthread" + CFLAGS="$CFLAGS $USB_CFLAGS" + + # Checks for header files. +diff --git a/src/Makefile.am b/src/Makefile.am +index 70179c4..e8736ee 100644 +--- a/src/Makefile.am ++++ b/src/Makefile.am +@@ -1,6 +1,6 @@ + AM_CFLAGS = -Wall -Wextra + +-bin_PROGRAMS = dfu-util dfu-suffix dfu-prefix ++bin_PROGRAMS = dfu-util dfu-util_static dfu-suffix dfu-prefix + dfu_util_SOURCES = main.c \ + portable.h \ + dfu_load.c \ +@@ -19,6 +19,26 @@ dfu_util_SOURCES = main.c \ + quirks.c \ + quirks.h + ++dfu_util_static_SOURCES = main.c \ ++ portable.h \ ++ dfu_load.c \ ++ dfu_load.h \ ++ dfu_util.c \ ++ dfu_util.h \ ++ dfuse.c \ ++ dfuse.h \ ++ dfuse_mem.c \ ++ dfuse_mem.h \ ++ dfu.c \ ++ dfu.h \ ++ usb_dfu.h \ ++ dfu_file.c \ ++ dfu_file.h \ ++ quirks.c \ ++ quirks.h ++ ++dfu_util_static_LDFLAGS = -static ++ + dfu_suffix_SOURCES = suffix.c \ + dfu_file.h \ + dfu_file.c +-- +2.7.2 + diff --git a/meta-oe/recipes-support/dfu-util/dfu-util/0001-configure.ac-Don-t-check-for-usbpath.patch b/meta-oe/recipes-support/dfu-util/dfu-util/0001-configure.ac-Don-t-check-for-usbpath.patch deleted file mode 100644 index bab4a71341..0000000000 --- a/meta-oe/recipes-support/dfu-util/dfu-util/0001-configure.ac-Don-t-check-for-usbpath.patch +++ /dev/null @@ -1,38 +0,0 @@ -From e1811274b61db0f5ca55c50ec96d799e2d85fa06 Mon Sep 17 00:00:00 2001 -From: Martin Jansa -Date: Sun, 3 Aug 2014 17:50:06 +0200 -Subject: [PATCH 1/2] configure.ac: Don't check for usbpath - -* otherwise it fails to build with -lusb - | main.o: In function `resolve_device_path': - | dfu-util/0.7-r0/dfu-util-0.7/src/main.c:371: undefined reference to `usb_path2devnum' - | collect2: error: ld returned 1 exit status - -Signed-off-by: Martin Jansa ---- - configure.ac | 3 +-- - 1 file changed, 1 insertion(+), 2 deletions(-) - -diff --git a/configure.ac b/configure.ac -index 8622114..a1dcc7a 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -20,14 +20,13 @@ AS_IF([test x$native_libusb = xno], [ - PKG_CHECK_MODULES([USB], [libusb-1.0 >= 1.0.0],, - AC_MSG_ERROR([*** Required libusb-1.0 >= 1.0.0 not installed ***])) - ]) --AC_CHECK_LIB([usbpath],[usb_path2devnum],,,-lusb) - - LIBS="$LIBS $USB_LIBS" - CFLAGS="$CFLAGS $USB_CFLAGS" - - # Checks for header files. - AC_HEADER_STDC --AC_CHECK_HEADERS([usbpath.h windows.h sysexits.h]) -+AC_CHECK_HEADERS([windows.h sysexits.h]) - - # Checks for typedefs, structures, and compiler characteristics. - AC_C_CONST --- -2.7.2 - diff --git a/meta-oe/recipes-support/dfu-util/dfu-util/0002-Revert-Makefile.am-Drop-static-dfu-util.patch b/meta-oe/recipes-support/dfu-util/dfu-util/0002-Revert-Makefile.am-Drop-static-dfu-util.patch deleted file mode 100644 index 7bd965b0fd..0000000000 --- a/meta-oe/recipes-support/dfu-util/dfu-util/0002-Revert-Makefile.am-Drop-static-dfu-util.patch +++ /dev/null @@ -1,68 +0,0 @@ -From 7d613b28c1b48b5cc3a0882d24e0ac938faff4c2 Mon Sep 17 00:00:00 2001 -From: Martin JaMa Jansa -Date: Thu, 11 Aug 2011 11:19:52 +0200 -Subject: [PATCH 2/2] Revert "Makefile.am: Drop static dfu-util" - -This reverts commit fe0426ddc04f503d148c5e5f931f16b8f674f071. - -Signed-off-by: Martin JaMa Jansa ---- - configure.ac | 2 +- - src/Makefile.am | 22 +++++++++++++++++++++- - 2 files changed, 22 insertions(+), 2 deletions(-) - -diff --git a/configure.ac b/configure.ac -index a1dcc7a..bb71e02 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -21,7 +21,7 @@ AS_IF([test x$native_libusb = xno], [ - AC_MSG_ERROR([*** Required libusb-1.0 >= 1.0.0 not installed ***])) - ]) - --LIBS="$LIBS $USB_LIBS" -+LIBS="$LIBS $USB_LIBS -lpthread" - CFLAGS="$CFLAGS $USB_CFLAGS" - - # Checks for header files. -diff --git a/src/Makefile.am b/src/Makefile.am -index 70179c4..e8736ee 100644 ---- a/src/Makefile.am -+++ b/src/Makefile.am -@@ -1,6 +1,6 @@ - AM_CFLAGS = -Wall -Wextra - --bin_PROGRAMS = dfu-util dfu-suffix dfu-prefix -+bin_PROGRAMS = dfu-util dfu-util_static dfu-suffix dfu-prefix - dfu_util_SOURCES = main.c \ - portable.h \ - dfu_load.c \ -@@ -19,6 +19,26 @@ dfu_util_SOURCES = main.c \ - quirks.c \ - quirks.h - -+dfu_util_static_SOURCES = main.c \ -+ portable.h \ -+ dfu_load.c \ -+ dfu_load.h \ -+ dfu_util.c \ -+ dfu_util.h \ -+ dfuse.c \ -+ dfuse.h \ -+ dfuse_mem.c \ -+ dfuse_mem.h \ -+ dfu.c \ -+ dfu.h \ -+ usb_dfu.h \ -+ dfu_file.c \ -+ dfu_file.h \ -+ quirks.c \ -+ quirks.h -+ -+dfu_util_static_LDFLAGS = -static -+ - dfu_suffix_SOURCES = suffix.c \ - dfu_file.h \ - dfu_file.c --- -2.7.2 - diff --git a/meta-oe/recipes-support/dfu-util/dfu-util_0.8.bb b/meta-oe/recipes-support/dfu-util/dfu-util_0.8.bb deleted file mode 100644 index 51f4ae1e10..0000000000 --- a/meta-oe/recipes-support/dfu-util/dfu-util_0.8.bb +++ /dev/null @@ -1,17 +0,0 @@ -DESCRIPTION = "USB Device Firmware Upgrade utility" -SECTION = "devel" -AUTHOR = "Harald Welte " -LICENSE = "GPLv2" -LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f" - - -SRC_URI = "http://dfu-util.gnumonks.org/releases/${BP}.tar.gz \ - file://0001-configure.ac-Don-t-check-for-usbpath.patch \ -" - -inherit autotools pkgconfig - -DEPENDS = "libusb1" - -SRC_URI[md5sum] = "fc6daf6b0ee57d7e40ffa3e8111023d1" -SRC_URI[sha256sum] = "55cbde9be12a212bd84bce9d1e63941d9a16139ed0d4912401367eba1502f058" diff --git a/meta-oe/recipes-support/dfu-util/dfu-util_0.9.bb b/meta-oe/recipes-support/dfu-util/dfu-util_0.9.bb new file mode 100644 index 0000000000..01bca22949 --- /dev/null +++ b/meta-oe/recipes-support/dfu-util/dfu-util_0.9.bb @@ -0,0 +1,14 @@ +DESCRIPTION = "USB Device Firmware Upgrade utility" +SECTION = "devel" +AUTHOR = "Harald Welte " +LICENSE = "GPLv2" +LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f" + +SRC_URI = "http://dfu-util.gnumonks.org/releases/${BP}.tar.gz" + +inherit autotools pkgconfig + +DEPENDS = "libusb1" + +SRC_URI[md5sum] = "233bb1e08ef4b405062445d84e28fde6" +SRC_URI[sha256sum] = "36428c6a6cb3088cad5a3592933385253da5f29f2effa61518ee5991ea38f833" -- cgit 1.2.3-korg