@@ -8,12 +8,21 @@ set -euo pipefail
8
8
9
9
main () {
10
10
local arch=" ${1} "
11
+ local version=" ${ANDROID_VERSION} "
12
+ local gcc_version=4.9
13
+ local glibc_version=glibc2.15-4.8
14
+ # FIXME: android is currently migrating from make to soong, so
15
+ # `platform/build/make` may be missing from a future version of
16
+ # android. version-gate this when make is removed.
17
+ # latest tested version with make: 13.0.0_r6
18
+ local has_make=1
19
+
11
20
local td
12
21
td=" $( mktemp -d) "
13
22
pushd " ${td} "
14
23
15
24
# fake java and javac, it is not necessary for what we build, but the build
16
- # script ask for it
25
+ # script asks for it
17
26
cat << EOF > /usr/bin/java
18
27
#!/usr/bin/env bash
19
28
echo "java version \"1.7.0\""
53
62
54
63
# this is the minimum set of modules that are need to build bionic
55
64
# this was created by trial and error
56
- python3 ./repo init -u https://android.googlesource.com/platform/manifest -b android-9.0.0_r1
65
+ python3 ./repo init -u " https://android.googlesource.com/platform/manifest" -b " android-${version} "
57
66
58
67
python3 ./repo sync -c art
59
68
python3 ./repo sync -c bionic
60
- python3 ./repo sync -c build/make
69
+ if [[ " ${has_make} " == 1 ]]; then
70
+ python3 ./repo sync -c build/make
71
+ fi
61
72
python3 ./repo sync -c build/blueprint
62
73
python3 ./repo sync -c build/soong
63
74
python3 ./repo sync -c external/clang
81
92
python3 ./repo sync -c prebuilts/build-tools
82
93
python3 ./repo sync -c prebuilts/clang/host/linux-x86
83
94
python3 ./repo sync -c prebuilts/clang-tools
84
- # python3 ./repo sync -c prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9
85
- # python3 ./repo sync -c prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.9
86
- python3 ./repo sync -c prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.15-4.8
95
+ python3 ./repo sync -c " prebuilts/gcc/linux-x86/host/x86_64-linux-${glibc_version} "
87
96
python3 ./repo sync -c prebuilts/go/linux-x86
88
97
python3 ./repo sync -c prebuilts/misc
89
98
python3 ./repo sync -c prebuilts/sdk
93
102
94
103
case " ${arch} " in
95
104
arm)
96
- python3 ./repo sync prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.9
105
+ python3 ./repo sync " prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-${gcc_version} "
97
106
;;
98
107
arm64)
99
- python3 ./repo sync prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.9
100
- python3 ./repo sync prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9
108
+ python3 ./repo sync " prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-${gcc_version} "
109
+ python3 ./repo sync " prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-${gcc_version} "
101
110
;;
102
111
x86)
103
- python3 ./repo sync prebuilts/gcc/linux-x86/x86/x86_64-linux-android-4.9
112
+ python3 ./repo sync " prebuilts/gcc/linux-x86/x86/x86_64-linux-android-${gcc_version} "
104
113
;;
105
114
x86_64)
106
- python3 ./repo sync prebuilts/gcc/linux-x86/x86/x86_64-linux-android-4.9
115
+ python3 ./repo sync " prebuilts/gcc/linux-x86/x86/x86_64-linux-android-${gcc_version} "
107
116
;;
108
117
esac
109
118
0 commit comments