From d21fe69dce72f80e0a164c4504bae3b18d7581b3 Mon Sep 17 00:00:00 2001 From: Ed Robbins Date: Mon, 13 Jan 2014 23:18:34 +0000 Subject: [PATCH 1/2] avrdude - get libelf, libftdi1 and pthread detected properly --- dev-embedded/avrdude/avrdude-6.0.1.recipe | 9 ++++- .../avrdude/patches/avrdude-6.0.1.patch | 37 +++++++++++++++++++ 2 files changed, 45 insertions(+), 1 deletion(-) create mode 100644 dev-embedded/avrdude/patches/avrdude-6.0.1.patch diff --git a/dev-embedded/avrdude/avrdude-6.0.1.recipe b/dev-embedded/avrdude/avrdude-6.0.1.recipe index 28493ec1f..acc6890ca 100644 --- a/dev-embedded/avrdude/avrdude-6.0.1.recipe +++ b/dev-embedded/avrdude/avrdude-6.0.1.recipe @@ -20,6 +20,7 @@ if [ $effectiveTargetArchitecture != x86_gcc2 ]; then ARCHITECTURES="$ARCHITECTURES x86_gcc2" fi SECONDARY_ARCHITECTURES="x86" +PATCHES="avrdude-6.0.1.patch" GLOBAL_WRITABLE_FILES=" settings/avrdude.conf keep-old @@ -33,9 +34,13 @@ PROVIDES=" REQUIRES=" haiku$secondaryArchSuffix >= $haikuVersion lib:libusb_1.0$secondaryArchSuffix + lib:libftdi1$secondaryArchSuffix + lib:libelf$secondaryArchSuffix " BUILD_REQUIRES=" devel:libusb_1.0$secondaryArchSuffix + devel:libftdi1$secondaryArchSuffix + devel:libelf$secondaryArchSuffix " BUILD_PREREQUIRES=" haiku${secondaryArchSuffix}_devel >= $haikuVersion @@ -46,12 +51,14 @@ BUILD_PREREQUIRES=" cmd:make cmd:yacc cmd:flex - cmd:pkg_config$secondaryArchSuffix + cmd:pkg_config " BUILD() { + export PKG_CONFIG_LIBDIR=/system/develop/lib/x86/pkgconfig/ aclocal + autoconf automake runConfigure ./configure make $jobArgs diff --git a/dev-embedded/avrdude/patches/avrdude-6.0.1.patch b/dev-embedded/avrdude/patches/avrdude-6.0.1.patch new file mode 100644 index 000000000..6549b0239 --- /dev/null +++ b/dev-embedded/avrdude/patches/avrdude-6.0.1.patch @@ -0,0 +1,37 @@ +diff -Naur avrdude-6.0.1/configure.ac avrdude-6.0.1-haiku/configure.ac +--- avrdude-6.0.1/configure.ac 2013-09-18 06:19:42.038010880 +0000 ++++ avrdude-6.0.1-haiku/configure.ac 2014-01-13 23:01:38.477102080 +0000 +@@ -96,6 +96,7 @@ + + AC_SEARCH_LIBS([gethostent], [nsl]) + AC_SEARCH_LIBS([setsockopt], [socket]) ++AC_SEARCH_LIBS(socket, socket network) + AH_TEMPLATE([HAVE_LIBUSB], + [Define if USB support is enabled via libusb]) + AC_CHECK_LIB([usb], [usb_get_string_simple], [have_libusb=yes]) +@@ -176,11 +177,8 @@ + fi + AC_CHECK_HEADERS([pthread.h]) + # as there exits header file only pthread implementations for Windows, check if we have a library +-AC_CHECK_LIB([pthread], [pthread_create], [have_pthread=yes]) +-if test x$have_pthread = xyes; then +- LIBPTHREAD="-lpthread" +-fi +-AC_SUBST(LIBPTHREAD, $LIBPTHREAD) ++AC_SEARCH_LIBS([pthread_create], [pthread], [have_pthread=yes]) ++ + # Checks for header files. + AC_CHECK_HEADERS([limits.h stdlib.h string.h]) + AC_CHECK_HEADERS([fcntl.h sys/ioctl.h sys/time.h termios.h unistd.h]) +diff -Naur avrdude-6.0.1/Makefile.am avrdude-6.0.1-haiku/Makefile.am +--- avrdude-6.0.1/Makefile.am 2013-09-18 05:59:07.037224448 +0000 ++++ avrdude-6.0.1-haiku/Makefile.am 2014-01-13 21:50:05.837550080 +0000 +@@ -63,7 +63,7 @@ + + libavrdude_a_CFLAGS = @ENABLE_WARNINGS@ + +-avrdude_LDADD = $(top_builddir)/$(noinst_LIBRARIES) @LIBUSB_1_0@ @LIBUSB@ @LIBFTDI1@ @LIBFTDI@ @LIBHID@ @LIBELF@ @LIBPTHREAD@ -lm ++avrdude_LDADD = $(top_builddir)/$(noinst_LIBRARIES) @LIBUSB_1_0@ @LIBUSB@ @LIBFTDI1@ @LIBFTDI@ @LIBHID@ @LIBELF@ + + bin_PROGRAMS = avrdude + From dbb618043d5c403adefeae0635ff359b9f121392 Mon Sep 17 00:00:00 2001 From: Ed Robbins Date: Tue, 14 Jan 2014 11:04:35 +0000 Subject: [PATCH 2/2] Add fxload recipe --- sys-apps/fxload/fxload-20120810.recipe | 61 ++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 sys-apps/fxload/fxload-20120810.recipe diff --git a/sys-apps/fxload/fxload-20120810.recipe b/sys-apps/fxload/fxload-20120810.recipe new file mode 100644 index 000000000..c448bc656 --- /dev/null +++ b/sys-apps/fxload/fxload-20120810.recipe @@ -0,0 +1,61 @@ +SUMMARY="fxload - utility for EZ-USB firmware installation" +DESCRIPTION=" +This program is conveniently able to download firmware into FX, FX2, and FX2LP \ +EZ-USB devices, as well as the original AnchorChips EZ-USB. +Primarily as an aid for developers, this can also be used to update firmware on \ +devices which boot from I2C serial EEPROMs. For that use, as well as \ +downloading firmware to all other off-chip memory, a second stage loader must \ +first be downloaded. +The distribution includes a3load.hex, which is a simple second stage loader \ +that works with all the EZ-USB products listed above. If you want to write to \ +an EEPROM, you can use the appropriate version of the Vend_Ax code provided \ +with the Cypress developer kit. +This program was modified from the original version available from \ +http://linux-hotplug.sourceforge.net to use libusbx [http://libusbx.org]. The \ +aim is to integrate this program into the libusbx samples directory. +Besides Linux, use of libusbx as the USB backend allows fxload to be used on \ +Windows, OS-X as well as any other platform supported by libusbx. +You are invited to post any bug reports or patches to the libusbx-devel mailing \ +list. +" +LICENSE="GNU GPL v2" +COPYRIGHT=" + 2001 Stephen Williams + 2001-2002 David Brownell + 2008 Roger Williams + 2012 Pete Batard + " +HOMEPAGE="https://github.com/pbatard/fxload" +SRC_URI="git+git://github.com/pbatard/fxload#cd1c1a062579b921d7694a3244cdefc60fd3325f" +REVISION="1" +ARCHITECTURES="x86_gcc2" +SECONDARY_ARCHITECTURES="x86" +PROVIDES=" + cmd:fxload$secondaryArchSuffix + " +REQUIRES=" + lib:libusb_1.0$secondaryArchSuffix + haiku$secondaryArchSuffix >= $haikuVersion + " +BUILD_REQUIRES=" + devel:libusb_1.0${secondaryArchSuffix} + haiku${secondaryArchSuffix}_devel >= $haikuVersion + " +BUILD_PREREQUIRES=" + cmd:make + cmd:gcc$secondaryArchSuffix + cmd:ld$secondaryArchSuffix + cmd:pkg_config + cmd:install + " + +BUILD() +{ + export PKG_CONFIG_LIBDIR=/system/develop/lib/x86/pkgconfig/ + make +} + +INSTALL() +{ + make install sbindir=$binDir mandir=$manDir INSTALL_PROGRAM="install -cD" +}