forked from OpenSmalltalk/opensmalltalk-vm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis_install.sh
executable file
·129 lines (119 loc) · 3.86 KB
/
.travis_install.sh
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
set -e
if [[ "${ARCH}" = "linux64x64" ]]; then
sudo apt-get install -yq --no-install-suggests --no-install-recommends --force-yes \
debhelper \
devscripts \
libasound2-dev \
libc6-dev \
libssl-dev \
libfreetype6-dev \
libx11-dev \
libxext-dev \
libpango1.0-dev \
libpulse-dev \
libaudio-dev \
gcc-multilib \
uuid-dev
elif [[ "${ARCH}" = "linux32x86" ]]; then
sudo apt-get remove -q -y gvfs-daemons
sudo apt-get install -yq --no-install-suggests --no-install-recommends --force-yes \
devscripts \
libc6-dev:i386 \
libasound2:i386 \
libasound2-dev:i386 \
libssl-dev:i386 \
libssl0.9.8:i386 \
libpng-dev:i386 \
libfreetype6-dev:i386 \
libx11-dev:i386 \
libsm-dev:i386 \
libice-dev:i386 \
libgl1-mesa-glx:i386 \
libgl1-mesa-dev:i386 \
libxext-dev:i386 \
libglapi-mesa:i386 \
libpango1.0-dev:i386 \
libxft-dev:i386 \
gir1.2-pango-1.0:i386 \
gir1.2-freedesktop:i386 \
gir1.2-glib-2.0:i386 \
libgirepository-1.0-1:i386 \
libpulse-dev:i386 \
libaudio-dev:i386 \
gcc-multilib \
uuid-dev:i386 \
libcurl4-openssl-dev:i386 \
libssh2-1-dev:i386
fi
[[ "${ARCH}" != "linux32ARMv6" ]] && exit 0
MIRROR=http://archive.raspbian.org/raspbian
VERSION=jessie
# TOOLS_DIR=$PWD/tools
ARMCHROOT=$PWD/armchroot
sudo dpkg --add-architecture i386
sudo apt-add-repository multiverse
sudo apt-add-repository universe
sudo apt-get update -myq || true
sudo apt-get install -yq --no-install-suggests --no-install-recommends --force-yes \
gcc-arm-linux-gnueabi \
gcc-arm-linux-gnueabihf \
qemu-system \
qemu-system-arm \
qemu-user \
qemu-user-static \
sbuild \
schroot \
scratchbox2 \
debootstrap \
zlib1g:i386 \
libstdc++6:i386 \
libffi-dev:i386 \
libffi6:i386 \
libssl1.0.0:i386 \
libbz2-1.0:i386 \
libc6-dev-i386 \
libc6:i386 \
libexpat1:i386 \
libtinfo5:i386 \
binfmt-support \
build-essential \
python-dev \
libffi-dev \
zlib1g-dev \
libtool \
automake \
autoconf
sudo chown $USER /etc/schroot/schroot.conf
echo "
[rpi]
directory=$ARMCHROOT
users=$USER
root-users=$USER
groups=$USER
aliases=default
type=directory
" >> /etc/schroot/schroot.conf
cat /etc/schroot/schroot.conf
sudo chown root /etc/schroot/schroot.conf
# git clone https://github.com/raspberrypi/tools.git $TOOLS_DIR
# chroot
if [ ! -e "$ARMCHROOT/etc/debian_chroot" ]; then
mkdir -p $ARMCHROOT
sudo qemu-debootstrap --no-check-gpg --include=fakeroot,build-essential --arch=armhf ${VERSION} ${ARMCHROOT} ${MIRROR}
sudo su -c "echo \"deb ${MIRROR} jessie main contrib rpi\" > ${ARMCHROOT}/etc/apt/sources.list"
schroot -c rpi -u root -- apt-get update
schroot -c rpi -u root -- apt-get --allow-unauthenticated install -y \
build-essential libcairo2-dev libpango1.0-dev libssl-dev uuid-dev uuid-runtime libasound2-dev \
debhelper devscripts libssl-dev libfreetype6-dev libx11-dev libxext-dev \
libx11-dev libsm-dev libice-dev libgl1-mesa-dev libgl1-mesa-glx git \
libtool automake autoconf
#needed for third-party libraries
schroot -c rpi -u root -- apt-get --allow-unauthenticated install -y cmake curl
fi
schroot -c rpi -- uname -m
sudo mount -o remount,size=100M /tmp || echo "No tmp size increase required"
# Use Scratchbox2 for faster compilation
# pushd $ARMCHROOT
# sb2-init -c `which qemu-arm` rpi $TOOLS_DIR/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/arm-linux-gnueabihf-gcc
# sb2-config -d rpi
# popd