commit f878f94b181ea43d1f0dee982d30a887be1cf2d3 Author: overweight <5324761+overweight@user.noreply.gitee.com> Date: Mon Sep 30 10:39:11 2019 -0400 Package init diff --git a/0000-fxload-noa3load.patch b/0000-fxload-noa3load.patch new file mode 100644 index 0000000..e18b732 --- /dev/null +++ b/0000-fxload-noa3load.patch @@ -0,0 +1,34 @@ +diff -up fxload-2008_10_13/fxload.8.fxload-noa3load fxload-2008_10_13/fxload.8 +--- fxload-2008_10_13/fxload.8.fxload-noa3load 2008-10-13 17:44:04.000000000 -0400 ++++ fxload-2008_10_13/fxload.8 2018-02-25 23:33:18.717749708 -0500 +@@ -224,15 +224,6 @@ and some firmware can't be placed in boo + .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 -up fxload-2008_10_13/README.txt.fxload-noa3load fxload-2008_10_13/README.txt +--- fxload-2008_10_13/README.txt.fxload-noa3load 2008-10-13 17:44:04.000000000 -0400 ++++ fxload-2008_10_13/README.txt 2018-02-25 23:33:18.717749708 -0500 +@@ -11,11 +11,6 @@ firmware on devices which boot from I2C + 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/0001-fxload-cflags-ldflags.patch b/0001-fxload-cflags-ldflags.patch new file mode 100644 index 0000000..ce7e7ed --- /dev/null +++ b/0001-fxload-cflags-ldflags.patch @@ -0,0 +1,12 @@ +diff -up fxload-2008_10_13/Makefile.cflags fxload-2008_10_13/Makefile +--- fxload-2008_10_13/Makefile.cflags 2008-10-13 17:44:04.000000000 -0400 ++++ fxload-2008_10_13/Makefile 2018-02-25 23:11:02.416103160 -0500 +@@ -39,7 +39,7 @@ release: rpms + + # object files + $(PROG): $(FILES_OBJ) +- $(CC) -o $(PROG) $(FILES_OBJ) ++ $(CC) $(CFLAGS) $(LDFLAGS) -o $(PROG) $(FILES_OBJ) + + %.o: %.c + $(CC) -c $(CFLAGS) $< -o $@ diff --git a/fxload-2008_10_13.tar.gz b/fxload-2008_10_13.tar.gz new file mode 100644 index 0000000..261c92d Binary files /dev/null and b/fxload-2008_10_13.tar.gz differ diff --git a/fxload-generate-tarball.sh b/fxload-generate-tarball.sh new file mode 100644 index 0000000..223c2b0 --- /dev/null +++ b/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/fxload.spec b/fxload.spec new file mode 100644 index 0000000..78ce1d1 --- /dev/null +++ b/fxload.spec @@ -0,0 +1,48 @@ +Name: fxload +Version: 2008_10_13 +Release: 13 +Summary: A program which downloads firmware to USB devices +License: GPLv2+ +URL: http://linux-hotplug.sourceforge.net/ +Source0: https://sourceforge.net/projects/linux-hotplug/files/fxload/2008_10_13/%{name}-%{version}.tar.gz + +Patch0: 0000-fxload-noa3load.patch +Patch1: 0001-fxload-cflags-ldflags.patch + +BuildRequires: git +Requires: udev + +%description +It is conveniently able to download firmware into FX, FX2, and FX2LP EZ-USB devices, +as well as the original AnchorChips EZ-USB. It is intended to be invoked by hotplug +scripts when the unprogrammed device appears on the bus. + + +%package help +Summary: Including man files for fxload +Requires: man + +%description help +This contains man files for the using of fxload. + +%prep +%autosetup -n %{name}-%{version} -p1 -S git + +%build +make CC=gcc CFLAGS="$RPM_OPT_FLAGS" LDFLAGS="$RPM_LD_FLAGS" + +%install +install -D -m 755 fxload %{buildroot}/sbin/fxload +install -D -m 644 fxload.8 %{buildroot}/%{_mandir}/man8/fxload.8 + +%files +%license COPYING +%doc README.txt +%attr(0755, root, root) /sbin/fxload + +%files help +%{_mandir}/*/* + +%changelog +* Wed Sep 11 2019 openEuler Buildteam - 2008_10_13-13 +- Package init