aboutsummaryrefslogtreecommitdiff
path: root/misc/fxload
diff options
context:
space:
mode:
authorMax Brazhnikov <makc@FreeBSD.org>2010-05-15 19:41:48 +0000
committerMax Brazhnikov <makc@FreeBSD.org>2010-05-15 19:41:48 +0000
commit8797731b60c679ec920b69942a58b28e6ec6c17f (patch)
treef0f5be10820100dedd3164283ca28f64da79ad7e /misc/fxload
parent2e67602f4eb29bbf9b402909d8be8be7835b940b (diff)
downloadports-8797731b60c679ec920b69942a58b28e6ec6c17f.tar.gz
ports-8797731b60c679ec920b69942a58b28e6ec6c17f.zip
Notes
Diffstat (limited to 'misc/fxload')
-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