Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 25 Aug 2008 23:50:00 GMT
From:      Steve Franks <stevefranks@ieee.org>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/126839: ports/misc/ezload - update: add hardware support for recent usb devices
Message-ID:  <200808252350.m7PNo0s8049618@www.freebsd.org>
Resent-Message-ID: <200808260000.m7Q00AUi005889@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         126839
>Category:       ports
>Synopsis:       ports/misc/ezload - update: add hardware support for recent usb devices
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          update
>Submitter-Id:   current-users
>Arrival-Date:   Tue Aug 26 00:00:10 UTC 2008
>Closed-Date:
>Last-Modified:
>Originator:     Steve Franks
>Release:        7-stable
>Organization:
>Environment:
applies to all freebsd releases
>Description:
Linux maintains a project, "fxload" which is analagous to ezload in all respects.  Ezload however, has not been updated since 2004, and new hardware has been added to the family with a different ID, necessitating a 1-line change to support it (this is a USB chipset; devices utilizing it include USB-MIDI dongles, and some jtag dongles; it is a very common chipset in my experience).

I have tried to reach the ezload maintainer several times without sucess.  The attatched diff makes ezload work on all my devices.  I suppose an alternative would be to port the linux fxload project from sourceforge, which I tried as well, but am no where near experienced enough to match linux's headers to freebsd's...

Note that ezload is actually two programs, ezdownload and ezupload.  The included patch is actually for ezdownload, and an analagous operation should no doubt be perfomed for ezupload as well.
>How-To-Repeat:
n/a
>Fix:
patch file included

Patch attached with submission follows:

--- ./ezdownload-0.4.0/ezdownload.c	2004-12-23 16:14:43.000000000 -0700
+++ ezdownload.c	2008-04-07 13:49:10.000000000 -0700
@@ -96,7 +96,7 @@
 /* See http://www.anchorchips.com for the
  * EZ-USB Technical Reference Manual (EZUSB_TRM.pdf).
  */
-#define CPUCS 0x7f92
+static unsigned int CPUCS = 0x7f92;
 #define USBSC 0x7fd6
 
 /* This whole reading routine sucks. you could do it in
@@ -340,7 +340,7 @@
 char * progname;
 void usage() 
 {
-	fprintf(stderr, "Syntax: %s [-r] [-v] [-f hexfile] device\n", progname);
+	fprintf(stderr, "Syntax: %s [-r] [-v] [-2] [-f hexfile] device\n", progname);
 	exit(1);
 }
 
@@ -363,7 +363,7 @@
 	progname = argv[0];
 
 	/* handle the arguments */
-	while((ch = getopt(argc, argv, "xrvf:")) != -1) 
+	while((ch = getopt(argc, argv, "2xrvf:")) != -1) 
 		switch (ch) {
 		case 'v':
 			verbose++;
@@ -374,6 +374,9 @@
 		case 'f':
 			hexfile = optarg;
 			break;
+		case '2':
+			CPUCS  = 0xe600;
+			break;
 		case 'x':
 			force = 1;
 			break;


>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200808252350.m7PNo0s8049618>