diff options
author | Andrzej Telszewski <atelszewski@gmail.com> | 2011-12-21 06:28:00 -0500 |
---|---|---|
committer | Robby Workman <rworkman@slackbuilds.org> | 2011-12-22 00:03:03 -0600 |
commit | 7bb560d5ca6f6f280a0ac2a2099b9c78fd55a171 (patch) | |
tree | b6fb2113c3c8c7200553b836f448d3f3fe7291d8 /development/dfu-programmer | |
parent | 6c68fe54b8d4f81b9b1d6da1f6f6aee26b7bdbaf (diff) |
development/dfu-programmer: Added (USB programmer for USB AVR chips)
Signed-off-by: dsomero <xgizzmo@slackbuilds.org>
Diffstat (limited to 'development/dfu-programmer')
-rw-r--r-- | development/dfu-programmer/README | 17 | ||||
-rw-r--r-- | development/dfu-programmer/dfu-programmer.SlackBuild | 83 | ||||
-rw-r--r-- | development/dfu-programmer/dfu-programmer.info | 10 | ||||
-rw-r--r-- | development/dfu-programmer/slack-desc | 19 |
4 files changed, 129 insertions, 0 deletions
diff --git a/development/dfu-programmer/README b/development/dfu-programmer/README new file mode 100644 index 0000000000000..f75afde793600 --- /dev/null +++ b/development/dfu-programmer/README @@ -0,0 +1,17 @@ +dfu-programmer is a Device Firmware Update based USB programmer for +Atmel chips with a USB bootloader. + +It seems to be working just fine with the LUFA based DFU Bootloader. +(http://www.fourwalledcubicle.com/LUFA.php). + + +You might want to add the following udev rule under /etc/udev/rules.d: + +SUBSYSTEM=="usb",ACTION=="add",ATTRS{idVendor}=="03eb",ATTRS{idProduct}=="2ff4",GROUP="plugdev" + +so when you plug the AVR chip to program, the USB devices becomes +available to all the members of the "plugdev" group. Also, I found +that the programmer doesn't work for non-root users when the +"usbfs" is mounted on /proc/bus/usb, so my advice is to remove the +"usbfs" entry from /etc/fstab if it is there (or maybe there is a + better solution). diff --git a/development/dfu-programmer/dfu-programmer.SlackBuild b/development/dfu-programmer/dfu-programmer.SlackBuild new file mode 100644 index 0000000000000..03f03092d225d --- /dev/null +++ b/development/dfu-programmer/dfu-programmer.SlackBuild @@ -0,0 +1,83 @@ +#!/bin/sh + +# Slackware build script for dfu-programmer. +# Written by Andrzej Telszewski <atelszewski@gmail.com> + +PRGNAM=dfu-programmer +VERSION=0.5.4 +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} + +if [ -z "$ARCH" ]; then + case "$( uname -m )" in + i?86) ARCH=i486 ;; + arm*) ARCH=arm ;; + *) ARCH=$( uname -m ) ;; + esac +fi + +CWD=$(pwd) +TMP=${TMP:-/tmp/SBo} +PKG=$TMP/package-$PRGNAM +OUTPUT=${OUTPUT:-/tmp} + +if [ "$ARCH" = "i486" ]; then + SLKCFLAGS="-O2 -march=i486 -mtune=i686" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "i686" ]; then + SLKCFLAGS="-O2 -march=i686 -mtune=i686" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "x86_64" ]; then + SLKCFLAGS="-O2 -fPIC" + LIBDIRSUFFIX="64" +else + SLKCFLAGS="-O2" + LIBDIRSUFFIX="" +fi + +set -e + +rm -rf $PKG +mkdir -p $TMP $PKG $OUTPUT +cd $TMP +rm -rf $PRGNAM-$VERSION +tar xvf $CWD/$PRGNAM-$VERSION.tar.gz +cd $PRGNAM-$VERSION +chown -R root:root . +chmod -R a-s,u+rw,go+r-w . +find . \ + \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \ + -exec chmod 755 {} \; -o \ + \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ + -exec chmod 644 {} \; + +CFLAGS="$SLKCFLAGS" \ +CXXFLAGS="$SLKCFLAGS" \ +./configure \ + --prefix=/usr \ + --sysconfdir=/etc \ + --libdir=/usr/lib${LIBDIRSUFFIX} \ + --localstatedir=/var \ + --mandir=/usr/man \ + --docdir=/usr/doc/$PRGNAM-$VERSION \ + --build=$ARCH-slackware-linux + +make +make install DESTDIR=$PKG + +find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \ + | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true + +find $PKG/usr/man -type f -exec gzip -9 {} \; +for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done + +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +cp -a AUTHORS COPYING ChangeLog NEWS README \ + $PKG/usr/doc/$PRGNAM-$VERSION +cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild + +mkdir -p $PKG/install +cat $CWD/slack-desc > $PKG/install/slack-desc + +cd $PKG +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} diff --git a/development/dfu-programmer/dfu-programmer.info b/development/dfu-programmer/dfu-programmer.info new file mode 100644 index 0000000000000..130ed6773f778 --- /dev/null +++ b/development/dfu-programmer/dfu-programmer.info @@ -0,0 +1,10 @@ +PRGNAM="dfu-programmer" +VERSION="0.5.4" +HOMEPAGE="http://dfu-programmer.sourceforge.net/" +DOWNLOAD="http://dfn.dl.sourceforge.net/project/dfu-programmer/dfu-programmer/0.5.4/dfu-programmer-0.5.4.tar.gz" +DOWNLOAD_x86_64="" +MD5SUM="707dcd0f957a74e92456ea6919faa772" +MD5SUM_x86_64="" +MAINTAINER="Andrzej Telszewski" +EMAIL="atelszewski@gmail.com" +APPROVED="dsomero" diff --git a/development/dfu-programmer/slack-desc b/development/dfu-programmer/slack-desc new file mode 100644 index 0000000000000..f0d9265fef794 --- /dev/null +++ b/development/dfu-programmer/slack-desc @@ -0,0 +1,19 @@ +# HOW TO EDIT THIS FILE: +# The "handy ruler" below makes it easier to edit a package description. Line +# up the first '|' above the ':' following the base package name, and the '|' +# on the right side marks the last column you can put a character in. You must +# make exactly 11 lines for the formatting to be correct. It's also +# customary to leave one space after the ':'. + + |-----handy-ruler------------------------------------------------------| +dfu-programmer: dfu-programmer (USB programmer for USB AVR chips) +dfu-programmer: +dfu-programmer: dfu-programmer is a Device Firmware Update based USB programmer for +dfu-programmer: Atmel chips with a USB bootloader. +dfu-programmer: +dfu-programmer: Homepage: http://dfu-programmer.sourceforge.net/ +dfu-programmer: +dfu-programmer: +dfu-programmer: +dfu-programmer: +dfu-programmer: |