dfu-util for Openmoko & similar devices, improved by fgsch@,

comments by various, ok sthen@
This commit is contained in:
ian 2009-02-08 22:32:40 +00:00
parent 3f5367e1af
commit e32cc6b40f
5 changed files with 63 additions and 0 deletions

33
comms/dfu-util/Makefile Normal file
View File

@ -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 <ian@openbsd.org>
# 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 <bsd.port.mk>

5
comms/dfu-util/distinfo Normal file
View File

@ -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

View File

@ -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++) {

4
comms/dfu-util/pkg/DESCR Normal file
View File

@ -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.

4
comms/dfu-util/pkg/PLIST Normal file
View File

@ -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