summaryrefslogtreecommitdiff
path: root/tools/rockboxdev.sh
diff options
context:
space:
mode:
Diffstat (limited to 'tools/rockboxdev.sh')
-rwxr-xr-xtools/rockboxdev.sh14
1 files changed, 6 insertions, 8 deletions
diff --git a/tools/rockboxdev.sh b/tools/rockboxdev.sh
index 822a76da9f..e81915e20b 100755
--- a/tools/rockboxdev.sh
+++ b/tools/rockboxdev.sh
@@ -29,6 +29,9 @@ else
29 make="make" 29 make="make"
30fi 30fi
31 31
32# This is the absolute path to where the script resides.
33rockboxdevdir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
34
32parallel=`nproc` 35parallel=`nproc`
33if [ $parallel -gt 1 ] ; then 36if [ $parallel -gt 1 ] ; then
34 make_parallel=-j$parallel 37 make_parallel=-j$parallel
@@ -349,8 +352,6 @@ build() {
349 configure_params="$5" 352 configure_params="$5"
350 needs_libs="$6" 353 needs_libs="$6"
351 354
352 patch_url="http://www.rockbox.org/gcc"
353
354 # create build directory 355 # create build directory
355 if test -d $builddir; then 356 if test -d $builddir; then
356 if test ! -w $builddir; then 357 if test ! -w $builddir; then
@@ -361,15 +362,12 @@ build() {
361 mkdir -p $builddir 362 mkdir -p $builddir
362 fi 363 fi
363 364
365 patch_dir="$rockboxdevdir/toolchain-patches"
366
364 # download source tarball 367 # download source tarball
365 gettool "$toolname" "$version" 368 gettool "$toolname" "$version"
366 file="$toolname-$version" 369 file="$toolname-$version"
367 370
368 # download patch
369 for p in $patch; do
370 getfile "$p" "$patch_url"
371 done
372
373 cd $builddir 371 cd $builddir
374 372
375 extract "$toolname-$version" 373 extract "$toolname-$version"
@@ -379,7 +377,7 @@ build() {
379 echo "ROCKBOXDEV: applying patch $p" 377 echo "ROCKBOXDEV: applying patch $p"
380 378
381 # apply the patch 379 # apply the patch
382 (cd $builddir/$toolname-$version && patch -p1 < "$dlwhere/$p") 380 (cd $builddir/$toolname-$version && patch -p1 < "$patch_dir/$p")
383 381
384 # check if the patch applied cleanly 382 # check if the patch applied cleanly
385 if [ $? -gt 0 ]; then 383 if [ $? -gt 0 ]; then