diff options
-rwxr-xr-x | tools/rockboxdev.sh | 41 |
1 files changed, 25 insertions, 16 deletions
diff --git a/tools/rockboxdev.sh b/tools/rockboxdev.sh index 27906da26a..6909cf1eaa 100755 --- a/tools/rockboxdev.sh +++ b/tools/rockboxdev.sh | |||
@@ -30,11 +30,11 @@ else | |||
30 | fi | 30 | fi |
31 | 31 | ||
32 | if [ -z $GNU_MIRROR ] ; then | 32 | if [ -z $GNU_MIRROR ] ; then |
33 | GNU_MIRROR=http://mirrors.kernel.org/gnu | 33 | GNU_MIRROR=ftpmirror.gnu.org |
34 | fi | 34 | fi |
35 | 35 | ||
36 | # These are the tools this script requires and depends upon. | 36 | # These are the tools this script requires and depends upon. |
37 | reqtools="gcc bzip2 make patch makeinfo" | 37 | reqtools="gcc bzip2 gzip make patch makeinfo" |
38 | 38 | ||
39 | ############################################################################## | 39 | ############################################################################## |
40 | # Functions: | 40 | # Functions: |
@@ -95,19 +95,19 @@ build() { | |||
95 | version="$3" | 95 | version="$3" |
96 | patch="$4" | 96 | patch="$4" |
97 | configure_params="$5" | 97 | configure_params="$5" |
98 | needs_gmp="$6" | 98 | needs_libs="$6" |
99 | 99 | ||
100 | patch_url="http://www.rockbox.org/gcc" | 100 | patch_url="http://www.rockbox.org/gcc" |
101 | 101 | ||
102 | case $toolname in | 102 | case $toolname in |
103 | gcc) | 103 | gcc) |
104 | file="gcc-core-$version.tar.bz2" | 104 | file="gcc-core-$version.tar.bz2" |
105 | url="$GNU_MIRROR/gcc/gcc-$version" | 105 | url="$GNU_MIRROR/gcc/releases/gcc-$version" |
106 | ;; | 106 | ;; |
107 | 107 | ||
108 | binutils) | 108 | binutils) |
109 | file="binutils-$version.tar.bz2" | 109 | file="binutils-$version.tar.bz2" |
110 | url="$GNU_MIRROR/binutils" | 110 | url="$GNU_MIRROR/binutils/releases/" |
111 | ;; | 111 | ;; |
112 | 112 | ||
113 | *) | 113 | *) |
@@ -157,26 +157,35 @@ build() { | |||
157 | fi | 157 | fi |
158 | fi | 158 | fi |
159 | 159 | ||
160 | # kludge to avoid having to install GMP and MPFR for new gcc | 160 | # kludge to avoid having to install GMP, MPFR and MPC, for new gcc |
161 | if test -n "$needs_gmp"; then | 161 | if test -n "$needs_libs"; then |
162 | cd "gcc-$version" | 162 | cd "gcc-$version" |
163 | if test ! -d gmp; then | 163 | if (echo $needs_libs | grep -q gmp && test ! -d gmp); then |
164 | echo "ROCKBOXDEV: Getting GMP" | 164 | echo "ROCKBOXDEV: Getting GMP" |
165 | if test ! -f $dlwhere/gmp-5.0.1.tar.bz2; then | 165 | if test ! -f $dlwhere/gmp-4.3.2.tar.bz2; then |
166 | getfile "gmp-5.0.1.tar.bz2" "$GNU_MIRROR/gmp" | 166 | getfile "gmp-4.3.2.tar.bz2" "$GNU_MIRROR/gcc/infrastructure" |
167 | fi | 167 | fi |
168 | tar xjf $dlwhere/gmp-5.0.1.tar.bz2 | 168 | tar xjf $dlwhere/gmp-4.3.2.tar.bz2 |
169 | ln -s gmp-5.0.1 gmp | 169 | ln -s gmp-4.3.2 gmp |
170 | fi | 170 | fi |
171 | 171 | ||
172 | if test ! -d mpfr; then | 172 | if (echo $needs_libs | grep -q mpfr && test ! -d mpfr); then |
173 | echo "ROCKBOXDEV: Getting MPFR" | 173 | echo "ROCKBOXDEV: Getting MPFR" |
174 | if test ! -f $dlwhere/mpfr-2.4.2.tar.bz2; then | 174 | if test ! -f $dlwhere/mpfr-2.4.2.tar.bz2; then |
175 | getfile "mpfr-2.4.2.tar.bz2" "$GNU_MIRROR/mpfr" | 175 | getfile "mpfr-2.4.2.tar.bz2" "$GNU_MIRROR/gcc/infrastructure" |
176 | fi | 176 | fi |
177 | tar xjf $dlwhere/mpfr-2.4.2.tar.bz2 | 177 | tar xjf $dlwhere/mpfr-2.4.2.tar.bz2 |
178 | ln -s mpfr-2.4.2 mpfr | 178 | ln -s mpfr-2.4.2 mpfr |
179 | fi | 179 | fi |
180 | |||
181 | if (echo $needs_libs | grep -q mpc && test ! -d mpc); then | ||
182 | echo "ROCKBOXDEV: Getting MPC" | ||
183 | if test ! -f $dlwhere/mpc-0.8.1.tar.gz; then | ||
184 | getfile "mpc-0.8.1.tar.gz" "$GNU_MIRROR/gcc/infrastructure" | ||
185 | fi | ||
186 | tar xzf $dlwhere/mpc-0.8.1.tar.gz | ||
187 | ln -s mpc-0.8.1 mpc | ||
188 | fi | ||
180 | cd $builddir | 189 | cd $builddir |
181 | fi | 190 | fi |
182 | 191 | ||
@@ -253,7 +262,7 @@ echo "e - arm-eabi (ipods, iriver H10, Sansa, D2, Gigabeat, etc)" | |||
253 | echo "a - arm (older ARM toolchain, deprecated) " | 262 | echo "a - arm (older ARM toolchain, deprecated) " |
254 | echo "i - mips (Jz4740 and ATJ-based players)" | 263 | echo "i - mips (Jz4740 and ATJ-based players)" |
255 | echo "separate multiple targets with spaces" | 264 | echo "separate multiple targets with spaces" |
256 | echo "(Example: \"s m a\" will build sh, m86k and arm)" | 265 | echo "(Example: \"s m a\" will build sh, m68k and arm)" |
257 | echo "" | 266 | echo "" |
258 | 267 | ||
259 | selarch=`input` | 268 | selarch=`input` |
@@ -312,7 +321,7 @@ do | |||
312 | ;; | 321 | ;; |
313 | esac | 322 | esac |
314 | build "binutils" "arm-elf-eabi" "2.20.1" "binutils-2.20.1-ld-thumb-interwork-long-call.diff" "$binopts" | 323 | build "binutils" "arm-elf-eabi" "2.20.1" "binutils-2.20.1-ld-thumb-interwork-long-call.diff" "$binopts" |
315 | build "gcc" "arm-elf-eabi" "4.4.4" "rockbox-multilibs-noexceptions-arm-elf-eabi-gcc-4.4.2_1.diff" "$gccopts" "needs_gmp" | 324 | build "gcc" "arm-elf-eabi" "4.4.4" "rockbox-multilibs-noexceptions-arm-elf-eabi-gcc-4.4.2_1.diff" "$gccopts" "gmp mpfr" |
316 | ;; | 325 | ;; |
317 | 326 | ||
318 | *) | 327 | *) |