forked from M-Labs/artiq
1
0
Fork 0
artiq/.travis/get-xilinx.sh

39 lines
1.4 KiB
Bash
Raw Normal View History

2014-11-07 09:53:38 +08:00
#!/bin/sh
# Copyright (C) 2014, 2015 M-Labs Limited
# Copyright (C) 2014, 2015 Robert Jordens <jordens@gmail.com>
2014-11-07 09:53:38 +08:00
wget http://sionneau.net/artiq/Xilinx/xilinx_ise_14.7_s3_s6.tar.gz.gpg
2014-11-07 09:53:38 +08:00
echo "$secret" | gpg --passphrase-fd 0 xilinx_ise_14.7_s3_s6.tar.gz.gpg
tar -C $HOME/ -xzf xilinx_ise_14.7_s3_s6.tar.gz
wget http://sionneau.net/artiq/Xilinx/Xilinx_Vivado_2015_1_k7.tar.gz.gpg
echo "$secret" | gpg --passphrase-fd 0 Xilinx_Vivado_2015_1_k7.tar.gz.gpg
tar -C $HOME/ -xzf Xilinx_Vivado_2015_1_k7.tar.gz
# Relocate Vivado from /opt to $HOME
for i in $(grep -Rsn "/opt/Xilinx" $HOME/Xilinx | cut -d':' -f1)
do
sed -i -e "s!/opt!$HOME!g" $i
done
# Relocate ISE from /opt to $HOME
for i in $(grep -Rsn "/opt/Xilinx" $HOME/opt | cut -d':' -f1)
do
sed -i -e "s!/opt/Xilinx!$HOME/opt/Xilinx!g" $i
done
wget http://sionneau.net/artiq/Xilinx/Xilinx.lic.gpg
echo "$secret" | gpg --passphrase-fd 0 Xilinx.lic.gpg
mkdir -p ~/.Xilinx
mv Xilinx.lic ~/.Xilinx/Xilinx.lic
2015-11-04 15:59:08 +08:00
git clone https://github.com/m-labs/impersonate_macaddress
make -C impersonate_macaddress
2015-06-26 02:35:50 +08:00
# Tell mibuild where Xilinx toolchains are installed
# and feed it the mac address corresponding to the license
2015-10-22 20:08:40 +08:00
cat >> $HOME/.m-labs/build_settings.sh << EOF
2015-11-04 15:59:08 +08:00
MISOC_EXTRA_ISE_CMDLINE="--gateware-toolchain-path $HOME/opt/Xilinx/"
MISOC_EXTRA_VIVADO_CMDLINE="--gateware-toolchain-path $HOME/Xilinx/Vivado"
export MACADDR=$macaddress
2015-06-26 02:35:50 +08:00
export LD_PRELOAD=$PWD/impersonate_macaddress/impersonate_macaddress.so
EOF