SHARE
TWEET

ROCKBOX BUILD TOOLS FOR ARM CORTEX-M4

a guest Nov 17th, 2016 72 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. echo "*** ROCKBOX BUILD TOOLS FOR ARM CORTEX-M4 ***"
  2. echo "* Benjamin Brown - October, 2013"
  3. echo ""
  4. echo "* A SIMPLE SCRIPT FOR BUILDING THE ARM CORTEX TOOLCHAIN ADAPTED FROM:"
  5. echo "http://cu.rious.org/make/compiling-the-arm-cortex-m4-toolchain-yourself/"
  6. echo ""
  7. echo "* INSTALL DEPENDENCIES"
  8. echo "flex bison libgmp3-dev libmpfr-dev libncurses5-dev libmpc-dev autoconf"
  9. echo "texinfo build-essential libftdi-dev libexpat1 libexpat1-dev"
  10. echo ""
  11. echo "* FOR 64 BIT HOSTS:"
  12. echo "libc6-dev-i386"
  13. echo ""
  14. echo "***THIS SCRIPT NEEDS TO BE RUN AS ROOT***"
  15. echo "***WARNING THIS SCRIPT DOES NOT DO ANY ERROR CHECKING***"
  16. echo "***USE THIS SCRIPT AT YOUR OWN RISK***"
  17. echo "***EDIT THIS SCRIPT TO CONTINUE***"
  18. exit 1
  19.  
  20. echo "* DO OUR WORK IN /TMP"
  21. cd /tmp
  22. mkdir src
  23. cd src
  24.  
  25. echo "* RETRIEVING AND EXTRACTING REQUIRED SOURCES"
  26. wget http://ftp.gnu.org/gnu/binutils/binutils-2.21.1a.tar.bz2
  27. tar jxvf binutils-2.21.1a.tar.bz2
  28. wget ftp://sources.redhat.com/pub/newlib/newlib-1.19.0.tar.gz
  29. tar zxvf newlib-1.19.0.tar.gz
  30. wget ftp://mirrors.kernel.org/gnu/gcc/gcc-4.6.2/gcc-4.6.2.tar.bz2
  31. tar jxvf gcc-4.6.2.tar.bz2
  32. wget http://ftp.gnu.org/gnu/gdb/gdb-7.3.1.tar.bz2
  33. tar jxvf gdb-7.3.1.tar.bz2
  34.  
  35. echo "* BUILDING REQUIRED BINARY UTILITIES"
  36. cd binutils-2.21.1/
  37. ./configure  --target=arm-none-eabi --prefix=/usr/local/cortex --enable-interwork --enable-multilib --disable-nls --disable-libssp
  38. make all
  39. echo "* INSTALLING REQUIRED BINARY UTILITIES"
  40. make install
  41. cd ..
  42.  
  43. echo "* BOOTSTRAPPING GCC"
  44. cd gcc-4.6.2/
  45. mkdir objdir
  46. cd objdir/
  47. ../configure --target=arm-none-eabi --prefix=/usr/local/cortex --enable-interwork --enable-multilib --enable-languages="c" --with-newlib --with-headers=../../newlib-1.19.0/newlib/libc/include/ --disable-libssp --disable-nls --with-system-zlib --with-fpu=vfp
  48. make all-gcc
  49. make install-gcc
  50.  
  51. echo "* LINKING /usr/local/cortex/bin/arm-none-eabi-* TO /usr/local/bin/arm-none-eabi-*"
  52. cd /usr/local/bin/
  53. ln -s ../cortex/bin/arm-none-eabi-addr2line
  54. ln -s ../cortex/bin/arm-none-eabi-ar
  55. ln -s ../cortex/bin/arm-none-eabi-as
  56. ln -s ../cortex/bin/arm-none-eabi-c++filt
  57. ln -s ../cortex/bin/arm-none-eabi-cpp
  58. ln -s ../cortex/bin/arm-none-eabi-elfedit
  59. ln -s ../cortex/bin/arm-none-eabi-gcc
  60. ln -s ../cortex/bin/arm-none-eabi-gcc arm-none-eabi-cc
  61. ln -s ../cortex/bin/arm-none-eabi-gcc-4.6.2
  62. ln -s ../cortex/bin/arm-none-eabi-gcov
  63. ln -s ../cortex/bin/arm-none-eabi-gprof
  64. ln -s ../cortex/bin/arm-none-eabi-ld
  65. ln -s ../cortex/bin/arm-none-eabi-ld.bfd
  66. ln -s ../cortex/bin/arm-none-eabi-nm
  67. ln -s ../cortex/bin/arm-none-eabi-objcopy
  68. ln -s ../cortex/bin/arm-none-eabi-objdump
  69. ln -s ../cortex/bin/arm-none-eabi-ranlib
  70. ln -s ../cortex/bin/arm-none-eabi-readelf
  71. ln -s ../cortex/bin/arm-none-eabi-size
  72. ln -s ../cortex/bin/arm-none-eabi-strings
  73. ln -s ../cortex/bin/arm-none-eabi-strip
  74. cd /tmp/src/
  75.  
  76.  
  77. echo "* BUILDING NEWLIB"
  78. cd newlib-1.19.0/
  79. ./configure --target=arm-none-eabi --prefix=/usr/local/cortex --enable-interwork --enable-multilib --disable-libssp --disable-nls
  80. make all
  81. echo "* INSTALLING NEWLIB"
  82. make install
  83. cd ..
  84.  
  85. echo "* BUILDING GCC"
  86. cd gcc-4.6.2/objdir/
  87. make all
  88. echo "* INSTALLING GCC"
  89. make install
  90. cd ../..
  91.  
  92. echo "* BUILDING GDB"
  93. cd gdb-7.3.1/
  94. ./configure --target=arm-none-eabi --prefix=/usr/local/cortex --enable-interwork --enable-multilib --disable-libssp --disable-nls
  95. make all
  96. echo "* INSTALLING GDB"
  97. make install
  98.  
  99. echo "*** FINISHED ***"
  100. exit 0
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top