mirror of
https://github.com/Ponce/slackbuilds
synced 2024-11-20 19:41:34 +01:00
development/teensy_loader_cli: Added (Teensy CLI downloader)
Signed-off-by: Niels Horn <niels.horn@slackbuilds.org>
This commit is contained in:
parent
30316b4e64
commit
5aac26c3cb
5 changed files with 152 additions and 0 deletions
30
development/teensy_loader_cli/49-teensy.rules
Normal file
30
development/teensy_loader_cli/49-teensy.rules
Normal file
|
@ -0,0 +1,30 @@
|
|||
# This file must be placed at:
|
||||
#
|
||||
# /etc/udev/rules.d/49-teensy.rules (preferred location)
|
||||
# or
|
||||
# /lib/udev/rules.d/49-teensy.rules (req'd on some broken systems)
|
||||
#
|
||||
#
|
||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="16c0", ATTRS{idProduct}=="04[789]?", MODE:="0666"
|
||||
KERNEL=="ttyACM*", ATTRS{idVendor}=="16c0", ATTRS{idProduct}=="04[789]?", SYMLINK+="ttyUSB00%n", MODE:="0666", ENV{ID_MM_DEVICE_IGNORE}="1"
|
||||
#
|
||||
# If you share your linux system with other users, or just don't like the
|
||||
# idea of write permission for everybody, you can replace MODE:="0666" with
|
||||
# OWNER:="yourusername" to create the device owned by you, or with
|
||||
# GROUP:="somegroupname" and mange access using standard unix groups.
|
||||
#
|
||||
#
|
||||
# If using USB Serial you get a new device each time (Ubuntu 9.10)
|
||||
# eg: /dev/ttyACM0, ttyACM1, ttyACM2, ttyACM3, ttyACM4, etc
|
||||
# apt-get remove --purge modemmanager (reboot may be necessary)
|
||||
#
|
||||
#
|
||||
# Older modem proding (eg, Ubuntu 9.04) caused very slow serial device detection.
|
||||
# To fix, add this near top of /lib/udev/rules.d/77-nm-probe-modem-capabilities.rules
|
||||
# SUBSYSTEMS=="usb", ATTRS{idVendor}=="16c0", ATTRS{idProduct}=="04[789]?", GOTO="nm_modem_probe_end"
|
||||
#
|
||||
#
|
||||
# (old udev rules)
|
||||
#SUBSYSTEMS=="usb", ATTRS{idVendor}=="16c0", ATTRS{idProduct}=="047[78]", MODE:="0666"
|
||||
#SUBSYSTEMS=="usb", ATTRS{idVendor}=="16c0", ATTRS{idProduct}=="048[02]", MODE:="0666"
|
||||
#KERNEL=="ttyACM*", SYMLINK+="ttyUSB00%n", MODE:="0666"
|
14
development/teensy_loader_cli/README
Normal file
14
development/teensy_loader_cli/README
Normal file
|
@ -0,0 +1,14 @@
|
|||
The Teensy is a complete USB-based microcontoller development
|
||||
system, in a very small footprint, capable of implementing many
|
||||
types of projects. All programming is done via the USB port. No
|
||||
special programmer is needed, only a standard "Mini-B" USB cable.
|
||||
|
||||
The Teensy Loader program communicates with your Teensy board
|
||||
when the HalfKay bootloader is running, so you can download new
|
||||
programs and run them.
|
||||
|
||||
The Teensy Loader is available in a command line version to
|
||||
automate programming, typically using a Makefile.
|
||||
|
||||
This contains only the cli version of the Teensy Loader. To run
|
||||
it type: teensy_loader_cli.
|
19
development/teensy_loader_cli/slack-desc
Normal file
19
development/teensy_loader_cli/slack-desc
Normal file
|
@ -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------------------------------------------------------|
|
||||
teensy_loader_cli: teensy_loader_cli (Teensy CLI downloader)
|
||||
teensy_loader_cli:
|
||||
teensy_loader_cli: The Teensy is a complete USB-based microcontoller development system,
|
||||
teensy_loader_cli: in a very small footprint, capable of implementing many types of
|
||||
teensy_loader_cli: projects. All programming is done via the USB port. No special
|
||||
teensy_loader_cli: programmer is needed, only a standard "Mini-B" USB cable.
|
||||
teensy_loader_cli:
|
||||
teensy_loader_cli: The Teensy Loader program communicates with your Teensy board when the
|
||||
teensy_loader_cli: HalfKay bootloader is running, so you can download new programs and
|
||||
teensy_loader_cli: run them. The Teensy CLI Loader is a command line version to
|
||||
teensy_loader_cli: automate programming, typically using a Makefile.
|
77
development/teensy_loader_cli/teensy_loader_cli.SlackBuild
Normal file
77
development/teensy_loader_cli/teensy_loader_cli.SlackBuild
Normal file
|
@ -0,0 +1,77 @@
|
|||
#!/bin/sh
|
||||
|
||||
# Slackware build script for teensy
|
||||
|
||||
# Written by Felix Pfeifer (pfeifer [dot] felix [at] googlemail [dot] com)
|
||||
|
||||
PRGNAM=teensy_loader_cli
|
||||
VERSION=${VERSION:-2.0}
|
||||
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
|
||||
tar xvf $CWD/$PRGNAM.$VERSION.tar.gz
|
||||
cd $PRGNAM
|
||||
chown -R root:root .
|
||||
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" \
|
||||
make
|
||||
|
||||
mkdir -p $PKG/usr/bin
|
||||
cp $PRGNAM $PKG/usr/bin/
|
||||
|
||||
mkdir -p $PKG/etc/udev/rules.d
|
||||
cp $CWD/49-teensy.rules $PKG/etc/udev/rules.d
|
||||
|
||||
find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
|
||||
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
|
||||
|
||||
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION/example-hex-files
|
||||
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
|
||||
cat gpl3.txt > $PKG/usr/doc/$PRGNAM-$VERSION/COPYING.txt
|
||||
cp *.hex $PKG/usr/doc/$PRGNAM-$VERSION/example-hex-files
|
||||
|
||||
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}
|
||||
|
12
development/teensy_loader_cli/teensy_loader_cli.info
Normal file
12
development/teensy_loader_cli/teensy_loader_cli.info
Normal file
|
@ -0,0 +1,12 @@
|
|||
PRGNAM="teensy_loader_cli"
|
||||
VERSION="2.0"
|
||||
HOMEPAGE="http://www.pjrc.com/teensy/loader_cli.html"
|
||||
DOWNLOAD="http://www.pjrc.com/teensy/teensy_loader_cli.2.0.tar.gz \
|
||||
http://www.pjrc.com/teensy/49-teensy.rules"
|
||||
MD5SUM="29376dce1b37826c91839a53cff75dc0 \
|
||||
a703a15303e4afb20079e297d14fed8e"
|
||||
DOWNLOAD_x86_64=""
|
||||
MD5SUM_x86_64=""
|
||||
MAINTAINER="Felix Pfeifer"
|
||||
EMAIL="pfeifer[dot]felix[at]googlemail[dot]com"
|
||||
APPROVED="Niels Horn"
|
Loading…
Reference in a new issue