UbuntuARM cross-compilation tool chain creation process

Source: Internet
Author: User
In this article, the host environment is Ubuntu10.04.4 desktop kernel: 2.6.32GCC: 4.4.3Z. preparations (use root permission) I. Install system patch 1. install and update 189 () II. Network 1. install ssh, apt-getinstallssh & n

The host environment in this article is Ubuntu 10.04.4 Desktop

Kernel: 2.6.32

GCC: 4.4.3

Z. Preparations (use root permission)

1. Install System Patches

1. Install and update 189)

Ii. Network

1. install ssh, apt-get install ssh

Remote Control

2. Install samba

File Sharing

Iii. Software Environment

Install the following software (apt-get install)

1. bison

2. flex

3. libncurses5-dev

4. build-essential (g ++)

5. gperf

6. texinfo

7. automake

8. libtool

9. gawk

Update-alternatives-config awk

10. cvs

11. subversion (svn)

Zlib1g-dev

13. libexpat-dev (cross-gdb)

 

Y. Install crosstool-ng

1. Extract

# Tar jxvf crosstool-ng-1.16.0.tar.bz2

2. Configuration

#./Configure -- prefix =/usr/local/ctng

3. Generate

# Make

4. Installation

# Make install

 

X. Configure crosstool-ng

1. Add the installation path to the system path.

Export PATH = $ PATH:/usr/local/ctng/bin

2. Create a temporary directory

# Cd ~

Root @ xiaobin-pc :~ # Mkdir toolchain-build

 

3. Copy the pre-configuration file to the temporary directory.

Root @ xiaobin-pc: // # cd/usr/local/ctng/lib/ct-ng.1.16.0/samples

Root @ xiaobin-pc:/usr/local/ctng/lib/ct-ng.1.16.0/samples # cp arm-unknown-linux-gnueabi /*~ /Toolchain-build/

# Cd ~

Root @ xiaobin-pc :~ # Cd crosstool-build

Root @ xiaobin-pc :~ /Toolchain-build # mvcrosstool. config. config

4. Execute the menu configuration (menuconfig)

This step modifies the default options to adapt to our target board.

(1) Change shell to bash

If you run

# Ls-la/bin/sh

If the link is dash, run the following command:

Sudo dpkg-reconfigure dash

Select no to delete dash

 

(2) root @ xiaobin-pc :~ /Toolchain-build # ct-ng menuconfig

A. Paths and misc options

1) crosstool-NG behavior

Default

2) Paths

Default

3) Downloading

Default

4) Extracting

Default

5) Build behavior

(2) Number of parallel jobs

6) Logging

Default

B. Target options

Target Architecture (arm)

1) Generic target options

2) Target optimizations

3) arm other options

C. Toolchain options

1) General toolchain options

2) Tuple completion and aliasing

3) Toolchain type

4) Build system

5) Misc options

 

D. Operating System

Linux kernel version (2.6.32.59)

1) Common kernel options

2) linux other options

E. Binary utilities

Binuary format: (ELF)

1) GNU binutils

Binutils version(2.19.1a)

2) elf2flt

F. C compiler

C compiler (gcc)

Gcc version (4.4.3)

1) Additional supported ages

2) gcc other options

3) Optimisation features

4) Settings for libraries running on target

5) Misc. obscure options

 

G. C-library

C library (glibc)

Glibc version (2.9)

 

H. Debug facilities

 

I. Companion libraries

GMP version (4.3.2)

MPFR version (2.4.2)

PPL version (0.10.2)

CLooG/ppl version (0.15.9)

 

1) libelf version needed to build for target

Libelf version (0.8.13)

2) Companion libraries common options

J. Companion tools

K. Test suite

 

5. Download an object

In this step, we use the download tool to download the file (bz2) and copy it to $ HOME/src (default directory.

(1) linux-2.6.32.59.tar.bz2

(2) gcc-4.4.3.tar.bz2

(3) binutils-2.19.1a.tar.bz2

(4) mpfr-2.4.2.tar.bz2

(5) gmp-4.3.2.tar.bz2

Ppl-0.10.2.tar.bz2

Gdb-6.8a.tar.bz2

Expat-2.0.1.tar.gz

Strace-4.5.19.tar.bz2

(10) cloog-ppl-0.15.9.tar.gz

Dmalloc-5.5.2.tgz

Libelf-0.8.13

Duma-2_5_15

(14) ltrace_0.5.3.orig.tar.gz

(152.16ncurses-5.9.tar.gz

Elf2flt-cvs-head.tar.gz

(17w.glibc-2.9.tar.bz2

(18.0glibc-ports-2.9.tar.bz2

 

6. Generate a cross-compilation environment

Root @ xiaobin-pc :~ /Toolchain-build # ct-ngbuild

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.