From e32cc6b40f1cfb9ccb1b49dc68a7800b368af553 Mon Sep 17 00:00:00 2001 From: ian Date: Sun, 8 Feb 2009 22:32:40 +0000 Subject: [PATCH] dfu-util for Openmoko & similar devices, improved by fgsch@, comments by various, ok sthen@ --- comms/dfu-util/Makefile | 33 +++++++++++++++++++++++++ comms/dfu-util/distinfo | 5 ++++ comms/dfu-util/patches/patch-src_main_c | 17 +++++++++++++ comms/dfu-util/pkg/DESCR | 4 +++ comms/dfu-util/pkg/PLIST | 4 +++ 5 files changed, 63 insertions(+) create mode 100644 comms/dfu-util/Makefile create mode 100644 comms/dfu-util/distinfo create mode 100644 comms/dfu-util/patches/patch-src_main_c create mode 100644 comms/dfu-util/pkg/DESCR create mode 100644 comms/dfu-util/pkg/PLIST diff --git a/comms/dfu-util/Makefile b/comms/dfu-util/Makefile new file mode 100644 index 00000000000..4b10cb55ef6 --- /dev/null +++ b/comms/dfu-util/Makefile @@ -0,0 +1,33 @@ +# $OpenBSD: Makefile,v 1.1.1.1 2009/02/08 22:32:40 ian Exp $ + +COMMENT = device firmware update (DFU) USB programmer + +DISTNAME = dfu-util-svn-4900 +PKGNAME = dfu-util-0.1 + +CATEGORIES = comms + +HOMEPAGE = http://wiki.openmoko.org/wiki/Dfu-util + +MAINTAINER = Ian Darwin + +# GPLv2 +PERMIT_PACKAGE_CDROM = Yes +PERMIT_PACKAGE_FTP = Yes +PERMIT_DISTFILES_CDROM = Yes +PERMIT_DISTFILES_FTP = Yes + +WANTLIB = c usb + +MASTER_SITES = http://lodoss.net/ + +LIB_DEPENDS = ::devel/libusb + +CONFIGURE_STYLE = gnu + +NO_REGRESS = Yes + +post-install: + ${INSTALL_DATA} ${WRKSRC}/doc/dfu-util.1 ${PREFIX}/man/man1 + +.include diff --git a/comms/dfu-util/distinfo b/comms/dfu-util/distinfo new file mode 100644 index 00000000000..9893919551a --- /dev/null +++ b/comms/dfu-util/distinfo @@ -0,0 +1,5 @@ +MD5 (dfu-util-svn-4900.tar.gz) = bSrf7J6vg69+2D60Ky/Qcw== +RMD160 (dfu-util-svn-4900.tar.gz) = Ur6L7/8h5RQmbbtkQtW5WIKz8Lo= +SHA1 (dfu-util-svn-4900.tar.gz) = LYiKTmpitjirDzMgZ141nQlXQ6A= +SHA256 (dfu-util-svn-4900.tar.gz) = hOE5gljfEY1o2dAT6GyY9QKREG3SszBmSh9TDYK2Mok= +SIZE (dfu-util-svn-4900.tar.gz) = 94703 diff --git a/comms/dfu-util/patches/patch-src_main_c b/comms/dfu-util/patches/patch-src_main_c new file mode 100644 index 00000000000..fcceedbdbbe --- /dev/null +++ b/comms/dfu-util/patches/patch-src_main_c @@ -0,0 +1,17 @@ +$OpenBSD: patch-src_main_c,v 1.1.1.1 2009/02/08 22:32:40 ian Exp $ + +From Bug 672 in OpenMoko via Simon Moore + +--- src/main.c.orig Fri Mar 30 13:21:03 2007 ++++ src/main.c Tue Aug 7 15:29:25 2007 +@@ -82,8 +82,8 @@ static int find_dfu_if(struct usb_device *dev, int (*h + + memset(dfu_if, 0, sizeof(*dfu_if)); + +- for (cfg_idx = 0; cfg_idx < dev->descriptor.bNumConfigurations; +- cfg_idx++) { ++ for (cfg_idx = 0; NULL != dev->config && ++ cfg_idx < dev->descriptor.bNumConfigurations; cfg_idx++) { + cfg = &dev->config[cfg_idx]; + for (intf_idx = 0; intf_idx < cfg->bNumInterfaces; + intf_idx++) { diff --git a/comms/dfu-util/pkg/DESCR b/comms/dfu-util/pkg/DESCR new file mode 100644 index 00000000000..d6b7d8d85e3 --- /dev/null +++ b/comms/dfu-util/pkg/DESCR @@ -0,0 +1,4 @@ +dfu-util is a program that implements the host (PC) side of the USB +DFU (Universal Serial Bus Device Firmware Upgrade) protocol. +It is typically used to re-flash firmware in Openmoko phones and +similar devices. diff --git a/comms/dfu-util/pkg/PLIST b/comms/dfu-util/pkg/PLIST new file mode 100644 index 00000000000..027106b60da --- /dev/null +++ b/comms/dfu-util/pkg/PLIST @@ -0,0 +1,4 @@ +@comment $OpenBSD: PLIST,v 1.1.1.1 2009/02/08 22:32:40 ian Exp $ +@bin bin/dfu-util +@comment bin/dfu-util_static +@man man/man1/dfu-util.1