diff options
author | Tudor Florea <tudor.florea@enea.com> | 2015-10-08 22:51:41 +0200 |
---|---|---|
committer | Tudor Florea <tudor.florea@enea.com> | 2015-10-08 22:51:41 +0200 |
commit | 1219bf8a90a7bf8cd3a5363551ef635d51e8fc8e (patch) | |
tree | a21a5fc103bb3bd65ecd85ed22be5228fc54e447 /meta-oe/recipes-support/dfu-util | |
download | meta-openembedded-1219bf8a90a7bf8cd3a5363551ef635d51e8fc8e.tar.gz |
initial commit for Enea Linux 5.0 arm
Signed-off-by: Tudor Florea <tudor.florea@enea.com>
Diffstat (limited to 'meta-oe/recipes-support/dfu-util')
4 files changed, 143 insertions, 0 deletions
diff --git a/meta-oe/recipes-support/dfu-util/dfu-util-native_0.7.bb b/meta-oe/recipes-support/dfu-util/dfu-util-native_0.7.bb new file mode 100644 index 000000000..8be9d850e --- /dev/null +++ b/meta-oe/recipes-support/dfu-util/dfu-util-native_0.7.bb | |||
@@ -0,0 +1,19 @@ | |||
1 | require dfu-util_${PV}.bb | ||
2 | |||
3 | inherit native deploy | ||
4 | do_deploy[sstate-outputdirs] = "${DEPLOY_DIR_TOOLS}" | ||
5 | |||
6 | DEPENDS = "libusb1-native" | ||
7 | |||
8 | FILESPATH =. "${FILE_DIRNAME}/${BPN}-${PV}:" | ||
9 | SRC_URI += "file://0002-Revert-Makefile.am-Drop-static-dfu-util.patch" | ||
10 | |||
11 | do_deploy() { | ||
12 | install -d ${DEPLOY_DIR_TOOLS} | ||
13 | install -m 0755 src/dfu-util_static ${DEPLOY_DIR_TOOLS}/dfu-util-${PV} | ||
14 | rm -f ${DEPLOY_DIR_TOOLS}/dfu-util | ||
15 | ln -sf ./dfu-util-${PV} ${DEPLOY_DIR_TOOLS}/dfu-util | ||
16 | |||
17 | } | ||
18 | |||
19 | addtask deploy before do_package after do_install | ||
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 new file mode 100644 index 000000000..a583c333d --- /dev/null +++ b/meta-oe/recipes-support/dfu-util/dfu-util/0001-configure.ac-Don-t-check-for-usbpath.patch | |||
@@ -0,0 +1,38 @@ | |||
1 | From 63f6f6882f3813ab22c62806feeab942579a2acf Mon Sep 17 00:00:00 2001 | ||
2 | From: Martin Jansa <Martin.Jansa@gmail.com> | ||
3 | Date: Sun, 3 Aug 2014 17:50:06 +0200 | ||
4 | Subject: [PATCH 1/2] configure.ac: Don't check for usbpath | ||
5 | |||
6 | * otherwise it fails to build with -lusb | ||
7 | | main.o: In function `resolve_device_path': | ||
8 | | dfu-util/0.7-r0/dfu-util-0.7/src/main.c:371: undefined reference to `usb_path2devnum' | ||
9 | | collect2: error: ld returned 1 exit status | ||
10 | |||
11 | Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> | ||
12 | --- | ||
13 | configure.ac | 3 +-- | ||
14 | 1 file changed, 1 insertion(+), 2 deletions(-) | ||
15 | |||
16 | diff --git a/configure.ac b/configure.ac | ||
17 | index 700b556..fb58473 100644 | ||
18 | --- a/configure.ac | ||
19 | +++ b/configure.ac | ||
20 | @@ -22,14 +22,13 @@ AS_IF([test x$native_libusb = xno], [ | ||
21 | PKG_CHECK_MODULES([USB], [libusb-1.0 >= 1.0.0],, | ||
22 | AC_MSG_ERROR([*** Required libusb-1.0 >= 1.0.0 not installed ***])) | ||
23 | ]) | ||
24 | -AC_CHECK_LIB([usbpath],[usb_path2devnum],,,-lusb) | ||
25 | |||
26 | LIBS="$LIBS $USB_LIBS" | ||
27 | CFLAGS="$CFLAGS $USB_CFLAGS" | ||
28 | |||
29 | # Checks for header files. | ||
30 | AC_HEADER_STDC | ||
31 | -AC_CHECK_HEADERS([usbpath.h windows.h]) | ||
32 | +AC_CHECK_HEADERS([windows.h]) | ||
33 | |||
34 | # Checks for typedefs, structures, and compiler characteristics. | ||
35 | AC_C_CONST | ||
36 | -- | ||
37 | 2.0.2 | ||
38 | |||
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 new file mode 100644 index 000000000..de17808e1 --- /dev/null +++ b/meta-oe/recipes-support/dfu-util/dfu-util/0002-Revert-Makefile.am-Drop-static-dfu-util.patch | |||
@@ -0,0 +1,67 @@ | |||
1 | From 440a026379ff111aaa8314db1c29ffae8f482824 Mon Sep 17 00:00:00 2001 | ||
2 | From: Martin JaMa Jansa <Martin.Jansa@gmail.com> | ||
3 | Date: Thu, 11 Aug 2011 11:19:52 +0200 | ||
4 | Subject: [PATCH 2/2] Revert "Makefile.am: Drop static dfu-util" | ||
5 | |||
6 | This reverts commit fe0426ddc04f503d148c5e5f931f16b8f674f071. | ||
7 | |||
8 | Signed-off-by: Martin JaMa Jansa <Martin.Jansa@gmail.com> | ||
9 | Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> | ||
10 | --- | ||
11 | configure.ac | 2 +- | ||
12 | src/Makefile.am | 20 +++++++++++++++++++- | ||
13 | 2 files changed, 20 insertions(+), 2 deletions(-) | ||
14 | |||
15 | diff --git a/configure.ac b/configure.ac | ||
16 | index fb58473..09b9e5a 100644 | ||
17 | --- a/configure.ac | ||
18 | +++ b/configure.ac | ||
19 | @@ -23,7 +23,7 @@ AS_IF([test x$native_libusb = xno], [ | ||
20 | AC_MSG_ERROR([*** Required libusb-1.0 >= 1.0.0 not installed ***])) | ||
21 | ]) | ||
22 | |||
23 | -LIBS="$LIBS $USB_LIBS" | ||
24 | +LIBS="$LIBS $USB_LIBS -lpthread" | ||
25 | CFLAGS="$CFLAGS $USB_CFLAGS" | ||
26 | |||
27 | # Checks for header files. | ||
28 | diff --git a/src/Makefile.am b/src/Makefile.am | ||
29 | index 99df307..28d53f7 100644 | ||
30 | --- a/src/Makefile.am | ||
31 | +++ b/src/Makefile.am | ||
32 | @@ -1,6 +1,6 @@ | ||
33 | AM_CFLAGS = -Wall | ||
34 | |||
35 | -bin_PROGRAMS = dfu-util dfu-suffix | ||
36 | +bin_PROGRAMS = dfu-util dfu-util_static dfu-suffix | ||
37 | dfu_util_SOURCES = main.c \ | ||
38 | portable.h \ | ||
39 | dfu_load.c \ | ||
40 | @@ -17,6 +17,24 @@ dfu_util_SOURCES = main.c \ | ||
41 | quirks.c \ | ||
42 | quirks.h | ||
43 | |||
44 | +dfu_util_static_SOURCES = main.c \ | ||
45 | + portable.h \ | ||
46 | + dfu_load.c \ | ||
47 | + dfu_load.h \ | ||
48 | + dfuse.c \ | ||
49 | + dfuse.h \ | ||
50 | + dfuse_mem.c \ | ||
51 | + dfuse_mem.h \ | ||
52 | + dfu.c \ | ||
53 | + dfu.h \ | ||
54 | + usb_dfu.h \ | ||
55 | + dfu_file.c \ | ||
56 | + dfu_file.h \ | ||
57 | + quirks.c \ | ||
58 | + quirks.h | ||
59 | + | ||
60 | +dfu_util_static_LDFLAGS = -static | ||
61 | + | ||
62 | dfu_suffix_SOURCES = suffix.c \ | ||
63 | dfu_file.h \ | ||
64 | dfu_file.c \ | ||
65 | -- | ||
66 | 2.0.2 | ||
67 | |||
diff --git a/meta-oe/recipes-support/dfu-util/dfu-util_0.7.bb b/meta-oe/recipes-support/dfu-util/dfu-util_0.7.bb new file mode 100644 index 000000000..7f06f8f6a --- /dev/null +++ b/meta-oe/recipes-support/dfu-util/dfu-util_0.7.bb | |||
@@ -0,0 +1,19 @@ | |||
1 | DESCRIPTION = "USB Device Firmware Upgrade utility" | ||
2 | SECTION = "devel" | ||
3 | AUTHOR = "Harald Welte <laforge@openmoko.org>" | ||
4 | LICENSE = "GPLv2" | ||
5 | LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f" | ||
6 | |||
7 | S = "${WORKDIR}/git" | ||
8 | |||
9 | SRC_URI = "git://gitorious.org/dfu-util/dfu-util.git \ | ||
10 | file://0001-configure.ac-Don-t-check-for-usbpath.patch \ | ||
11 | " | ||
12 | SRCREV="a0a3668e0571a9b007f7d62b01e7dcfd7754ce50" | ||
13 | |||
14 | inherit autotools pkgconfig | ||
15 | |||
16 | DEPENDS = "libusb1" | ||
17 | |||
18 | SRC_URI[md5sum] = "1de724551604bce1962960b7a301cc08" | ||
19 | SRC_URI[sha256sum] = "5d253f924fd29bc13054b664bba9aa86b865299971195969478253c1775b7e56" | ||