diff options
Diffstat (limited to 'tools/rockboxdev.sh')
-rwxr-xr-x | tools/rockboxdev.sh | 103 |
1 files changed, 59 insertions, 44 deletions
diff --git a/tools/rockboxdev.sh b/tools/rockboxdev.sh index 540ede75e2..63b1a1f5a1 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-6.2.1.tar.bz2" "$GNU_MIRROR/gmp" | 461 | getfile "gmp-4.3.2.tar.bz2" "$GNU_MIRROR/gmp" |
462 | tar xjf $dlwhere/gmp-6.2.1.tar.bz2 | 462 | tar xjf $dlwhere/gmp-4.3.2.tar.bz2 |
463 | ln -s gmp-6.2.1 gmp | 463 | ln -s gmp-4.3.2 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-4.1.0.tar.bz2" "$GNU_MIRROR/mpfr" | 468 | getfile "mpfr-3.1.0.tar.bz2" "$GNU_MIRROR/mpfr" |
469 | tar xjf $dlwhere/mpfr-4.1.0.tar.bz2 | 469 | tar xjf $dlwhere/mpfr-3.1.0.tar.bz2 |
470 | ln -s mpfr-4.1.0 mpfr | 470 | ln -s mpfr-3.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.2.1.tar.gz" "http://www.multiprecision.org/downloads" | 475 | getfile "mpc-1.0.1.tar.gz" "http://www.multiprecision.org/downloads" |
476 | tar xzf $dlwhere/mpc-1.2.1.tar.gz | 476 | tar xzf $dlwhere/mpc-1.0.1.tar.gz |
477 | ln -s mpc-1.2.1 mpc | 477 | ln -s mpc-1.0.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.18.tar.bz2" "https://gcc.gnu.org/pub/gcc/infrastructure" | 482 | getfile "isl-0.15.tar.bz2" "https://gcc.gnu.org/pub/gcc/infrastructure" |
483 | tar xjf $dlwhere/isl-0.18.tar.bz2 | 483 | tar xjf $dlwhere/isl-0.15.tar.bz2 |
484 | ln -s isl-0.18 isl | 484 | ln -s isl-0.15 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 | 544 | # gmp, mpc and mpfr, we simply require that they are installed on the system |
545 | # the system this is not a huge requirement since virtually all systems | 545 | # this is not a huge requirement since virtually all systems these days |
546 | # these days provide dev packages for them | 546 | # 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.37" "" "--disable-werror" "gmp isl" | 767 | build "binutils" "mipsel-elf" "2.26.1" "" "--disable-werror" "isl" |
768 | build "gcc" "mipsel-elf" "8.5.0" "" "" "gmp mpfr mpc isl" | 768 | build "gcc" "mipsel-elf" "4.9.4" "" "" "gmp mpfr mpc isl" |
769 | ;; | 769 | ;; |
770 | 770 | ||
771 | [Mm]) | 771 | [Mm]) |
772 | build "binutils" "m68k-elf" "2.37" "" "--disable-werror" "gmp isl" | 772 | build "binutils" "m68k-elf" "2.26.1" "" "--disable-werror" "isl" |
773 | build "gcc" "m68k-elf" "8.5.0" "" "--with-arch=cf MAKEINFO=missing" "gmp mpfr mpc isl" | 773 | build "gcc" "m68k-elf" "4.9.4" "" "--with-arch=cf MAKEINFO=missing" "gmp mpfr mpc isl" |
774 | ;; | 774 | ;; |
775 | 775 | ||
776 | [Aa]) | 776 | [Aa]) |
777 | binopts="" | 777 | binopts="" |
778 | gccopts="--with-multilib-list=rmprofile" | 778 | gccopts="" |
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.37" "" "$binopts --disable-werror" "gmp isl" | 785 | build "binutils" "arm-elf-eabi" "2.26.1" "" "$binopts --disable-werror" "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" | 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" |
787 | ;; | 787 | ;; |
788 | [Xx]) | 788 | [Xx]) |
789 | # IMPORTANT NOTE | 789 | # IMPORTANT NOTE |
@@ -792,19 +792,30 @@ do | |||
792 | # | 792 | # |
793 | # Samsung YP-R0/R1: | 793 | # Samsung YP-R0/R1: |
794 | # ARM1176JZF-S, softfp EABI | 794 | # ARM1176JZF-S, softfp EABI |
795 | # kernel: device runs 2.6.24, but oem toolchain is built against 2.6.27.59 | 795 | # gcc: 4.9.4 is the latest 4.9.x stable branch, also the only one that |
796 | # glibc: device runs 2.4.2 | 796 | # compiles with GCC >6 |
797 | # | 797 | # kernel: 2.6.27.59 is the same 2.6.x stable kernel as used by the |
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 | # | ||
798 | # Sony NWZ: | 803 | # Sony NWZ: |
799 | # kernel: Varies from device to device; 2.6.23, 2.6.35, and 3.x seen. | 804 | # gcc: 4.9.4 is the latest 4.9.x stable branch, also the only one that |
800 | # glibc: device runs 2.7 | 805 | # compiles with GCC >6 |
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 | ||
801 | # | 811 | # |
802 | # Thus the lowest common denominator is to target 2.6.23 and glibc 2.4 | 812 | # Thus the lowest common denominator is to use the latest 2.6.x stable |
803 | # Use a recent 2.6.32 LTS kernel, but glibc 2.20 targeting 2.6.23 and API 2.4 | 813 | # kernel but compile glibc to support kernel 2.6.23 and glibc 2.4. |
804 | # | 814 | # We use a recent 2.26.1 binutils to avoid any build problems and |
815 | # avoid patches/bugs. | ||
805 | glibcopts="--enable-kernel=2.6.23 --enable-oldest-abi=2.4" | 816 | glibcopts="--enable-kernel=2.6.23 --enable-oldest-abi=2.4" |
806 | build_linux_toolchain "arm-rockbox-linux-gnueabi" "2.37" "" "8.5.0" \ | 817 | build_linux_toolchain "arm-rockbox-linux-gnueabi" "2.26.1" "" "4.9.4" \ |
807 | "$gccopts" "2.6.32.71" "2.20" "$glibcopts" "glibc-220-make44.patch" | 818 | "$gccopts" "2.6.32.68" "2.19" "$glibcopts" "glibc-220-make44.patch" |
808 | # build alsa-lib | 819 | # build alsa-lib |
809 | # we need to set the prefix to how it is on device (/usr) and then | 820 | # we need to set the prefix to how it is on device (/usr) and then |
810 | # tweak install dir at make install step | 821 | # tweak install dir at make install step |
@@ -819,22 +830,28 @@ do | |||
819 | # This toolchain must support several targets and thus must support | 830 | # This toolchain must support several targets and thus must support |
820 | # the oldest possible configuration. | 831 | # the oldest possible configuration. |
821 | # | 832 | # |
822 | # AGPTek Rocker (and other HibyOS players): | 833 | # AGPTek Rocker: |
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 | ||
823 | # kernel: 3.10.14 | 837 | # kernel: 3.10.14 |
824 | # glibc: 2.16 | 838 | # glibc: 2.16 |
825 | # alsa: 1.0.29 | 839 | # alsa: 1.0.29 |
826 | # | 840 | # |
827 | # FiiO M3K Linux (Based on Ingenic SDK): | 841 | # FiiO M3K Linux: |
828 | # kernel: 3.10.14 | 842 | # kernel: 3.10.14 |
829 | # glibc: 2.16 | 843 | # glibc: 2.16 |
830 | # alsa: 1.0.26 | 844 | # alsa: 1.0.26 |
831 | # | 845 | # |
832 | # Use a recent 3.10 LTS kernel, but glibc 2.27 targeting 3.2.x and API 2.16 | 846 | # To maximize compatibility, we use kernel 3.2.85 which is the lastest |
833 | # | 847 | # longterm 3.2 kernel and is supported by the latest glibc, and we |
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. | ||
834 | glibcopts="--enable-kernel=3.2 --enable-oldest-abi=2.16" | 851 | glibcopts="--enable-kernel=3.2 --enable-oldest-abi=2.16" |
835 | # FIXME: maybe add -mhard-float? | 852 | # FIXME: maybe add -mhard-float |
836 | build_linux_toolchain "mipsel-rockbox-linux-gnu" "2.37" "" "8.5.0" \ | 853 | build_linux_toolchain "mipsel-rockbox-linux-gnu" "2.26.1" "" "4.9.4" \ |
837 | "$gccopts" "3.10.108" "2.27" "$glibcopts" "glibc-227-make44.patch" | 854 | "$gccopts" "3.2.85" "2.25" "$glibcopts" "glibc-225-make44.patch" |
838 | # build alsa-lib | 855 | # build alsa-lib |
839 | # we need to set the prefix to how it is on device (/usr) and then | 856 | # we need to set the prefix to how it is on device (/usr) and then |
840 | # tweak install dir at make install step | 857 | # tweak install dir at make install step |
@@ -842,10 +859,7 @@ do | |||
842 | gettool "alsa-lib" "$alsalib_ver" | 859 | gettool "alsa-lib" "$alsalib_ver" |
843 | extract "alsa-lib-$alsalib_ver" | 860 | extract "alsa-lib-$alsalib_ver" |
844 | prefix="/usr" buildtool "alsa-lib" "$alsalib_ver" \ | 861 | prefix="/usr" buildtool "alsa-lib" "$alsalib_ver" \ |
845 | "--host=$target --disable-python" "" "install DESTDIR=$prefix/$target/sysroot" | 862 | "--host=$target --disable-python" "" "install DESTDIR=$prefix/$target/sysroot" |
846 | |||
847 | ### Everything below here is needed only for bluetooth support | ||
848 | |||
849 | # build libffi | 863 | # build libffi |
850 | libffi_ver="3.2.1" | 864 | libffi_ver="3.2.1" |
851 | gettool "libffi" "$libffi_ver" | 865 | gettool "libffi" "$libffi_ver" |
@@ -866,7 +880,7 @@ do | |||
866 | gettool "glib" "$glib_ver" | 880 | gettool "glib" "$glib_ver" |
867 | extract "glib-$glib_ver" | 881 | extract "glib-$glib_ver" |
868 | prefix="/usr" buildtool "glib" "$glib_ver" \ | 882 | prefix="/usr" buildtool "glib" "$glib_ver" \ |
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" | 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" |
870 | 884 | ||
871 | # build expat | 885 | # build expat |
872 | expat_ver="2.1.0" | 886 | expat_ver="2.1.0" |
@@ -882,6 +896,7 @@ do | |||
882 | prefix="/usr" buildtool "dbus" "$dbus_ver" \ | 896 | prefix="/usr" buildtool "dbus" "$dbus_ver" \ |
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 " | 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 " |
884 | 898 | ||
899 | |||
885 | ;; | 900 | ;; |
886 | *) | 901 | *) |
887 | echo "ROCKBOXDEV: Unsupported architecture option: $arch" | 902 | echo "ROCKBOXDEV: Unsupported architecture option: $arch" |