summaryrefslogtreecommitdiff
path: root/tools/rockboxdev.sh
diff options
context:
space:
mode:
authorSolomon Peachy <pizza@shaftnet.org>2020-04-04 15:42:35 -0400
committerSolomon Peachy <pizza@shaftnet.org>2020-04-04 21:56:30 +0200
commit00c0d2012f2e8d977bad5487ab6f3b8ca46c8572 (patch)
tree5265d39f5954a356abeee1e7368bbd85e3b6c9f6 /tools/rockboxdev.sh
parent74ab8d14904041023bd0b66e05b6560110fc71be (diff)
downloadrockbox-00c0d2012f2e8d977bad5487ab6f3b8ca46c8572.tar.gz
rockbox-00c0d2012f2e8d977bad5487ab6f3b8ca46c8572.zip
rockboxdev: Store toolchain patches in-tree, instead of downloading them
This frees us from having to keep the web site in sync. Note that only currently-referenced patches were kept. Change-Id: I50da1b75baeac214cf142c8b76a05a8c56b4c1d4
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