From dccfa6a9976ae944f27d337209d0295afde0cdfa Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Oct 31 2019 09:39:12 +0000 Subject: import fxload-2002_04_11-16.el7 --- diff --git a/.fxload.metadata b/.fxload.metadata new file mode 100644 index 0000000..8a4edbb --- /dev/null +++ b/.fxload.metadata @@ -0,0 +1 @@ +4ff56692f3d6df49500c308118cf47f1c4e28705 SOURCES/fxload-2002_04_11-noa3load.tar.gz diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..a4f893c --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +SOURCES/fxload-2002_04_11-noa3load.tar.gz diff --git a/SOURCES/fxload-generate-tarball.sh b/SOURCES/fxload-generate-tarball.sh new file mode 100644 index 0000000..223c2b0 --- /dev/null +++ b/SOURCES/fxload-generate-tarball.sh @@ -0,0 +1,8 @@ +#!/bin/sh + +VERSION=$1 + +tar -xzvf fxload-${VERSION}.tar.gz +rm fxload-${VERSION}/a3load.hex +tar -czvf fxload-${VERSION}-noa3load.tar.gz fxload-${VERSION} + diff --git a/SOURCES/fxload-header.patch b/SOURCES/fxload-header.patch new file mode 100644 index 0000000..baac5cf --- /dev/null +++ b/SOURCES/fxload-header.patch @@ -0,0 +1,11 @@ +--- ezusb.c 2002-04-12 06:08:01.000000000 +0200 ++++ ezusb.c.new 2006-12-07 23:57:04.000000000 +0100 +@@ -29,7 +29,7 @@ + # include + + # include +-# include ++# include + # include + + # include "ezusb.h" diff --git a/SOURCES/fxload-man.patch b/SOURCES/fxload-man.patch new file mode 100644 index 0000000..073e862 --- /dev/null +++ b/SOURCES/fxload-man.patch @@ -0,0 +1,63 @@ +diff --git a/fxload.8 b/fxload.8 +index 71dcdf4..36e63b9 100644 +--- a/fxload.8 ++++ b/fxload.8 +@@ -30,6 +30,7 @@ fxload \- Firmware download to EZ-USB devices + .BI "[ \-v ]" + .BI "[ \-D " devpath " ]" + .BI "[ \-I " hexfile " ]" ++.BI "[ \-2 ]" + .BI "[ \-t " type " ]" + .BI "[ \-c " config " ]" + .BI "[ \-s " loader " ]" +@@ -41,6 +42,7 @@ fxload \- Firmware download to EZ-USB devices + .br + .B fxload + .BI "[ \-V ]" ++.BI "[ \-? ]" + .SH "DESCRIPTION" + .B fxload + is a program which downloads firmware to USB devices based on +@@ -116,6 +118,9 @@ are also available. + .B "\-V" + Identifies the version of fxload being invoked, and exits + without performing other actions. ++.TP ++.B "\-?" ++Show usage. + .PP + Note that when downloading firmware that renumerates, + there's no point in changing the device permissions +@@ -155,6 +160,9 @@ As a last step when loading firmware, + normally overwrites this second stage loader + with parts of the firmware residing on-chip. + .TP ++.BI "\-2" ++Same as "-t fx2". ++.TP + .BI "\-t " type + Indicates which type of microcontroller is used in the device; + type may be one of +diff --git a/main.c b/main.c +index 6845cd0..4af3ade 100644 +--- a/main.c ++++ b/main.c +@@ -163,13 +163,17 @@ int main(int argc, char*argv[]) + usage: + fputs ("usage: ", stderr); + fputs (argv [0], stderr); +- fputs (" [-vV] [-t type] [-D devpath]\n", stderr); ++ fputs (" [-?] [-v] [-V] [-t type] [-2] [-D devpath]\n", stderr); + fputs ("\t\t[-I firmware_hexfile] ", stderr); + fputs ("[-s loader] [-c config_byte]\n", stderr); + fputs ("\t\t[-L link] [-m mode]\n", stderr); + fputs ("... [-D devpath] overrides DEVICE= in env\n", stderr); + fputs ("... device types: one of an21, fx, fx2\n", stderr); + fputs ("... at least one of -I, -L, -m is required\n", stderr); ++ fputs ("... -v: increase verbosity\n", stderr); ++ fputs ("... -V: print version\n", stderr); ++ fputs ("... -2: same as '-t fx2'\n", stderr); ++ fputs ("... -?: this help\n", stderr); + return -1; + } + diff --git a/SOURCES/fxload-noa3load.patch b/SOURCES/fxload-noa3load.patch new file mode 100644 index 0000000..7d80fee --- /dev/null +++ b/SOURCES/fxload-noa3load.patch @@ -0,0 +1,34 @@ +diff -urN fxload-2002_04_11/fxload.8 fxload-2002_04_11-noa3load/fxload.8 +--- fxload-2002_04_11/fxload.8 2002-04-11 22:08:01.000000000 -0600 ++++ fxload-2002_04_11-noa3load/fxload.8 2007-11-16 23:13:40.000000000 -0700 +@@ -217,15 +217,6 @@ + .B DEVICE + normally names a "usbfs" file that will be used to talk to the device. + This is provided by the Linux kernel as part of USB hotplugging. +-.SH "FILES" +-.TP +-.I /usr/share/usb/a3load.hex +-Second stage loader that works with AnchorChips EZ-USB, +-Cypress EZ-USB FX, and Cypress EZ-USB FX2. +-Note that this only supports the 0xA3 vendor command, to +-write external memory. +-A loader that also supports the 0xA2 command, to write boot EEPROMs, +-is included with Cypress developer kits. + .SH "SEE ALSO" + .BR hotplug "(8) " + .SH "AUTHORS" +diff -urN fxload-2002_04_11/README.txt fxload-2002_04_11-noa3load/README.txt +--- fxload-2002_04_11/README.txt 2002-04-11 22:08:01.000000000 -0600 ++++ fxload-2002_04_11-noa3load/README.txt 2007-11-16 23:13:29.000000000 -0700 +@@ -11,11 +11,6 @@ + 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. +- + + UPDATES + diff --git a/SPECS/fxload.spec b/SPECS/fxload.spec new file mode 100644 index 0000000..a38326e --- /dev/null +++ b/SPECS/fxload.spec @@ -0,0 +1,121 @@ +Name: fxload +Version: 2002_04_11 +Release: 16%{?dist} +Summary: A helper program to download firmware into FX and FX2 EZ-USB devices + +Group: System Environment/Kernel +License: GPLv2+ +URL: http://linux-hotplug.sourceforge.net/ +Source0: fxload-2002_04_11-noa3load.tar.gz +# The above file is derived from: +# http://downloads.sourceforge.net/linux-hotplug/fxload-2002_04_11.tar.gz +# This file contains code that is copyright Cypress Semiconductor Inc, +# and cannot be distributed. Therefore we use this script to remove the +# copyright code before shipping it. Download the upstream tarball and +# invoke this script while in the tarball's directory: +# ./fxload-generate-tarball.sh 2002_04_11 +Source1: fxload-generate-tarball.sh +Patch0: fxload-header.patch +Patch1: fxload-noa3load.patch +Patch2: fxload-man.patch +BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) + +BuildRequires: kernel-headers +Requires: udev +Conflicts: hotplug-gtk hotplug + +%description +This program is conveniently able to download firmware into FX and FX2 +EZ-USB devices, as well as the original AnchorChips EZ-USB. It is +intended to be invoked by udev scripts when the unprogrammed device +appears on the bus. + +%prep +%setup -q +%patch0 -p0 -b .fxload-header +%patch1 -p1 -b .fxload-noa3load +%patch2 -p1 -b .fxload-man + +%build +make + +%install +rm -rf %{buildroot} +mkdir -p -m 755 %{buildroot}/sbin +install -m 755 fxload %{buildroot}/sbin +mkdir -p -m 755 %{buildroot}/%{_mandir}/man8/ +install -m 644 fxload.8 %{buildroot}/%{_mandir}/man8/ + +%clean +rm -rf %{buildroot} + +%files +%defattr(0644,root,root,0755) +%doc COPYING +%doc README.txt +%attr(0755, root, root) /sbin/fxload +%{_mandir}/*/* + +%changelog +* Fri Jan 24 2014 Daniel Mach - 2002_04_11-16 +- Mass rebuild 2014-01-24 + +* Fri Dec 27 2013 Daniel Mach - 2002_04_11-15 +- Mass rebuild 2013-12-27 + +* Wed Jul 31 2013 Jaroslav Kysela - 2002_04_11-14 +- Man page and usage updates +- rhbz#948527 + +* Wed Feb 13 2013 Fedora Release Engineering - 2002_04_11-13 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild + +* Thu Jul 19 2012 Fedora Release Engineering - 2002_04_11-12 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + +* Fri Jan 13 2012 Fedora Release Engineering - 2002_04_11-11 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild + +* Tue Feb 08 2011 Fedora Release Engineering - 2002_04_11-10 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild + +* Fri Jul 24 2009 Fedora Release Engineering - 2002_04_11-9 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild + +* Tue Feb 24 2009 Fedora Release Engineering - 2002_04_11-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild + +* Sat Feb 9 2008 Stephen Warren - 2002_04_11-7 +- Bump version to rebuild with gcc-4.3 + +* Sat Nov 16 2007 Stephen Warren - 2002_04_11-6 +- Rework the spec file formatting to match templates from rpmdev +- Be explicit about file attributes, just in case + +* Sat Nov 16 2007 Stephen Warren - 2002_04_11-5 +- Updates after reading packaging guide-lines more thoroughly: +- Make license version more explicit +- Add generate-tarball.sh, and associated comments +- Added BuildRequires on kernel-headers +- Added COPYING as a doc +- Use dollar v.s. percent macros more consitently + +* Fri Nov 15 2007 Stephen Warren - 2002_04_11-4 +- Repackage the source tarball to remove a3load.hex +- Added instructions to spec file on how to do the above +- Remove reference to a3load.hex from the man page too + +* Thu Nov 15 2007 Stephen Warren - 2002_04_11-3 +- Update BuildRoot per Fedora wiki +- Fixed rpmlint complaint about not cleaning buildroot +- Updated source patch file to match latest kernel file layout +- Add patch to remove reference to non-shipped non-free a3load.hex firmware + +* Fri Dec 8 2006 Bart Vanbrabant - 2002_04_11-2 +- Fixed some rpmlint complaints +- Added patch to fix an include header +- Added dist tag + +* Wed Apr 12 2006 Bart Vanbrabant - 2002_04_11-1 +- First version of fxload spec based on hotplug spec +