Skip to content
This repository was archived by the owner on Jun 22, 2025. It is now read-only.

Commit ad82855

Browse files
committed
Merge branch 'next' into develop
2 parents eb1574c + 3917b6a commit ad82855

File tree

12 files changed

+173
-57
lines changed

12 files changed

+173
-57
lines changed

.travis.yml

Lines changed: 21 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,35 @@
11
sudo: required
22
dist: trusty
3-
43
language: cpp
5-
64
matrix:
75
include:
8-
- os: linux
9-
env: TARGET=linux_x86_64
10-
- os: linux
11-
env: TARGET=linux_i686
12-
- os: linux
13-
env: TARGET=linux_armv7l
14-
- os: linux
15-
env: TARGET=linux_aarch64
16-
- os: linux
17-
env: TARGET=windows_x86
18-
- os: linux
19-
env: TARGET=windows_amd64
20-
- os: osx
21-
env: TARGET=darwin
22-
6+
- os: linux
7+
env: TARGET=linux_x86_64
8+
- os: linux
9+
env: TARGET=linux_i686
10+
- os: linux
11+
env: TARGET=linux_armv7l
12+
- os: linux
13+
env: TARGET=linux_aarch64
14+
- os: linux
15+
env: TARGET=windows_x86
16+
- os: linux
17+
env: TARGET=windows_amd64
18+
- os: osx
19+
env: TARGET=darwin
2320
before_script:
24-
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test; fi
25-
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo apt-get update -y -qq; fi
26-
21+
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test; fi
22+
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo apt-get update -y -qq; fi
2723
script:
28-
- bash build.sh $TARGET
29-
- openssl sha1 _packages/**/*.tar.gz
30-
24+
- bash build.sh $TARGET
25+
- openssl sha1 _packages/**/*.tar.gz
3126
deploy:
3227
provider: releases
3328
api_key:
34-
secure: P3t3txMvsfFXymL/Z6AVsNTygLytSL2F/GNdLpvB3ULwz0qvVzwW0ep0DZIbUxgTb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xfIWn0ULAcceDLH1hWK3rFRqpvVRIqSRi+JPVbdiudds5mQGOI8+XYBDHDVTqv2l8rXE3vKZYy/p43JZb+xh+6GiJek3EpDOaOgofasQN2v3XUCjandI/DmZ4V+6CUJTSr+tuWGy/ew79+ZH3/U+JEMSKmVE0dNEzSkvP/1AEENnbi7kH6oGUfddMk02NffRc+x1BhY0VvZSUPAC5WhSCY61UtdGnYGv7wqKUESBhWPUyZOfpXOE/8rhEE=
30+
file: _packages/**/*.tar.gz
3731
file_glob: true
3832
skip_cleanup: true
3933
on:
34+
repo: FPGAwars/tools-system
4035
all_branches: true

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# Tools-system
22

3+
[![Build Status](https://travis-ci.org/FPGAwars/tools-system.svg?branch=v1.1.0)](https://travis-ci.org/FPGAwars/tools-system)
4+
35
## Introduction
46

57
Static binaries of the **lsftdi** and **lsusb** tools. Packaged for [Apio](https://github.com/FPGAwars/apio).
@@ -43,6 +45,9 @@ NOTE: *libftdi* and *libusb* libraries are generated for each architecture. In o
4345
* [Juan González-Gómez (Obijuan)](https://github.com/Obijuan)
4446
* [Jesús Arroyo Torrens](https://github.com/Jesus89)
4547

48+
## Contributors
49+
* [Carlos Venegas Arrabe (cavearr)](https://github.com/cavearr)
50+
4651
## License
4752

4853
Licensed under [Creative Commons Attribution-ShareAlike 4.0 International License](http://creativecommons.org/licenses/by-sa/4.0/).
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#ifndef _FTDI_EEPROM_VERSION_H
2+
#define _FTDI_EEPROM_VERSION_H
3+
4+
#define EEPROM_MAJOR_VERSION 0
5+
#define EEPROM_MINOR_VERSION 17
6+
#define EEPROM_VERSION_STRING "0.17"
7+
8+
#endif

build.sh

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,13 @@
33
# System tools builder #
44
##################################
55

6+
# Set english language for propper pattern matching
7+
export LC_ALL=C
8+
69
# Generate tools-system-arch-ver.tar.gz from source code
710
# sources: https://github.com/FPGAwars/tools-system
811

9-
VERSION=1.1.0
12+
VERSION=1.1.1-beta
1013

1114
# -- Target architectures
1215
ARCH=$1
@@ -18,6 +21,7 @@ NAME=tools-system
1821
# -- Debug flags
1922
INSTALL_DEPS=1
2023
COMPILE_LSUSB=1
24+
COMPILE_LCONFUSE=1
2125
COMPILE_LSFTDI=1
2226
CREATE_PACKAGE=1
2327

@@ -39,7 +43,7 @@ mkdir -p $UPSTREAM_DIR
3943

4044
# -- Test script function
4145
function test_bin {
42-
$WORK_DIR/test/test_bin.sh $1
46+
. $WORK_DIR/test/test_bin.sh $1
4347
if [ $? != "0" ]; then
4448
exit 1
4549
fi
@@ -104,6 +108,14 @@ if [ $COMPILE_LSUSB == "1" ]; then
104108

105109
fi
106110

111+
# --------- Compile lconfuse ---------------------------------------
112+
if [ $COMPILE_LCONFUSE == "1" ]; then
113+
114+
print ">> Compile lconfuse"
115+
. $WORK_DIR/scripts/compile_lconfuse.sh
116+
117+
fi
118+
107119
# --------- Compile lsftdi -----------------------------------------
108120
if [ $COMPILE_LSFTDI == "1" ]; then
109121

clean.sh

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,6 @@ BUILDS_DIR=$WORK_DIR/_builds
1414
# -- Folder for storing the generated packages
1515
PACKAGES_DIR=$WORK_DIR/_packages
1616

17-
# -- Test script function
18-
function test_bin {
19-
$WORK_DIR/test/test_bin.sh $1
20-
if [ $? != "0" ]; then
21-
exit 1
22-
fi
23-
}
24-
2517
# -- Check ARCH
2618
if [[ $# > 1 ]]; then
2719
echo ""

manifest.json

Lines changed: 42 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,47 @@
11
{
22
"tools-system":
33
[
4-
4+
{
5+
"url": "https://github.com/FPGAwars/tools-system/releases/download/v1.1.0/tools-system-darwin-1.1.0.tar.gz",
6+
"sha1": "62fdb6b2714da062375cc745c4b7bdfd182a5695",
7+
"version": "1.1.0",
8+
"system": ["darwin", "darwin_x86_64", "darwin_i386"]
9+
},
10+
{
11+
"url": "https://github.com/FPGAwars/tools-system/releases/download/v1.1.0/tools-system-linux_aarch64-1.1.0.tar.gz",
12+
"sha1": "a213e907956cffd6ac13713f7e9ae215af7d36c9",
13+
"version": "1.1.0",
14+
"system": ["linux_aarch64"]
15+
},
16+
{
17+
"url": "https://github.com/FPGAwars/tools-system/releases/download/v1.1.0/tools-system-linux_armv7l-1.1.0.tar.gz",
18+
"sha1": "eaa9592cb27887320342ed80bfec12498e7f4554",
19+
"version": "1.1.0",
20+
"system": ["linux_armv7l"]
21+
},
22+
{
23+
"url": "https://github.com/FPGAwars/tools-system/releases/download/v1.1.0/tools-system-linux_i686-1.1.0.tar.gz",
24+
"sha1": "e671d02590a0fe8c4e6867ac9ce115314c8d9249",
25+
"version": "1.1.0",
26+
"system": ["linux_i686"]
27+
},
28+
{
29+
"url": "https://github.com/FPGAwars/tools-system/releases/download/v1.1.0/tools-system-linux_x86_64-1.1.0.tar.gz",
30+
"sha1": "0f229a7d2952dd86390d1faa5e1268af8a773a17",
31+
"version": "1.1.0",
32+
"system": ["linux_x86_64"]
33+
},
34+
{
35+
"url": "https://github.com/FPGAwars/tools-system/releases/download/v1.1.0/tools-system-windows_amd64-1.1.0.tar.gz",
36+
"sha1": "a397ecb4b73ef06b370ad8f36c4482a110d5cec1",
37+
"version": "1.1.0",
38+
"system": ["windows_amd64"]
39+
}
40+
{
41+
"url": "https://github.com/FPGAwars/tools-system/releases/download/v1.1.0/tools-system-windows_x86-1.1.0.tar.gz",
42+
"sha1": "84d2695b3872e9128c4a318b837dcd16d525d04c",
43+
"version": "1.1.0",
44+
"system": ["windows", "windows_x86"]
45+
}
546
]
647
}

scripts/compile_lconfuse.sh

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# -- Compile libconfuse script
2+
3+
VER=3.2.2
4+
LIBCONFUSE=confuse-$VER
5+
TAR_LIBCONFUSE=$LIBCONFUSE.tar.gz
6+
REL_LIBCONFUSE=https://github.com/martinh/libconfuse/releases/download/v$VER/$TAR_LIBCONFUSE
7+
8+
# -- Setup
9+
. $WORK_DIR/scripts/build_setup.sh
10+
11+
cd $UPSTREAM_DIR
12+
# -- Check and download the release
13+
test -e $TAR_LIBCONFUSE || wget $REL_LIBCONFUSE
14+
15+
# -- Unpack the release
16+
tar zxf $TAR_LIBCONFUSE
17+
18+
# -- Copy the upstream sources into the build directory
19+
rsync -a $LIBCONFUSE $BUILD_DIR --exclude .git
20+
21+
cd $BUILD_DIR/$LIBCONFUSE
22+
23+
PREFIX=$BUILD_DIR/$LIBCONFUSE/release
24+
25+
#-- Build libconfuse
26+
if [ $ARCH != "darwin" ]; then
27+
./configure --prefix=$PREFIX --host=$HOST $CONFIG_FLAGS
28+
make
29+
make install
30+
fi
31+
32+
#-- Build simple
33+
cd examples
34+
if [ $ARCH == "darwin" ]; then
35+
$CC -o simple simple.c -lconfuse -I../src
36+
else
37+
$CC -o simple simple.c -static -lconfuse -L$PREFIX/lib -I$PREFIX/include
38+
fi
39+
cd ..
40+
41+
# -- Test the generated executables
42+
test_bin examples/simple

scripts/compile_lsftdi.sh

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,16 @@
11
# -- Compile lsftdi script
22

3-
VER=1.2
3+
VER=1.4
44
LIBFTDI1=libftdi1-$VER
55
TAR_LIBFTDI1=$LIBFTDI1.tar.bz2
66
REL_LIBFTDI1=https://www.intra2net.com/en/developer/libftdi/download/$TAR_LIBFTDI1
77

8-
VER=1.0.20
8+
VER=1.0.22
99
LIBUSB=libusb-$VER
1010

11+
VER=3.2.2
12+
LIBCONFUSE=confuse-$VER
13+
1114
# -- Setup
1215
. $WORK_DIR/scripts/build_setup.sh
1316

@@ -26,6 +29,7 @@ cd $BUILD_DIR/$LIBFTDI1
2629

2730
PREFIX=$BUILD_DIR/$LIBFTDI1/release
2831
LIBUSB_PREFIX=$BUILD_DIR/$LIBUSB/release
32+
LIBCONFUSE_PREFIX=$BUILD_DIR/$LIBCONFUSE/release
2933

3034
#-- Build libftdi
3135
if [ $ARCH != "darwin" ]; then
@@ -47,10 +51,19 @@ else
4751
fi
4852
cd ..
4953

50-
# -- Test the generated executables
51-
if [ $ARCH != "darwin" ]; then
52-
test_bin examples/lsftdi
54+
#-- Build ftdi_eeprom
55+
cd ftdi_eeprom
56+
if [ $ARCH == "darwin" ]; then
57+
$CC -o ftdi_eeprom main.c -lftdi1 -lusb-1.0 -lconfuse -I../src -I$WORK_DIR/build-data/includes -I$PREFIX/include/libftdi1 -I$BUILD_DIR/$LIBUSB/libusb -I$BUILD_DIR/$LIBCONFUSE/src
58+
else
59+
$CC -o ftdi_eeprom main.c -static -lftdi1 -lusb-1.0 -lconfuse -lpthread -L$PREFIX/lib -L$LIBUSB_PREFIX/lib -L$LIBCONFUSE_PREFIX/lib -I$WORK_DIR/build-data/includes -I$PREFIX/include/libftdi1 -I$LIBUSB_PREFIX/include/libusb-1.0 -I$LIBCONFUSE_PREFIX/include
5360
fi
61+
cd ..
62+
63+
# -- Test the generated executables
64+
test_bin examples/lsftdi
65+
test_bin ftdi_eeprom/ftdi_eeprom
5466

5567
# -- Copy the executable into the packages/bin dir
5668
cp examples/lsftdi $PACKAGE_DIR/$NAME/bin/lsftdi$EXE
69+
cp ftdi_eeprom/ftdi_eeprom $PACKAGE_DIR/$NAME/bin/ftdi_eeprom$EXE

scripts/compile_lsusb.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# -- Compile lsusb script
22

3-
VER=1.0.20
3+
VER=1.0.22
44
LIBUSB=libusb-$VER
55
TAR_LIBUSB=$LIBUSB.tar.bz2
66
REL_LIBUSB=https://github.com/libusb/libusb/releases/download/v$VER/$TAR_LIBUSB

scripts/install_dependencies.sh

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,14 @@ if [ ${ARCH:0:7} == "windows" ]; then
3030
fi
3131

3232
if [ $ARCH == "darwin" ]; then
33-
DEPS="pkg-config libusb libftdi wget"
34-
brew update
33+
which -s brew
34+
if [[ $? != 0 ]] ; then
35+
# Install Homebrew
36+
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
37+
else
38+
brew update
39+
fi
40+
DEPS="pkg-config libusb libftdi wget confuse"
3541
brew install --force $DEPS
3642
brew unlink $DEPS && brew link --force $DEPS
3743
fi

0 commit comments

Comments
 (0)