aboutsummaryrefslogtreecommitdiff
path: root/scripts/slave.sh
blob: 21ce7b1c2c630c7812dd9d987ae9ef368f3879b7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#!/bin/bash

# Update all the packages we need
apt-get update

# Optionally use a package list from another machine of the same distribution and type
# apt-get install `cat /tmp/packages.lst`
apt-get build-dep gcc gdb
packages="texinfo git-core build-essential openssh-server openjdk-6-jre-headless iptables flex bison autogen autoconf automake libtool dejagnu lsyncd gawk gcc-multilib g++-multilib libncurses5-dev lsb ccrypt nagios-nrpe-server sendmail git"
if test `uname -m | egrep -c "x86_64|i686"` -gt 0;
    packages="${packages} qemu  mingw-w64"
fi

apt-get install ${packages}

# Move git-new-workdir to someplace so we can use it.
cp /usr/share/doc/git/contrib/workdir/git-new-workdir /usr/local/bin/
chmod a+x /usr/local/bin/git-new-workdir

# Add the user we use for all Jenkins builds
adduser buildslave
mkdir -p /opt/linaro /linaro/shared/snapshots
chown -R buildslave:buildslave /linaro/
chown -R buildslave:buildslave /opt/

# Update hosts so we can find this machine via HTTP
echo "88.98.47.97	 abe.tcwglab.linaro.org" >> /etc/hosts

# Setup default SSH config so builds can use SSH to access the targets for testing. This
# is setup for external access to the TCWG build farm, which go through a proxy, and is
# unnecessary for a build machine in the TCWG internal subnet, although this version can
# be used there as well.
mkdir -p /home/buildslave/.ssh/
cp ssh-config.txt /home/buildslave/.ssh/

# You then need to copy /home/buildslave/.ssh/id_* from an existing slave
# to the new one

# If running make 3.81, you may have to upgrade to make 4.0, as there is a
# bug effecting eglibc.

# You also need to install the ARM Fastmodel for AARCH64 big-endian testing. This
# lives in /linaro/foundation-model on all existing machines, so can just be
# copied to the same location.

# Qualcom Snapdragon

login as linaro linaro

# Remove the desktop packahes, we don't need them and that leaves 728M 
# of free disk space
# Remove gnome
dpkg -l | grep "^ii.*gnome" | cut -d ' ' -f 3 > xx
apt-get remove `cat xx`
rm xx
# Remove Unity
dpkg -l | grep "^ii.*unity" | cut -d ' ' -f 3 > xx
apt-get remove `cat xx`
apt-get clean all
apt-get update