summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xtools/rockboxdev.sh33
1 files changed, 18 insertions, 15 deletions
diff --git a/tools/rockboxdev.sh b/tools/rockboxdev.sh
index 071ecbc863..a5dfcc3f94 100755
--- a/tools/rockboxdev.sh
+++ b/tools/rockboxdev.sh
@@ -289,17 +289,20 @@ run_cmd() {
289 fi 289 fi
290} 290}
291 291
292# check if the following should be executed or not, depending on RESTART variable: 292# check if the following should be executed or not, depending on RBDEV_RESTART variable:
293# $1=tool 293# $1=tool
294# If RESTART is empty, always perform step, otherwise only perform is there is 294# If RBDEV_RESTART is empty, always perform step, otherwise only perform is there
295# an exact match. On the first match, RESTART is reset to "" so that next step 295# is an exact match. On the first match, RBDEV_RESTART is reset to "" so that next step
296# are executed 296# are executed
297check_restart() { 297check_restart() {
298 if [ "$1" = "$RESTART" ]; then 298 if [ "x$RBDEV_RESTART" = "x" ]; then
299 RESTART="" 299 return 0
300 true 300 elif [ "$1" = "$RBDEV_RESTART" ]; then
301 RBDEV_RESTART=""
302 return 0
303 else
304 return 1
301 fi 305 fi
302 [ "$RESTART" = "" ] && true || false
303} 306}
304 307
305# advanced tool building: create a build directory, run configure, run make 308# advanced tool building: create a build directory, run configure, run make
@@ -320,9 +323,9 @@ buildtool() {
320 install_opts="$5" 323 install_opts="$5"
321 logfile="$builddir/build-$toolname.log" 324 logfile="$builddir/build-$toolname.log"
322 325
323 stepname=${RESTART_STEP-$tool} 326 stepname=${RESTART_STEP:-$tool}
324 if ! check_restart "$stepname"; then 327 if ! check_restart "$stepname"; then
325 echo "ROCKBOXDEV: Skipping step '$stepname' as requested per RESTART" 328 echo "ROCKBOXDEV: Skipping step '$stepname' as requested per RBDEV_RESTART"
326 return 329 return
327 fi 330 fi
328 echo "ROCKBOXDEV: Starting step '$stepname'" 331 echo "ROCKBOXDEV: Starting step '$stepname'"
@@ -601,8 +604,8 @@ build_linux_toolchain () {
601 extract "linux-$linux_ver" 604 extract "linux-$linux_ver"
602 extract "glibc-$glibc_ver" 605 extract "glibc-$glibc_ver"
603 606
604 # we make it possible to restart a build on error by using the RESTART 607 # we make it possible to restart a build on error by using the RBDEV_RESTART
605 # variable, the format is RESTART="tool" where tool is the toolname at which 608 # variable, the format is RBDEV_RESTART="tool" where tool is the toolname at which
606 # to restart (binutils, gcc) 609 # to restart (binutils, gcc)
607 610
608 # install binutils, with support for sysroot 611 # install binutils, with support for sysroot
@@ -645,7 +648,7 @@ usage () {
645 echo "options:" 648 echo "options:"
646 echo " --help Display this help" 649 echo " --help Display this help"
647 echo " --target=LIST List of targets to build" 650 echo " --target=LIST List of targets to build"
648 echo " --restart=STEP Restart build at given STEP (same as RESTART env var)" 651 echo " --restart=STEP Restart build at given STEP (same as RBDEV_RESTART env var)"
649 echo " --prefix=PREFIX Set install prefix (same as RBDEV_PREFIX env var)" 652 echo " --prefix=PREFIX Set install prefix (same as RBDEV_PREFIX env var)"
650 echo " --dlwhere=DIR Set download directory (same as RBDEV_DOWNLOAD env var)" 653 echo " --dlwhere=DIR Set download directory (same as RBDEV_DOWNLOAD env var)"
651 echo " --builddir=DIR Set build directory (same as RBDEV_BUILD env var)" 654 echo " --builddir=DIR Set build directory (same as RBDEV_BUILD env var)"
@@ -873,7 +876,7 @@ do
873 extract "libffi-$libffi_ver" 876 extract "libffi-$libffi_ver"
874 prefix="/usr" buildtool "libffi" "$libffi_ver" \ 877 prefix="/usr" buildtool "libffi" "$libffi_ver" \
875 "--includedir=/usr/include --host=$target" "" "install DESTDIR=$prefix/$target/sysroot" 878 "--includedir=/usr/include --host=$target" "" "install DESTDIR=$prefix/$target/sysroot"
876 (cd $prefix/$target/sysroot/usr/include ; ln -s ../lib/libffi-$libffi_ver/include/ffi.h . ; ln -s ../lib/libffi-$libffi_ver/include/ffitarget.h . ) 879 (cd $prefix/$target/sysroot/usr/include ; ln -sf ../lib/libffi-$libffi_ver/include/ffi.h . ; ln -sf ../lib/libffi-$libffi_ver/include/ffitarget.h . )
877 880
878 # build zlib 881 # build zlib
879 zlib_ver="1.2.11" 882 zlib_ver="1.2.11"
@@ -887,7 +890,7 @@ do
887 gettool "glib" "$glib_ver" 890 gettool "glib" "$glib_ver"
888 extract "glib-$glib_ver" 891 extract "glib-$glib_ver"
889 prefix="/usr" buildtool "glib" "$glib_ver" \ 892 prefix="/usr" buildtool "glib" "$glib_ver" \
890 "--host=$target --disable-libelf glib_cv_stack_grows=no glib_cv_uscore=no ac_cv_func_posix_getpwuid_r=yes ac_cv_func_posix_getgrgid_r=yes" "" "install DESTDIR=$prefix/$target/sysroot" 893 "--host=$target --with-sysroot=$prefix/$target/sysroot --disable-libelf glib_cv_stack_grows=no glib_cv_uscore=no ac_cv_func_posix_getpwuid_r=yes ac_cv_func_posix_getgrgid_r=yes" "" "install DESTDIR=$prefix/$target/sysroot"
891 894
892 # build expat 895 # build expat
893 expat_ver="2.1.0" 896 expat_ver="2.1.0"
@@ -901,7 +904,7 @@ do
901 gettool "dbus" "$dbus_ver" 904 gettool "dbus" "$dbus_ver"
902 extract "dbus-$dbus_ver" 905 extract "dbus-$dbus_ver"
903 prefix="/usr" buildtool "dbus" "$dbus_ver" \ 906 prefix="/usr" buildtool "dbus" "$dbus_ver" \
904 "--host=$target --includedir=/usr/include --enable-abstract-sockets ac_cv_lib_expat_XML_ParserCreate_MM=yes --disable-systemd --disable-launchd --enable-x11-autolaunch=no --with-x=no -disable-selinux --disable-apparmor --disable-doxygen-docs " "" "install DESTDIR=$prefix/$target/sysroot " 907 "--host=$target --with-sysroot=$prefix/$target/sysroot --includedir=/usr/include --enable-abstract-sockets ac_cv_lib_expat_XML_ParserCreate_MM=yes --disable-systemd --disable-launchd --enable-x11-autolaunch=no --with-x=no -disable-selinux --disable-apparmor --disable-doxygen-docs " "" "install DESTDIR=$prefix/$target/sysroot "
905 908
906 909
907 ;; 910 ;;