userconfig.sh 1.1 KB
Newer Older
1 2
#!/bin/bash

Christoph Gerum's avatar
Christoph Gerum committed
3 4 5

echo "Running userconfig in  $HOME"

michael's avatar
michael committed
6
cd $HOME
michael's avatar
michael committed
7
ca_dir="${HOME}/advanced_computer_architecture"
8 9 10 11 12 13 14

if [ ! -d gem5 ]; then
 hg clone http://repo.gem5.org/gem5
fi

cd gem5
hg pull 
michael's avatar
michael committed
15
hg update
michael's avatar
michael committed
16

michael's avatar
michael committed
17 18 19 20
#scons build/ARM/gem5.debug --jobs 2
scons build/ARM/gem5.opt --jobs 2
#scons build/X86/gem5.debug --jobs 2
#scons build/X86/gem5.opt --jobs 2
21

michael's avatar
michael committed
22 23 24 25
cd util/term/
make
echo 'alias m5term="/home/vagrant/gem5/util/term/m5term"' >> /home/vagrant/.bashrc

26
cd $ca_dir
michael's avatar
michael committed
27
mkdir -p system
michael's avatar
michael committed
28 29 30
cd system
wget http://www.gem5.org/dist/current/arm/aarch-system-2014-10.tar.xz

31 32
tar xvJf aarch-system-2014-10.tar.xz

michael's avatar
michael committed
33 34 35 36 37
if [ $? == 0 ]; then
 rm aarch-system-2014-10.tar.xz
fi

cd $HOME
michael's avatar
michael committed
38
echo 'export M5_PATH="/home/vagrant/advanced_computer_architecture/system"' >> .bashrc
michael's avatar
michael committed
39 40
cp -r /vagrant/local_config/ssh/* ~/.ssh

michael's avatar
michael committed
41 42 43
mkdir -p $ca_dir
cd $ca_dir
git clone git@atreus.informatik.uni-tuebingen.de:advanced_computer_architecture/exercises.git
Christoph Gerum's avatar
Christoph Gerum committed
44 45 46 47
if [ $? -ne 0 ]; then
  echo "Checkout over ssh failed trying https"
  git clone https://atreus.informatik.uni-tuebingen.de/advanced_computer_architecture/exercises.git
fi
michael's avatar
michael committed
48

michael's avatar
michael committed
49
/vagrant/local_config/local_bootstrap.sh