summaryrefslogtreecommitdiff
path: root/tools/rockboxdev.sh
diff options
context:
space:
mode:
Diffstat (limited to 'tools/rockboxdev.sh')
-rwxr-xr-xtools/rockboxdev.sh103
1 files changed, 44 insertions, 59 deletions
diff --git a/tools/rockboxdev.sh b/tools/rockboxdev.sh
index 63b1a1f5a1..540ede75e2 100755
--- a/tools/rockboxdev.sh
+++ b/tools/rockboxdev.sh
@@ -458,30 +458,30 @@ build() {
458 cd "$toolname-$version" 458 cd "$toolname-$version"
459 if (echo $needs_libs | grep -q gmp && test ! -d gmp); then 459 if (echo $needs_libs | grep -q gmp && test ! -d gmp); then
460 echo "ROCKBOXDEV: Getting GMP" 460 echo "ROCKBOXDEV: Getting GMP"
461 getfile "gmp-4.3.2.tar.bz2" "$GNU_MIRROR/gmp" 461 getfile "gmp-6.2.1.tar.bz2" "$GNU_MIRROR/gmp"
462 tar xjf $dlwhere/gmp-4.3.2.tar.bz2 462 tar xjf $dlwhere/gmp-6.2.1.tar.bz2
463 ln -s gmp-4.3.2 gmp 463 ln -s gmp-6.2.1 gmp
464 fi 464 fi
465 465
466 if (echo $needs_libs | grep -q mpfr && test ! -d mpfr); then 466 if (echo $needs_libs | grep -q mpfr && test ! -d mpfr); then
467 echo "ROCKBOXDEV: Getting MPFR" 467 echo "ROCKBOXDEV: Getting MPFR"
468 getfile "mpfr-3.1.0.tar.bz2" "$GNU_MIRROR/mpfr" 468 getfile "mpfr-4.1.0.tar.bz2" "$GNU_MIRROR/mpfr"
469 tar xjf $dlwhere/mpfr-3.1.0.tar.bz2 469 tar xjf $dlwhere/mpfr-4.1.0.tar.bz2
470 ln -s mpfr-3.1.0 mpfr 470 ln -s mpfr-4.1.0 mpfr
471 fi 471 fi
472 472
473 if (echo $needs_libs | grep -q mpc && test ! -d mpc); then 473 if (echo $needs_libs | grep -q mpc && test ! -d mpc); then
474 echo "ROCKBOXDEV: Getting MPC" 474 echo "ROCKBOXDEV: Getting MPC"
475 getfile "mpc-1.0.1.tar.gz" "http://www.multiprecision.org/downloads" 475 getfile "mpc-1.2.1.tar.gz" "http://www.multiprecision.org/downloads"
476 tar xzf $dlwhere/mpc-1.0.1.tar.gz 476 tar xzf $dlwhere/mpc-1.2.1.tar.gz
477 ln -s mpc-1.0.1 mpc 477 ln -s mpc-1.2.1 mpc
478 fi 478 fi
479 479
480 if (echo $needs_libs | grep -q isl && test ! -d isl); then 480 if (echo $needs_libs | grep -q isl && test ! -d isl); then
481 echo "ROCKBOXDEV: Getting ISL" 481 echo "ROCKBOXDEV: Getting ISL"
482 getfile "isl-0.15.tar.bz2" "https://gcc.gnu.org/pub/gcc/infrastructure" 482 getfile "isl-0.18.tar.bz2" "https://gcc.gnu.org/pub/gcc/infrastructure"
483 tar xjf $dlwhere/isl-0.15.tar.bz2 483 tar xjf $dlwhere/isl-0.18.tar.bz2
484 ln -s isl-0.15 isl 484 ln -s isl-0.18 isl
485 fi 485 fi
486 cd $builddir 486 cd $builddir
487 fi 487 fi
@@ -541,9 +541,9 @@ build_linux_toolchain () {
541 541
542 # check libraries: 542 # check libraries:
543 # contrary to other toolchains that rely on a hack to avoid installing 543 # contrary to other toolchains that rely on a hack to avoid installing
544 # gmp, mpc and mpfr, we simply require that they are installed on the system 544 # gmp, mpc, and mpfr, we simply require that they are installed on
545 # this is not a huge requirement since virtually all systems these days 545 # the system this is not a huge requirement since virtually all systems
546 # provide dev packages for them 546 # these days provide dev packages for them
547 # FIXME: maybe add an option to download and install them automatically 547 # FIXME: maybe add an option to download and install them automatically
548 checklib "mpc" "gmp" "mpfr" 548 checklib "mpc" "gmp" "mpfr"
549 549
@@ -764,26 +764,26 @@ do
764 echo "" 764 echo ""
765 case $arch in 765 case $arch in
766 [Ii]) 766 [Ii])
767 build "binutils" "mipsel-elf" "2.26.1" "" "--disable-werror" "isl" 767 build "binutils" "mipsel-elf" "2.37" "" "--disable-werror" "gmp isl"
768 build "gcc" "mipsel-elf" "4.9.4" "" "" "gmp mpfr mpc isl" 768 build "gcc" "mipsel-elf" "8.5.0" "" "" "gmp mpfr mpc isl"
769 ;; 769 ;;
770 770
771 [Mm]) 771 [Mm])
772 build "binutils" "m68k-elf" "2.26.1" "" "--disable-werror" "isl" 772 build "binutils" "m68k-elf" "2.37" "" "--disable-werror" "gmp isl"
773 build "gcc" "m68k-elf" "4.9.4" "" "--with-arch=cf MAKEINFO=missing" "gmp mpfr mpc isl" 773 build "gcc" "m68k-elf" "8.5.0" "" "--with-arch=cf MAKEINFO=missing" "gmp mpfr mpc isl"
774 ;; 774 ;;
775 775
776 [Aa]) 776 [Aa])
777 binopts="" 777 binopts=""
778 gccopts="" 778 gccopts="--with-multilib-list=rmprofile"
779 case $system in 779 case $system in
780 Darwin) 780 Darwin)
781 binopts="--disable-nls" 781 binopts="--disable-nls"
782 gccopts="--disable-nls" 782 gccopts="--disable-nls"
783 ;; 783 ;;
784 esac 784 esac
785 build "binutils" "arm-elf-eabi" "2.26.1" "" "$binopts --disable-werror" "isl" 785 build "binutils" "arm-elf-eabi" "2.37" "" "$binopts --disable-werror" "gmp isl"
786 build "gcc" "arm-elf-eabi" "4.9.4" "rockbox-multilibs-noexceptions-arm-elf-eabi-gcc-4.9.4.diff" "$gccopts MAKEINFO=missing" "gmp mpfr mpc isl" 786 build "gcc" "arm-elf-eabi" "8.5.0" "rockbox-multilibs-noexceptions-arm-elf-eabi-gcc-8.5.0.diff" "$gccopts MAKEINFO=missing" "gmp mpfr mpc isl"
787 ;; 787 ;;
788 [Xx]) 788 [Xx])
789 # IMPORTANT NOTE 789 # IMPORTANT NOTE
@@ -792,30 +792,19 @@ do
792 # 792 #
793 # Samsung YP-R0/R1: 793 # Samsung YP-R0/R1:
794 # ARM1176JZF-S, softfp EABI 794 # ARM1176JZF-S, softfp EABI
795 # gcc: 4.9.4 is the latest 4.9.x stable branch, also the only one that 795 # kernel: device runs 2.6.24, but oem toolchain is built against 2.6.27.59
796 # compiles with GCC >6 796 # glibc: device runs 2.4.2
797 # kernel: 2.6.27.59 is the same 2.6.x stable kernel as used by the 797 #
798 # original ct-ng toolchain, the device runs kernel 2.6.24
799 # glibc: 2.19 is the latest version that supports kernel 2.6.24 which
800 # is used on the device, but we need to support ABI 2.4 because
801 # the device uses glibc 2.4.2
802 #
803 # Sony NWZ: 798 # Sony NWZ:
804 # gcc: 4.9.4 is the latest 4.9.x stable branch, also the only one that 799 # kernel: Varies from device to device; 2.6.23, 2.6.35, and 3.x seen.
805 # compiles with GCC >6 800 # glibc: device runs 2.7
806 # kernel: 2.6.32.68 is the latest 2.6.x stable kernel, the device
807 # runs kernel 2.6.23 or 2.6.35 or 3.x for the most recent
808 # glibc: 2.19 is the latest version that supports kernel 2.6.23 which
809 # is used on many Sony players, but we need to support ABI 2.7
810 # because the device uses glibc 2.7
811 # 801 #
812 # Thus the lowest common denominator is to use the latest 2.6.x stable 802 # Thus the lowest common denominator is to target 2.6.23 and glibc 2.4
813 # kernel but compile glibc to support kernel 2.6.23 and glibc 2.4. 803 # Use a recent 2.6.32 LTS kernel, but glibc 2.20 targeting 2.6.23 and API 2.4
814 # We use a recent 2.26.1 binutils to avoid any build problems and 804 #
815 # avoid patches/bugs.
816 glibcopts="--enable-kernel=2.6.23 --enable-oldest-abi=2.4" 805 glibcopts="--enable-kernel=2.6.23 --enable-oldest-abi=2.4"
817 build_linux_toolchain "arm-rockbox-linux-gnueabi" "2.26.1" "" "4.9.4" \ 806 build_linux_toolchain "arm-rockbox-linux-gnueabi" "2.37" "" "8.5.0" \
818 "$gccopts" "2.6.32.68" "2.19" "$glibcopts" "glibc-220-make44.patch" 807 "$gccopts" "2.6.32.71" "2.20" "$glibcopts" "glibc-220-make44.patch"
819 # build alsa-lib 808 # build alsa-lib
820 # we need to set the prefix to how it is on device (/usr) and then 809 # we need to set the prefix to how it is on device (/usr) and then
821 # tweak install dir at make install step 810 # tweak install dir at make install step
@@ -830,28 +819,22 @@ do
830 # This toolchain must support several targets and thus must support 819 # This toolchain must support several targets and thus must support
831 # the oldest possible configuration. 820 # the oldest possible configuration.
832 # 821 #
833 # AGPTek Rocker: 822 # AGPTek Rocker (and other HibyOS players):
834 # XBurst release 1 (something inbetween mips32r1 and mips32r2)
835 # gcc: 4.9.4 is the latest 4.9.x stable branch, also the only one that
836 # compiles with GCC >6
837 # kernel: 3.10.14 823 # kernel: 3.10.14
838 # glibc: 2.16 824 # glibc: 2.16
839 # alsa: 1.0.29 825 # alsa: 1.0.29
840 # 826 #
841 # FiiO M3K Linux: 827 # FiiO M3K Linux (Based on Ingenic SDK):
842 # kernel: 3.10.14 828 # kernel: 3.10.14
843 # glibc: 2.16 829 # glibc: 2.16
844 # alsa: 1.0.26 830 # alsa: 1.0.26
845 # 831 #
846 # To maximize compatibility, we use kernel 3.2.85 which is the lastest 832 # Use a recent 3.10 LTS kernel, but glibc 2.27 targeting 3.2.x and API 2.16
847 # longterm 3.2 kernel and is supported by the latest glibc, and we 833 #
848 # require support for up to glibc 2.16
849 # We use a recent 2.26.1 binutils to avoid any build problems and
850 # avoid patches/bugs.
851 glibcopts="--enable-kernel=3.2 --enable-oldest-abi=2.16" 834 glibcopts="--enable-kernel=3.2 --enable-oldest-abi=2.16"
852 # FIXME: maybe add -mhard-float 835 # FIXME: maybe add -mhard-float?
853 build_linux_toolchain "mipsel-rockbox-linux-gnu" "2.26.1" "" "4.9.4" \ 836 build_linux_toolchain "mipsel-rockbox-linux-gnu" "2.37" "" "8.5.0" \
854 "$gccopts" "3.2.85" "2.25" "$glibcopts" "glibc-225-make44.patch" 837 "$gccopts" "3.10.108" "2.27" "$glibcopts" "glibc-227-make44.patch"
855 # build alsa-lib 838 # build alsa-lib
856 # we need to set the prefix to how it is on device (/usr) and then 839 # we need to set the prefix to how it is on device (/usr) and then
857 # tweak install dir at make install step 840 # tweak install dir at make install step
@@ -859,7 +842,10 @@ do
859 gettool "alsa-lib" "$alsalib_ver" 842 gettool "alsa-lib" "$alsalib_ver"
860 extract "alsa-lib-$alsalib_ver" 843 extract "alsa-lib-$alsalib_ver"
861 prefix="/usr" buildtool "alsa-lib" "$alsalib_ver" \ 844 prefix="/usr" buildtool "alsa-lib" "$alsalib_ver" \
862 "--host=$target --disable-python" "" "install DESTDIR=$prefix/$target/sysroot" 845 "--host=$target --disable-python" "" "install DESTDIR=$prefix/$target/sysroot"
846
847 ### Everything below here is needed only for bluetooth support
848
863 # build libffi 849 # build libffi
864 libffi_ver="3.2.1" 850 libffi_ver="3.2.1"
865 gettool "libffi" "$libffi_ver" 851 gettool "libffi" "$libffi_ver"
@@ -880,7 +866,7 @@ do
880 gettool "glib" "$glib_ver" 866 gettool "glib" "$glib_ver"
881 extract "glib-$glib_ver" 867 extract "glib-$glib_ver"
882 prefix="/usr" buildtool "glib" "$glib_ver" \ 868 prefix="/usr" buildtool "glib" "$glib_ver" \
883 "--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" 869 "--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 CFLAGS=-Wno-error=format-nonliteral" "" "install DESTDIR=$prefix/$target/sysroot"
884 870
885 # build expat 871 # build expat
886 expat_ver="2.1.0" 872 expat_ver="2.1.0"
@@ -896,7 +882,6 @@ do
896 prefix="/usr" buildtool "dbus" "$dbus_ver" \ 882 prefix="/usr" buildtool "dbus" "$dbus_ver" \
897 "--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 " 883 "--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 "
898 884
899
900 ;; 885 ;;
901 *) 886 *)
902 echo "ROCKBOXDEV: Unsupported architecture option: $arch" 887 echo "ROCKBOXDEV: Unsupported architecture option: $arch"