The previously used RedHat9 has poor support for new hardware, so we are ready to switch to Ubuntu. It took a day to finally complete the installation of arm-linux-gcc. The previous failures won't be long enough. Note: All the following youname should be replaced by the actual user name. 1. Prepare the following software packages: crosstool-0.42.tar.gz (required) the following software packages can be downloaded (because corsstool is automatically downloaded back during installation) gcc-3.3.6.t
The previously used RedHat 9 has poor support for new hardware, so we are ready to switch to Ubuntu. It took a day to finally complete the installation of arm-linux-gcc. The previous failures won't be long enough. Note: All the following youname should be replaced by the actual user name.
1. Prepare the following software packages:
Crosstool-0.42.tar.gz (required)
The following software packages can be downloaded (because corsstool is automatically downloaded during installation)
Gcc-3.3.6.tar.bz2
Binutils-2.15.tar.bz2
Linux-2.6.10.tar.gz
Glibc-2.3.2.tar.gz
Glibc-linuxthreads-2.3.2.tar.gz
Linux-2.6.10.tar.gz
2.put crosstool-0.42.tar.gz in the $ home directory.
Cd $ home
Mkdir downloads
Place the following package in the new downloads directory (or empty, cross_tool will automatically download from the Internet)
Gcc-3.3.6.tar.bz2
Binutils-2.15.tar.bz2
Linux-2.6.10.tar.gz
Glibc-2.3.2.tar.gz
Glibc-linuxthreads-2.3.2.tar.gz
Linux-2.6.10.tar.gz
Sudo mkdir/opt/crosstool
Sudo chown youname/opt/crosstool
Tar-xvzf crosstool-0.42.tar.gz
Cd crosstool-0.42
Cp demo-arm.sh arm. sh
Vi arm. sh
Modify arm. sh as follows:
#! /Bin/sh
Set-ex
TARBALLS_DIR = $ home/downloads
RESULT_TOP =/opt/crosstool
Export TARBALLS_DIR RESULT_TOP
Gcc_ages = "c, c ++"
Export gcc_ages
Mkdir-p $ RESULT_TOP
Eval 'cat arm. dat gcc-3.3.6-glibc-2.3.2.dat 'sh all. sh -- notest -- nounpack
Echo Done.
Vi arm. dat
Modify arm. dat as follows:
KERNELCONFIG = 'pwd'/arm. config
TARGET = arm-linux
TARGET_CFLAGS = "-O"
Vi gcc-3.3.6-glibc-2.3.2.dat
Modify arm. dat as follows:
BINUTILS_DIR = binutils-2.15
GCC_DIR = gcc-3.3.6
GLIBC_DIR = glibc-2.3.2
GLIBCTHREADS_FILENAME = glibc-linuxthreads-2.3.2
LINUX_DIR = linux-2.6.10
LINUX_SANITIZED_HEADER_DIR = linux-libc-headers-2.6.12.0
3. obtain necessary software packages
Sudo apt-get install build-essential bison flex
Sudo apt-get install gcc-3.4
Sudo rm/usr/bin/gcc
Sudo ln-s/usr/bin/gcc-3.4/usr/bin/gcc
Note: here the gcc-3.4 replaces the built-in compiler of the system, after installation can be changed back in the same way
4. Installation (errors may occur)
./Arm. sh
5. Modify the file
Vi $ home/crosstool-0.42/build/arm-linux/gcc-3.3.6-glibc-2.3.2/build-glibc/csu/version_info.h
Modify the version_info.h file with the following content:
"Compiled on a Linux> 2.6.24-19-generic <system on 2008-10-11 ."
"Available extensions :"
"GNU libio by Per Bothner \ n"
"Crypt add-on version 2.1 by Michael gglad and others \ n"
Linuxthreads-0.10 by Xavier Leroy \ n"
"BIND-8.2.3-T5B \ n"
"Libthread_db work attached sored by Alpha Processor Inc \ n"
"NIS (YP)/NIS + NSS modules 0.19 by Thorsten Kuk \ n"
6. re-install (long time)
./Arm. sh
Export PATH =/opt/crosstool/gcc-3.3.6-glibc-2.3.2/arm-linux/bin: $ PATH
Sudo vi/etc/bash. bashrc
Add the following to the last line of the file:
Export PATH =/opt/crosstool/gcc-3.3.6-glibc-2.3.2/arm-linux/bin: $ PATH
7. installation is complete
Cd/opt/crosstool/gcc-3.3.6-glibc-2.3.2/arm-linux/bin
Ls
Note:
1. The glibc-2.3.2.tar.gz file can be decompressed manually, and version_info.h file can be compiled.
2. If different software packages are used, see http://kegel.com/crosstool/crosstool-0.43/buildlogs/.
3. Some online materials are referenced in this method. I would like to express my gratitude to the authors of these materials!