diff --git a/avrdude-5.5.usbtiny.64bit.patch b/avrdude-5.5.usbtiny.64bit.patch new file mode 100644 index 0000000..48bdcd6 --- /dev/null +++ b/avrdude-5.5.usbtiny.64bit.patch @@ -0,0 +1,35 @@ +--- avrdude-5.5/usbtiny.c 2007-10-29 09:40:04.000000000 -0600 ++++ avrdude-5.5.patched/usbtiny.c 2008-01-06 07:13:41.000000000 -0700 +@@ -138,7 +138,7 @@ + fprintf( stderr, "Operation %d not defined for this chip!\n", op ); + return -1; + } +- memset(cmd, 0, sizeof(cmd)); ++ memset(cmd, 0, 4); + avr_set_bits(p->op[op], cmd); + + return pgm->cmd(pgm, cmd, res); +@@ -286,19 +286,19 @@ + int nbytes; + + // Make sure its empty so we don't read previous calls if it fails +- memset(res, '\0', sizeof(res) ); ++ memset(res, '\0', 4 ); + + nbytes = usb_in( USBTINY_SPI, + (cmd[1] << 8) | cmd[0], // convert to 16-bit words + (cmd[3] << 8) | cmd[2], // " +- res, sizeof(res), 8 * sck_period ); ++ res, 4, 8 * sck_period ); + if (verbose > 1) { + // print out the data we sent and received +- printf( "CMD: [%02x %02x %02x %02x] [%02x %02x %02x %02x]\n", ++ printf( "CMD: [%02x %02x %02x %02x] [%02x %02x %02x %02x] \n", + cmd[0], cmd[1], cmd[2], cmd[3], + res[0], res[1], res[2], res[3] ); + } +- return ((nbytes == sizeof(res)) && // should have read 4 bytes ++ return ((nbytes == 4) && // should have read 4 bytes + res[2] == cmd[1]); // AVR's do a delayed-echo thing + } + diff --git a/avrdude.spec b/avrdude.spec index 844a69c..7427036 100644 --- a/avrdude.spec +++ b/avrdude.spec @@ -1,12 +1,13 @@ Name: avrdude Version: 5.5 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Software for programming Atmel AVR Microcontroller Group: Applications/Engineering License: GPLv2+ -URL: http://www.bsdhome.com/avrdude/ +URL: http://www.nongnu.org/avrdude Source0: http://download.savannah.gnu.org/releases/%{name}/%{name}-%{version}.tar.gz +Patch0: avrdude-5.5.usbtiny.64bit.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: flex @@ -32,6 +33,7 @@ particular chip. %prep %setup -q +%patch0 -p1 chmod -x safemode.c doc/TODO sed -i 's|/usr/local/etc/avrdude.conf|/etc/avrdude/avrdude.conf|g' doc/avrdude.texi avrdude.1 sed -i 's|/etc/avrdude.conf|/etc/avrdude/avrdude.conf|g' doc/avrdude.texi avrdude.1 @@ -79,6 +81,10 @@ fi %changelog +* Fri Jan 11 2008 Trond Danielsen - 5.5-2 +- Added patch for 64-bit systems. +- Corrected the URL to the avrude homepage. + * Sat Dec 29 2007 Trond Danielsen - 5.5-1 - New upstream version - Fixed minor rpmlint warning.