aboutsummaryrefslogtreecommitdiffstats
path: root/misc
diff options
context:
space:
mode:
authormakc <makc@FreeBSD.org>2010-05-16 03:41:48 +0800
committermakc <makc@FreeBSD.org>2010-05-16 03:41:48 +0800
commit5714883bfae9a33d4c56188286adb7bb53ec442b (patch)
tree69d80c4a818f567614fcf5fca065504bcced6a0f /misc
parent5139e056176e21b0b30220fe011b4fa62b446cb8 (diff)
downloadfreebsd-ports-gnome-5714883bfae9a33d4c56188286adb7bb53ec442b.tar.gz
freebsd-ports-gnome-5714883bfae9a33d4c56188286adb7bb53ec442b.tar.zst
freebsd-ports-gnome-5714883bfae9a33d4c56188286adb7bb53ec442b.zip
Add new port misc/fxload:
The utility allows you to download firmware into and upload firmware from the memory of a Cypress EZ-USB/FX2 chip. It is a de facto standard for programming this family of devices. Port is based on original fxload(8) program available from Linux Hotplug Project. Libusb support has been provided to correctly work on FreeBSD. WWW: http://FreeBSD.czest.pl/~wkoszek/fxload/ PR: ports/146577 Submitted by: wkoszek@
Diffstat (limited to 'misc')
-rw-r--r--misc/fxload/Makefile37
-rw-r--r--misc/fxload/distinfo3
-rw-r--r--misc/fxload/files/pkg-message.in14
-rw-r--r--misc/fxload/files/xilinx.conf65
-rw-r--r--misc/fxload/pkg-descr10
-rw-r--r--misc/fxload/pkg-plist5
6 files changed, 134 insertions, 0 deletions
diff --git a/misc/fxload/Makefile b/misc/fxload/Makefile
new file mode 100644
index 000000000000..df27faefa988
--- /dev/null
+++ b/misc/fxload/Makefile
@@ -0,0 +1,37 @@
+# New ports collection makefile for: fxload
+# Date created: 10 May 2010
+# Whom: Wojciech A. Koszek <wkoszek@FreeBSD.org>
+#
+# $FreeBSD$
+#
+
+PORTNAME= fxload
+PORTVERSION= 20100510
+CATEGORIES= misc
+MASTER_SITES= http://FreeBSD.czest.pl/~wkoszek/ports/
+
+MAINTAINER= wkoszek@FreeBSD.org
+COMMENT= Firmware download to EZ-USB devices
+
+MAN8= fxload.8
+USE_GMAKE= yes
+SUB_FILES= pkg-message
+
+do-install:
+ ${INSTALL_PROGRAM} ${WRKSRC}/fxload ${PREFIX}/sbin
+ ${INSTALL_MAN} ${WRKSRC}/fxload.8 ${PREFIX}/man/man8
+ ${MKDIR} ${DATADIR}
+ ${MKDIR} ${PREFIX}/etc/devd
+ ${INSTALL_DATA} ${WRKSRC}/a3load.hex ${DATADIR}
+ ${INSTALL_DATA} ${FILESDIR}/xilinx.conf ${PREFIX}/etc/devd
+
+post-install:
+ @${CAT} ${PKGMESSAGE}
+
+.include <bsd.port.pre.mk>
+
+.if (${OSVERSION} < 800069)
+BROKEN= doesn't build on FreeBSD prior libusb(8) integration to base system
+.endif
+
+.include <bsd.port.post.mk>
diff --git a/misc/fxload/distinfo b/misc/fxload/distinfo
new file mode 100644
index 000000000000..5b3dd2a4cc22
--- /dev/null
+++ b/misc/fxload/distinfo
@@ -0,0 +1,3 @@
+MD5 (fxload-20100510.tar.gz) = cb02c362b098624031020528d83222df
+SHA256 (fxload-20100510.tar.gz) = e26ac8fb37b9d765d5fd03bf64ee37a4514f5cebc7c83d51718dbfcc730e1d27
+SIZE (fxload-20100510.tar.gz) = 28041
diff --git a/misc/fxload/files/pkg-message.in b/misc/fxload/files/pkg-message.in
new file mode 100644
index 000000000000..e98f15abbca1
--- /dev/null
+++ b/misc/fxload/files/pkg-message.in
@@ -0,0 +1,14 @@
+
+ fxload(8) with LibUSB support has been installed.
+
+ For more information on how to use it, visit fxload(8) manual page.
+
+ devd(5) settings are provided with this program. Directory:
+
+ %%PREFIX%%/etc/devd
+
+ contains configuration files for known devices. In order to to
+ reprogram other USB devices automatically, you may want to modify one
+ of those fles or /etc/devd.conf contents. Check devd.conf(5) for
+ details on syntax.
+
diff --git a/misc/fxload/files/xilinx.conf b/misc/fxload/files/xilinx.conf
new file mode 100644
index 000000000000..614a0a76f1f2
--- /dev/null
+++ b/misc/fxload/files/xilinx.conf
@@ -0,0 +1,65 @@
+#
+# Copyright (c) 2010 Wojciech A. Koszek <wkoszek@FreeBSD.org>
+# BSD 2-clause license
+#
+# This is devd.conf(5) file for FreeBSD devd(8) daemon. It provides rules
+# describing actions necessary to load firmware for Xilinx USB programmers.
+# It is assumed that Xilinx tools got installed under /compat/linux/opt/...
+# (default installer's location)
+#
+# Those devices appear in the system as ugen(4) instances only. Once fxload(8)
+# reprograms those, they reappear as different devices.
+#
+# All configuration variables were taken from:
+#
+# /compat/linux/opt/Xilinx/11.1/common/bin/lin/xusbdfwu.rules
+#
+# and adopted accordingly for FreeBSD infrastructure.
+#
+
+options {
+ set X "/compat/linux/opt/Xilinx/11.1/common/bin/lin";
+ set F "/usr/local/sbin/fxload -v -t fx2";
+};
+
+attach 100 {
+ device-name "^ugen";
+ match "vendor" "0x03fd";
+ match "product" "0x0007";
+ action "$F -I $X/xusbdfwu.hex -D vid=$vendor,pid=$product";
+};
+
+attach 100 {
+ device-name "^ugen";
+ match "vendor" "0x03fd";
+ match "product" "0x0009";
+ action "$F -I $X/xusb_xup.hex -D vid=$vendor,pid=$product";
+};
+
+attach 100 {
+ device-name "^ugen";
+ match "vendor" "0x03fd";
+ match "product" "0x000d";
+ action "$F -I $X/xusbdfwu.hex -D vid=$vendor,pid=$product";
+};
+
+attach 100 {
+ device-name "^ugen";
+ match "vendor" "0x03fd";
+ match "product" "0x000f";
+ action "$F -I $X/xusb_xlp.hex -D vid=$vendor,pid=$product";
+};
+
+attach 100 {
+ device-name "^ugen";
+ match "vendor" "0x03fd";
+ match "product" "0x0013";
+ action "$F -I $X/xusb_xp2.hex -D vid=$vendor,pid=$product";
+};
+
+attach 100 {
+ device-name "^ugen";
+ match "vendor" "0x03fd";
+ match "product" "0x0015";
+ action "$F -I $X/xusb_xse.hex -D vid=$vendor,pid=$product";
+};
diff --git a/misc/fxload/pkg-descr b/misc/fxload/pkg-descr
new file mode 100644
index 000000000000..958e8902e699
--- /dev/null
+++ b/misc/fxload/pkg-descr
@@ -0,0 +1,10 @@
+The utility allows you to download firmware into and upload firmware from
+the memory of a Cypress EZ-USB/FX2 chip. It is a de facto standard for
+programming this family of devices.
+
+Port is based on original fxload(8) program available from Linux Hotplug
+Project. Libusb support has been provided to correctly work on FreeBSD.
+
+WWW: http://FreeBSD.czest.pl/~wkoszek/fxload/
+
+- Wojciech A. Koszek <wkoszek@FreeBSD.org>
diff --git a/misc/fxload/pkg-plist b/misc/fxload/pkg-plist
new file mode 100644
index 000000000000..21ea081f77e4
--- /dev/null
+++ b/misc/fxload/pkg-plist
@@ -0,0 +1,5 @@
+etc/devd/xilinx.conf
+sbin/fxload
+%%DATADIR%%/a3load.hex
+@dirrm %%DATADIR%%
+@dirrmtry etc/devd