2014-11-07 09:53:38 +08:00
|
|
|
#!/bin/sh
|
|
|
|
|
2015-07-26 19:08:34 +08:00
|
|
|
packages="http://us.archive.ubuntu.com/ubuntu/pool/universe/i/iverilog/iverilog_0.9.7-1_amd64.deb"
|
|
|
|
archives="http://fehu.whitequark.org/files/binutils-or1k.tbz2 http://fehu.whitequark.org/files/llvm-or1k.tbz2"
|
2015-04-04 22:27:43 +08:00
|
|
|
|
|
|
|
mkdir -p packages
|
|
|
|
|
|
|
|
for p in $packages
|
|
|
|
do
|
|
|
|
wget $p
|
|
|
|
pkg_name=$(echo $p | sed -e 's!.*/\(.*\)\.deb!\1\.deb!')
|
|
|
|
dpkg -x $pkg_name packages
|
|
|
|
done
|
|
|
|
|
2015-07-26 19:08:34 +08:00
|
|
|
for a in $archives
|
|
|
|
do
|
|
|
|
wget $a
|
2015-07-27 09:56:01 +08:00
|
|
|
(cd packages && tar xf ../$(basename $a))
|
2015-07-26 19:08:34 +08:00
|
|
|
done
|
|
|
|
|
|
|
|
export PATH=$PWD/packages/usr/local/llvm-or1k/bin:$PWD/packages/usr/local/bin:$PWD/packages/usr/bin:$PATH
|
2015-04-04 22:27:43 +08:00
|
|
|
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
|
|
|
|
|
2015-07-26 19:08:34 +08:00
|
|
|
echo "export LD_LIBRARY_PATH=$LD_LIBRARY_PATH" >> $HOME/.mlabs/build_settings.sh
|
|
|
|
echo "export PATH=$PWD/packages/usr/local/llvm-or1k/bin:$PATH" >> $HOME/.mlabs/build_settings.sh
|
2015-04-04 22:27:43 +08:00
|
|
|
|
2015-07-26 19:08:34 +08:00
|
|
|
or1k-linux-as --version
|
|
|
|
llc --version
|
2014-11-07 09:53:38 +08:00
|
|
|
clang --version
|