Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 13 Jul 2017 17:50:12 +0000 (UTC)
From:      Michael Reifenberger <mr@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r445673 - in head/devel/papilio-loader: . files
Message-ID:  <201707131750.v6DHoC5X091494@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mr
Date: Thu Jul 13 17:50:12 2017
New Revision: 445673
URL: https://svnweb.freebsd.org/changeset/ports/445673

Log:
  Add the Papilio Loader, a Tool for loading bit/hex files onto a Papilio FPGA board.
  Currently it's just the CLI part (papilio-prog) and a wrapper (Papilio_Programmer.sh).
  
  See also: http://papilio.cc/index.php?n=Papilio.PapilioLoaderV2

Added:
  head/devel/papilio-loader/
  head/devel/papilio-loader/Makefile   (contents, props changed)
  head/devel/papilio-loader/distinfo   (contents, props changed)
  head/devel/papilio-loader/files/
  head/devel/papilio-loader/files/Papilio_Programmer.sh   (contents, props changed)
  head/devel/papilio-loader/pkg-descr   (contents, props changed)
  head/devel/papilio-loader/pkg-plist   (contents, props changed)

Added: head/devel/papilio-loader/Makefile
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/papilio-loader/Makefile	Thu Jul 13 17:50:12 2017	(r445673)
@@ -0,0 +1,39 @@
+# Created by: mr@freebsd.org
+# $FreeBSD$
+
+PORTNAME=       papilio-loader
+PORTVERSION=    2.8
+CATEGORIES=     devel
+
+MAINTAINER=     mr@FreeBSD.org
+COMMENT=        Load bit files to the Open Source Papilio FPGA boards
+
+LICENSE=        GPLv2
+
+LIB_DEPENDS=    libftdi1.so:devel/libftdi1
+
+USE_GITHUB=     yes
+GH_ACCOUNT=     GadgetFactory
+GH_PROJECT=	Papilio-Loader
+GH_TAGNAME=     dd111c4
+WRKSRC=         ${WRKDIR}/${GH_PROJECT}-${GH_TAGNAME}/papilio-prog
+
+USES=           autoreconf:autoconf gmake
+GNU_CONFIGURE=  yes
+CONFIGURE_ENV+=       libftdi1_CFLAGS="-I ${LOCALBASE}/include/libftdi1"
+CONFIGURE_ENV+=       libftdi1_LIBS="-L ${LOCALBASE}/lib -lftdi1"
+
+post-patch:
+	@echo "${DATADIR}"
+	${CP} ${FILESDIR}/Papilio_Programmer.sh ${WRKSRC}
+	@${REINPLACE_CMD} -e 's|%%DATADIR%%|${DATADIR}|' ${WRKSRC}/Papilio_Programmer.sh
+
+BITFILES= bscan_spi_xc3s250e.bit bscan_spi_xc3s500e.bit bscan_spi_lx9.bit
+post-install:
+	${INSTALL_SCRIPT} ${INSTALL_WRKSRC}/Papilio_Programmer.sh ${STAGEDIR}${PREFIX}/bin
+	@${MKDIR} ${STAGEDIR}${DATADIR}
+.for BITFILE in ${BITFILES}
+	${INSTALL_DATA} ${INSTALL_WRKSRC}/${BITFILE} ${STAGEDIR}${DATADIR}
+.endfor
+
+.include <bsd.port.mk>

Added: head/devel/papilio-loader/distinfo
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/papilio-loader/distinfo	Thu Jul 13 17:50:12 2017	(r445673)
@@ -0,0 +1,3 @@
+TIMESTAMP = 1499966750
+SHA256 (GadgetFactory-Papilio-Loader-2.8-dd111c4_GH0.tar.gz) = 448e45be93f5dfb247b358ea618f97d897d2d11334dc65da7773e480e95e7443
+SIZE (GadgetFactory-Papilio-Loader-2.8-dd111c4_GH0.tar.gz) = 8506529

Added: head/devel/papilio-loader/files/Papilio_Programmer.sh
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/papilio-loader/files/Papilio_Programmer.sh	Thu Jul 13 17:50:12 2017	(r445673)
@@ -0,0 +1,43 @@
+#!/bin/sh
+
+if [ -z "$1" -o -z "$2" -o \! -f "$2" ]; then
+  echo "Usage: $0 -t|-p bitfile"
+  echo "-t : Program FPGA - Temporary"
+  echo "-p : Program SPI Flash - Permanent"
+  exit 0
+fi
+
+datadir="%%DATADIR%%"
+
+case "$1" in
+  "-t")
+	echo "Programming the FPGA"
+  	papilio-prog -v -f $2 -v
+  	exit 0
+  	;;
+  "-p")
+	echo "Programming to SPI Flash"
+	devid=`papilio-prog -j | awk '{print $9}'`
+	echo "$devid"
+	case "$devid" in
+	XC3S250E)
+		echo "Programming a Papilio One 250K"
+		bscan_bitfile=bscan_spi_xc3s250e.bit
+		;;
+	XC3S500E)
+		echo "Programming a Papilio One 500K"
+		bscan_bitfile=bscan_spi_xc3s500e.bit
+		;;
+	XC6SLX9)
+		echo "Programming a Papilio Plus LX9"
+		bscan_bitfile=bscan_spi_xc6slx9.bit
+		;;
+	*)
+		echo "Unknown Papilio Board"
+		exit 1
+		;;
+	esac
+	papilio-prog -v -f "$2" -b "$datadir/$bscan_bitfile" -sa -r;
+	papilio-prog -c
+esac
+

Added: head/devel/papilio-loader/pkg-descr
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/papilio-loader/pkg-descr	Thu Jul 13 17:50:12 2017	(r445673)
@@ -0,0 +1,7 @@
+Papilio Loader - Current Version 2.7
+
+The Papilio Loader is a branch of xc3sprog (http://sourceforge.net/projects/xc3sprog/) that 
+is used to load bit files to the Open Source Papilio FPGA boards (http://papilio.cc) 
+made by Gadget Factory (http://www.gadgetfactory.net).
+
+WWW: http://papilio.cc/index.php?n=Papilio.PapilioLoaderV2

Added: head/devel/papilio-loader/pkg-plist
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/papilio-loader/pkg-plist	Thu Jul 13 17:50:12 2017	(r445673)
@@ -0,0 +1,5 @@
+bin/Papilio_Programmer.sh
+bin/papilio-prog
+%%DATADIR%%/bscan_spi_xc3s250e.bit
+%%DATADIR%%/bscan_spi_xc3s500e.bit
+%%DATADIR%%/bscan_spi_lx9.bit



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201707131750.v6DHoC5X091494>