Skip to content

Commit 1530f9f

Browse files
fallensbourdeauducq
authored andcommittedMay 20, 2015
travis: generate kc705 and pipistrello binaries in container env
1 parent d8917fd commit 1530f9f

File tree

7 files changed

+91
-26
lines changed

7 files changed

+91
-26
lines changed
 

Diff for: ‎.travis.yml

+3-4
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,20 @@
11
language: python
22
python:
33
- '3.4'
4+
sudo: false
45
env:
56
global:
67
- MSCDIR=$TRAVIS_BUILD_DIR/misoc
78
- PATH=$HOME/miniconda/bin:/usr/local/llvm-or1k/bin:$PATH
8-
- CC=gcc-4.7
9-
- CXX=g++-4.7
109
- BUILD_SOC=1
1110
- secure: "DUk/Ihg8KbbzEgPF0qrHqlxU8e8eET9i/BtzNvFddIGX4HP/P2qz0nk3cVkmjuWhqJXSbC22RdKME9qqPzw6fJwJ6dpJ3OR6dDmSd7rewavq+niwxu52PVa+yK8mL4yf1terM7QQ5tIRf+yUL9qGKrZ2xyvEuRit6d4cFep43Ws="
1211
before_install:
12+
- mkdir -p $HOME/.mlabs
1313
- if [ $TRAVIS_PULL_REQUEST != false ]; then BUILD_SOC=0; fi
14-
- ./.travis/get-toolchain.sh
14+
- . ./.travis/get-toolchain.sh
1515
- if [ $BUILD_SOC -ne 0 ]; then ./.travis/get-xilinx.sh; fi
1616
- ./.travis/get-anaconda.sh
1717
- source $HOME/miniconda/bin/activate py34
18-
- sudo apt-get install --force-yes -y iverilog
1918
- conda install pip coverage binstar migen cython
2019
- pip install coveralls
2120
install:

Diff for: ‎.travis/get-anaconda.sh

+1
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,4 @@ conda info -a
99
conda install conda-build jinja2
1010
conda create -q -n py34 python=$TRAVIS_PYTHON_VERSION
1111
conda config --add channels fallen
12+
conda config --add channels https://conda.binstar.org/fallen/channel/dev

Diff for: ‎.travis/get-toolchain.sh

+18-5
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,23 @@
11
#!/bin/sh
22

3-
sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
4-
sudo apt-add-repository -y "deb http://www.phys.ethz.ch/~robertjo/artiq-dev ./"
5-
sudo apt-add-repository -y "deb http://archive.ubuntu.com/ubuntu saucy main universe"
6-
sudo apt-get -qq --force-yes -y update
7-
sudo apt-get install --force-yes -y gcc-4.7 g++-4.7 artiq-dev
3+
packages="https://people.phys.ethz.ch/~robertjo/artiq-dev/or1k-gcc_20141105-1_amd64.deb
4+
https://people.phys.ethz.ch/~robertjo/artiq-dev/or1k-binutils_20141105-1_amd64.deb
5+
http://us.archive.ubuntu.com/ubuntu/pool/universe/i/iverilog/iverilog_0.9.7-1_amd64.deb"
6+
7+
mkdir -p packages
8+
9+
for p in $packages
10+
do
11+
wget $p
12+
pkg_name=$(echo $p | sed -e 's!.*/\(.*\)\.deb!\1\.deb!')
13+
dpkg -x $pkg_name packages
14+
done
15+
16+
export PATH=$PWD/packages/usr/local/bin:$PWD/packages/usr/bin:$PATH
17+
export LD_LIBRARY_PATH=$PWD/packages/usr/lib/x86_64-linux-gnu:$PWD/packages/usr/local/x86_64-unknown-linux-gnu/or1k-elf/lib:$LD_LIBRARY_PATH
18+
19+
echo -e "export LD_LIBRARY_PATH=$LD_LIBRARY_PATH" >> $HOME/.mlabs/build_settings.sh
20+
821
or1k-elf-as --version
922
or1k-elf-gcc --version
1023
clang --version

Diff for: ‎.travis/get-xilinx.sh

+32-6
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,35 @@
11
#!/bin/sh
22

3-
wget http://www.phys.ethz.ch/~robertjo/xilinx_ise_14.7_s3_s6.tar.gz.gpg
3+
wget http://sionneau.net/artiq/Xilinx/xilinx_ise_14.7_s3_s6.tar.gz.gpg
44
echo "$secret" | gpg --passphrase-fd 0 xilinx_ise_14.7_s3_s6.tar.gz.gpg
5-
sudo tar -C / -xzf xilinx_ise_14.7_s3_s6.tar.gz
6-
wget http://www.phys.ethz.ch/~robertjo/xilinx_webpack.lic.gpg
7-
echo "$secret" | gpg --passphrase-fd 0 xilinx_webpack.lic.gpg
8-
mkdir ~/.Xilinx
9-
mv xilinx_webpack.lic ~/.Xilinx/Xilinx.lic
5+
tar -C $HOME/ -xzf xilinx_ise_14.7_s3_s6.tar.gz
6+
wget http://sionneau.net/artiq/Xilinx/Xilinx_Vivado_2015_1_k7.tar.gz.gpg
7+
echo "$secret" | gpg --passphrase-fd 0 Xilinx_Vivado_2015_1_k7.tar.gz.gpg
8+
tar -C $HOME/ -xzf Xilinx_Vivado_2015_1_k7.tar.gz
9+
10+
# Relocate Vivado from /opt to $HOME
11+
for i in $(grep -Rsn "/opt/Xilinx" $HOME/Xilinx | cut -d':' -f1)
12+
do
13+
sed -i -e "s!/opt!$HOME!g" $i
14+
done
15+
16+
# Relocate ISE from /opt to $HOME
17+
for i in $(grep -Rsn "/opt/Xilinx" $HOME/opt | cut -d':' -f1)
18+
do
19+
sed -i -e "s!/opt/Xilinx!$HOME/opt/Xilinx!g" $i
20+
done
21+
22+
wget http://sionneau.net/artiq/Xilinx/Xilinx.lic.gpg
23+
echo "$secret" | gpg --passphrase-fd 0 Xilinx.lic.gpg
24+
mkdir -p ~/.Xilinx
25+
mv Xilinx.lic ~/.Xilinx/Xilinx.lic
26+
27+
# Tell mibuild where Vivado is installed
28+
echo "MISOC_EXTRA_VIVADO_CMDLINE=\"-Ob vivado_path $HOME/Xilinx/Vivado\"" >> $HOME/.mlabs/build_settings.sh
29+
echo "MISOC_EXTRA_ISE_CMDLINE=\"-Ob ise_path $HOME/opt/Xilinx/\"" >> $HOME/.mlabs/build_settings.sh
30+
31+
# Lie to Vivado by hooking the ioctl used to retrieve mac address for license verification
32+
git clone https://github.com/fallen/impersonate_macaddress
33+
make -C impersonate_macaddress
34+
echo "export MACADDR=$macaddress" >> $HOME/.mlabs/build_settings.sh
35+
echo "export LD_PRELOAD=$PWD/impersonate_macaddress/impersonate_macaddress.so" >> $HOME/.mlabs/build_settings.sh

Diff for: ‎conda/artiq/build.sh

+34-10
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,43 @@
11
#!/bin/bash
22

3+
BUILD_SETTINGS_FILE=$HOME/.mlabs/build_settings.sh
4+
5+
if [ -f $BUILD_SETTINGS_FILE ]
6+
then
7+
source $BUILD_SETTINGS_FILE
8+
fi
9+
310
ARTIQ_GUI=1 $PYTHON setup.py install --single-version-externally-managed --record=record.txt
411
git clone --recursive https://github.com/m-labs/misoc
5-
git clone https://github.com/GadgetFactory/Papilio-Loader
612
export MSCDIR=$SRC_DIR/misoc
7-
cd $SRC_DIR/misoc; python make.py -X ../soc -t artiq_ppro build-headers build-bios; cd -
8-
make -C soc/runtime runtime.fbi
9-
cd $SRC_DIR/misoc; python make.py -X $SRC_DIR/soc -t artiq_ppro build-bitstream; cd -
13+
1014
ARTIQ_PREFIX=$PREFIX/lib/python3.4/site-packages/artiq
1115
BIN_PREFIX=$ARTIQ_PREFIX/binaries/
1216
mkdir -p $ARTIQ_PREFIX/misc
13-
cp misc/99-ppro.rules $ARTIQ_PREFIX/misc/
14-
mkdir -p $BIN_PREFIX/ppro $BIN_PREFIX/kc705
15-
cp $SRC_DIR/misoc/build/artiq_ppro-up-papilio_pro.bin $BIN_PREFIX/ppro
16-
cp $SRC_DIR/misoc/software/bios/bios.bin $BIN_PREFIX/ppro
17-
cp soc/runtime/runtime.fbi $BIN_PREFIX/ppro
17+
mkdir -p $BIN_PREFIX/kc705 $BIN_PREFIX/pipistrello
18+
19+
# build for KC705
20+
21+
cd $SRC_DIR/misoc; python make.py -X ../soc -t artiq_kc705 build-headers build-bios; cd -
22+
make -C soc/runtime clean runtime.fbi
23+
cd $SRC_DIR/misoc; python make.py -X ../soc -t artiq_kc705 $MISOC_EXTRA_VIVADO_CMDLINE build-bitstream; cd -
24+
25+
# build for Pipistrello
26+
27+
cd $SRC_DIR/misoc; python make.py -X ../soc -t artiq_pipistrello build-headers build-bios; cd -
28+
make -C soc/runtime clean runtime.fbi
29+
cd $SRC_DIR/misoc; python make.py -X ../soc -t artiq_pipistrello $MISOC_EXTRA_ISE_CMDLINE build-bitstream; cd -
30+
31+
# install KC705 binaries
32+
33+
cp soc/runtime/runtime.fbi $BIN_PREFIX/kc705/
34+
cp $SRC_DIR/misoc/software/bios/bios.bin $BIN_PREFIX/kc705/
35+
cp $SRC_DIR/misoc/build/artiq_kc705-nist_qc1-kc705.bin $BIN_PREFIX/kc705/
36+
37+
# install Pipistrello binaries
38+
39+
cp soc/runtime/runtime.fbi $BIN_PREFIX/pipistrello/
40+
cp $SRC_DIR/misoc/software/bios/bios.bin $BIN_PREFIX/pipistrello/
41+
cp $SRC_DIR/misoc/build/artiq_pipistrello-nist_qc1-pipistrello.bin $BIN_PREFIX/pipistrello/
42+
1843
cp artiq/frontend/artiq_flash.sh $PREFIX/bin
19-
cp Papilio-Loader/xc3sprog/trunk/bscan_spi/bscan_spi_lx9_papilio.bit $BIN_PREFIX/ppro

Diff for: ‎conda/artiq/meta.yaml

+2
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ requirements:
2929
- setuptools
3030
- numpy
3131
- migen
32+
- pyelftools
3233
run:
3334
- python
3435
- llvmlite-or1k
@@ -41,6 +42,7 @@ requirements:
4142
- h5py
4243
- dateutil
4344
- pydaqmx
45+
- pyelftools
4446
- gbulb-artiq # [not win]
4547
- cairoplot3-artiq # [not win]
4648

Diff for: ‎setup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
requirements = [
88
"sphinx", "sphinx-argparse", "pyserial", "numpy", "scipy",
9-
"python-dateutil", "prettytable", "h5py", "pydaqmx"
9+
"python-dateutil", "prettytable", "h5py", "pydaqmx", "pyelftools"
1010
]
1111

1212
scripts = [

0 commit comments

Comments
 (0)
Please sign in to comment.