Patch and Crosstool-ng can be downloaded from the following URL, https://community.freescale.com/thread/386450 but you will be disappointed, changed the script, compiled and found that the wrong, LD,GCC version is not correct, There is no way to reproduce the environment of Freescale, compile the same toolchain, the same toolchain is how to compile, estimated that Freescale is not known. It took a while to reconstruct a freesscale-like toolchain, with a higher similarity, at least compiled glibc. The following is the process of rebuilding, some of which follow what Freescale provides in the download link mentioned above:
1. Environment ready, Ubuntu 10.04 LTS, can also use Ubuntu 12.04,10.04 results closer
2. Install the necessary software, Crosstool compile time need not say, easy to leak is MSGFMT, can be installed by the following command
sudo Install Maketex
3. Create a working directory and get Crosstool-ng
sudo mkdir /worksudochown you:yourgroup//workgit clone [email protected ]:secularbird/fsl_crosstoolng.git Build
4. Compiling and installing Crosstool-ng
CD build. /configure--localmake doinstall
5. Start compiling toolchain, joking, also can't make up, first through it download point necessary code
CP default_configs/linaro_2011. - . config. config . /ct-ng Build
Run to the decompression code when you can stop, some downloads in the middle can't find, need you to find the corresponding down on the internet
6. Create the Lower intermediate directory, to replace the download in 5, but the version is not on the
mkdir/work/SOURCECD/work/source# get Binutilsgit clone http://git.linaro.org/toolchain/binutils-gdb.git binutilsCD Binutilsgit Checkout 3f26b7e8cb3d1e545a1461ded51f24259b1795e7
Cd.. # get GCC compilerwget-C https://launchpad.net/gcc-linaro/4.6/4.6-2011.07/+download/gcc-linaro-4.6-2011.07.tar.bz2TarXfGCC-linaro-4.6-2011.07.Tar. bz2MV GCC-linaro-4.6-2001.07.0 GCC# Get Glibcgit clone https://Git.linaro.org/toolchain/glibc.gitCD Glibcgit Checkout 943515F05CDBC1463BB06C9ADBD3DCEE5C1A7F57CD. #获取glibc-portsgit clone git://Sourceware.org/git/glibc-ports.gitCD glibc-portsgit Checkout 4F32A56EBBF9936A4990F1BCDEAB7AFCEC8F5322CD. #获取cortex-stringsgit Clone http://Git.linaro.org/toolchain/cortex-strings.gitCD cortex-stringsgit Checkout d5fda23377842a6bc0b22f502af3db43b5e5475d
7. Create a corresponding soft connection
cd/work/build/.build/srcrm --rf binutils-2.21gcc-linaro-4.6- 2011.06-0 glibc-2.13ln -sf/work/source/binutils binutils-2.21Ln -sf/work/source/gccgcc-linaro-4.6-2011.06-0 ln -sf/work/source/glibc glibc-2.13
cd/work/source/glibc
Ln-sf/work/source/glibc-ports ports
8. Prepare cortex-string
cd/work/source/cortex-strings. /autogen. SH . /configure--with-cpu=armv7-a--with-neon make add-ontar XF cortex-strings. Tar MV cortex-strings/work/source/glibc/
9. Hit Patch
cd/work/source/gcc/patch -P1 </work/build/multilib_patches/0001-linaro-gcc -multilib. Patch /work/source/glibc/patch -P1 </work/build/multilib_patches/0001-glibc-multilib. Patch /work/source/glibc/cortex-stringspatch -P1 </work/build/multilib_patches/ 0002-glibc-cortex-strings. Patch
Cd/work/souce/binutils
RM-RF Sim GdB ReadLine
10. Start compiling
./ct-ng Build
The entire compilation process is expected to take between 1.5 hours and eight hours, and if the hardware allows it, you can adjust the number of jobs in the script under Crosstool and Multilibs directories to shorten the point compilation time
Rebuilding Freescale 4.6.2 Multilib toolchain