Create an arm-linux cross-compilation tool chain using crosstool

Source: Internet
Author: User
Crosstool creates an arm-linux cross-compiling tool chain-Linux general technology-Linux programming and kernel information. For details, see the following. Today, we use crosstool to create an arm-linux cross-compilation toolchain and successfully compile and run the u-boot-1.3.0.

Learn about crosstool through http://www.kegel.com/crosstool.

The tool chain version to be compiled is 3.3.2.

The procedure is as follows:

Download crosstool-0.43.tar.gz
Mkdir/home/wxm/crosstool
Cp crosstool-0.43.tar.gz/home/wxm/crosstool
Cd/home/wxm/crosstool
Tar-jxvf crosstool-0.43.tar.gz
Mkdir downloads

Download the source code package:
Binutils-2.15.tar.bz2
Gcc-3.3.2.tar.gz
Glibc-2.3.2.tar.gz
Glibc-linuxthreads-2.3.2.tar.gz
Linux-2.6.9.tar.bz2
Copy to/home/wxm/crosstool/downloads

Modify arm. dat
KERNELCONFIG = 'pwd'/arm. config
TARGET = arm-linux
TARGET_CFLAGS = "-O"

Modify demo-arm.sh:
#! /Bin/sh
# This script has one line for each known working toolchain
# For this architecture. Uncomment the one you want.
# Generated by generate-demo.pl from buildlogs/all.dats.txt
Set-ex
TARBALLS_DIR =/home/wxm/crosstool/downloads # path for storing the downloaded source code package
RESULT_TOP =/home/wxm/crosstool/install # install the cross-compilation tool to link the installation path
Export TARBALLS_DIR RESULT_TOP
Gcc_ages = "c, c ++"
Export gcc_ages
# Really, you shoshould do the mkdir before running this,
# And chown/opt/crosstool to yourself so you don't need to run as root.
Mkdir-p $ RESULT_TOP
# Eval 'cat arm. dat gcc-2.95.3-glibc-2.1.3.dat 'sh all. sh -- notest
# Eval 'cat arm. dat gcc-2.95.3-glibc-2.2.2.dat 'sh all. sh -- notest
# Eval 'cat arm. dat gcc-2.95.3-glibc-2.2.5.dat 'sh all. sh -- notest
# Eval 'cat arm. dat gcc-3.2.3-glibc-2.2.5.dat 'sh all. sh -- notest
# Eval 'cat arm. dat gcc-3.2.3-glibc-2.3.2.dat 'sh all. sh -- notest
# Eval 'cat arm. dat gcc-3.2.3-glibc-2.3.2-tls.dat 'sh all. sh -- notest
# Eval 'cat arm. dat gcc-3.3.6-glibc-2.2.2.dat 'sh all. sh -- notest
# Eval 'cat arm. dat gcc-3.3.6-glibc-2.2.5.dat 'sh all. sh -- notest
# Eval 'cat arm. dat gcc-3.3.6-glibc-2.3.2.dat 'sh all. sh -- notest
# Eval 'cat arm. dat gcc-3.3.6-glibc-2.3.2-tls.dat 'sh all. sh -- notest
# Eval 'cat arm. dat gcc-3.4.5-glibc-2.2.2.dat 'sh all. sh -- notest
# Eval 'cat arm. dat gcc-3.4.5-glibc-2.2.5.dat 'sh all. sh -- notest
# Eval 'cat arm. dat gcc-3.4.5-glibc-2.3.2.dat 'sh all. sh -- notest
# Eval 'cat arm. dat gcc-3.4.5-glibc-2.3.2-tls.dat 'sh all. sh -- notest
# Eval 'cat arm. dat gcc-3.4.5-glibc-2.3.5.dat 'sh all. sh -- notest
# Eval 'cat arm. dat gcc-3.4.5-glibc-2.3.5-tls.dat 'sh all. sh -- notest
# Eval 'cat arm. dat gcc-3.4.5-glibc-2.3.6.dat 'sh all. sh -- notest
# Eval 'cat arm. dat gcc-3.4.5-glibc-2.3.6-tls.dat 'sh all. sh -- notest
# Eval 'cat arm. dat gcc-4.0.2-glibc-2.2.2.dat 'sh all. sh -- notest
# Eval 'cat arm. dat gcc-4.0.2-glibc-2.3.2.dat 'sh all. sh -- notest
# Eval 'cat arm. dat gcc-4.0.2-glibc-2.3.2-tls.dat 'sh all. sh -- notest
# Eval 'cat arm. dat gcc-4.0.2-glibc-2.3.5.dat 'sh all. sh -- notest
# Eval 'cat arm. dat gcc-4.0.2-glibc-2.3.5-tls.dat 'sh all. sh -- notest
# Eval 'cat arm. dat gcc-4.0.2-glibc-2.3.6.dat 'sh all. sh -- notest
# Eval 'cat arm. dat gcc-4.0.2-glibc-2.3.6-tls.dat 'sh all. sh -- notest
# Eval 'cat arm. dat gcc-4.1.0-glibc-2.2.2.dat 'sh all. sh -- notest
# Eval 'cat arm. dat gcc-4.1.0-glibc-2.3.2.dat 'sh all. sh -- notest
# Eval 'cat arm. dat gcc-4.1.0-glibc-2.3.2-tls.dat 'sh all. sh -- notest # comment
Eval 'cat arm. dat gcc-3.3.2-glibc-2.3.2.dat 'sh all. sh -- notest # Add this row

Echo Done.

Modify gcc-3.3.2-glibc-2.3.2.dat
BINUTILS_DIR = binutils-2.15
GCC_DIR = gcc-3.3.2
GLIBC_DIR = glibc-2.3.2
LINUX_DIR = linux-2.6.9
GLIBCTHREADS_FILENAME = glibc-linuxthreads-2.3.2

Execute./demo-arm.sh
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.