Arm cross-compiler tool to make V2

Source: Internet
Author: User
Tags gmp automake

This is an updated version of the Ubuntu arm cross-compilation tool chain authoring process.

The host environment for this article is Ubuntu10.04.4 Desktop Edition

Kernel: 2.6.32

gcc:4.4.3

---------------------------------------------------reprint Please specify: xiaobin_hlj80----

Z. Pre-preparation (using root privileges)

Installation of system patches 258 (2014-11-24)

First, the host Environment 1. Change the shell to bash

If you run

Ls-la/bin/sh

See is dash, run the following command

sudo dpkg-reconfigure Dash

Select No to remove dash

2. Change awk to Gawk

#sudo update-alternatives--config awk

3. Installing Samba

Documents to be enjoyed together

Second, the SOFTWARE environment

Installation of the following software (Apt-get install)

1. Gperf 2. Bison 3. Flex 4. Texinfo

If you do not install the error prompt: missingrequired tool:makeinfo

5. Patch 6. Libtool

If you do not install the error prompt: Couldnot find GNU libtool >= 1.5.26

7. Automake

If you do not install the error prompt: Could not find GNU automake >=1.10

8. Libncurses5-dev

If you do not install the error prompt: Could not find curses header, requiredfor the Kconfig frontends

The following is required for build

9. build-essential

g++

Ten. Libexpat-dev

Cross-gdb

The following are optional

One. CVS 12. Subversion

Svn

Zlib1g-dev.

Y. Install Crosstool-ng 1. Unzip

Tar jxvf crosstool-ng-1.19.0.tar.bz2

2. Configuration

./configure--prefix=/usr/local/ctng

3. Build

Make

4. Installation

sudo make install

X. Configure Crosstool-ng 1. Add the installation path to the system path

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

2. Create a temporary directory

# CD ~

# mkdir Toolchain-build

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

# Cd/usr/local/ctng/lib/ct-ng.1.19.0/samples

/USR/LOCAL/CTNG/LIB/CT-NG.1.19.0/SAMPLES#CP arm-unknown-linux-gnueabi/* ~/toolchain-build/

# CD ~

# CD Toolchain-build

~/toolchain-build# mv Crosstool.config. config

4. Execute menu configuration (menuconfig)

~/toolchain-build# Ct-ngmenuconfig

Modify the default options to fit the target board.

A. Paths and Misc options

1) crosstool-ng Behavior

2) Paths

3) Downloading

4) Extracting

5) Build Behavior

(2) Number of parallel jobs

6) Logging

B.target Options

Target Architecture (ARM)

1) Generic Target options

2) Target Optimizations

(1) floating point (SOFTFP (FPU))

3) Arm Other options

C.toolchain Options

1) General Toolchain options

2) Tuple Completion and aliasing

(1) SOFTFP

3) Toolchain Type

4) Build System

5) Misc Options

D.operating System

Linux kernel version (2.6.32.61)

1) Common kernel options

2) Linux Other options

E.binary Utilities

Binuary format: (ELF)

Binutils version (2.19.1a)

F.C Compiler

Ccompiler (GCC)

GCC version (4.3.2)

1) Additional Supported languages

2) GCC Other options

(1) Use System zlib

3) Optimisation Features

4) Settings for libraries running on target

5) Misc. Obscure options

G.c-library

Clibrary (GLIBC)

GLIBC Version (2.9)

H.debug Facilities

I.companion Libraries

GMP version (4.3.2)

MPFR version (2.4.2)

1) libelf version needed to build for target

Libelf version (0.8.13)

2) Companion Libraries common options

5. Download the file

Copy the larger installation file (bz2) to the $HOME/SRC (default directory).

(1) binutils-2.19.1a.tar.bz2

(2) gcc-4.3.2.tar.bz2

(3) gdb-6.8a.tar.bz2

(4) glibc-2.9.tar.bz2

(5) linux-2.6.32.61.tar.bz2

6. Build a cross-compilation environment

# Ct-ng Build

Report:

installation process

[email protected]:~/toolchain-build$ Ct-ng Build[info] performing some trivial sanity Checks[info] build started 20141130.230825[info] Building Environment Variables[extra] Preparing working Directories[extra] installing USER-SUPPL  IED crosstool-ng Configuration[extra] =================================================================[extra] Dumping internal Crosstool-ng Configuration[extra] Building a toolchain For:[extra] build = I686-pc-linux-gnu[ext RA] host = I686-pc-linux-gnu[extra] target = Arm-softfp-linux-gnueabi[extra] Dumping Internal CROSSTOOL-NG Co Nfiguration:done in 0.08s (at 00:01) [INFO] =================================================================[info] R Etrieving needed toolchain components ' tarballs[extra] retrieving ' gmp-4.3.2 ' [EXTRA] saving ' gmp-4.3.2.tar.bz2 ' to L Ocal Storage[extra] retrieving ' mpfr-2.4.2 ' [EXTRA] saving ' mpfr-2.4.2.tar.xz ' to local Storage[extra] retrieving ' libelf-0.8.13 ' [EXTRA] saving 'Libelf-0.8.13.tar.gz ' to local Storage[extra] retrieving ' glibc-ports-2.9 ' [EXTRA] saving ' glibc-ports-2.9.tar.bz2 ' t o local Storage[extra] retrieving ' dmalloc-5.5.2 ' [EXTRA] saving ' dmalloc-5.5.2.tgz ' to local Storage[extra] Retri Eving ' duma_2_5_15 ' [EXTRA] saving ' duma_2_5_15.tar.gz ' to local Storage[extra] retrieving ' ncurses-5.9 ' [ERROR] [ER        ROR] >>[error] >> Build failed in step ' retrieving needed toolchain ' tarballs ' [ERROR] >> Called in step ' (top-level) ' [ERROR] >>[error] >> ERROR happened in:do_debug_gdb_get[scripts/build/d Ebug/[email protected]][error] >> called From:do_debug_get[scripts/build/[email protected]][error ] >> called From:main[scripts/[email protected]][error] >>[error] >> for + info on t His error, look at the file: ' Build.log ' [ERROR] >> There are a list of known issues, some with workarounds, In:[err OR] >> '/usr/local/ctng/share/doc/crosstool-ng/ct-ng.1.19.0/b-known issues.txt ' [ERROR] [ERROR] (elapsed:19:34.11) [19:35]/Make : * * * [build] Error 1[email protected]:~/toolchain-build$ ct-ng Build[info] performing some trivial sanity checks[i  NFO] Build started 20141130.232953[info] Building environment Variables[extra] Preparing working Directories[extra] Installing User-supplied crosstool-ng Configuration[extra] ======================================================= ==========[extra] Dumping internal crosstool-ng Configuration[extra] Building a toolchain For:[extra] build = I6 86-pc-linux-gnu[extra] host = I686-pc-linux-gnu[extra] target = Arm-softfp-linux-gnueabi[extra] dumping Inter NAL crosstool-ng Configuration:done in 0.07s (at 00:01) [INFO] ======================================================= ==========[info] Retrieving needed toolchain components ' tarballs[extra] retrieving ' ncurses-5.9 ' [EXTRA] saving ' n Curses-5.9.tar.gz ' to local StoragE[extra] retrieving ' expat-2.1.0 ' [EXTRA] saving ' expat-2.1.0.tar.gz ' to local Storage[extra] retrieving ' ltrace_0 .5.3.orig ' [EXTRA] saving ' ltrace_0.5.3.orig.tar.gz ' to local Storage[extra] retrieving ' strace-4.5.19 ' [EXTRA] Sav  ing ' strace-4.5.19.tar.bz2 ' to local storage[info] retrieving needed toolchain "Tarballs:done in 363.91s" at 06:05) [INFO] =================================================================[info] Extracting and patching Toolchain Components[extra] extracting ' linux-2.6.32.61 ' [EXTRA] patching ' linux-2.6.32.61 ' [EXTRA] extracting ' GMP -4.3.2 ' [EXTRA] patching ' gmp-4.3.2 ' [EXTRA] extracting ' mpfr-2.4.2 ' [EXTRA] patching ' mpfr-2.4.2 ' [EXTRA] Extract ing ' libelf-0.8.13 ' [EXTRA] patching ' libelf-0.8.13 ' [EXTRA] extracting ' binutils-2.19.1a ' [EXTRA] patching ' binutil S-2.19.1a ' [EXTRA] extracting ' gcc-4.3.2 ' [EXTRA] patching ' gcc-4.3.2 ' [EXTRA] extracting ' glibc-2.9 ' [EXTRA] PatC Hing ' glibc-2.9 ' [EXTRA] EXTRACting ' glibc-ports-2.9 ' [EXTRA] patching ' glibc-ports-2.9 ' [EXTRA] extracting ' dmalloc-5.5.2 ' [EXTRA] patching ' dmal loc-5.5.2 ' [EXTRA] extracting ' duma_2_5_15 ' [EXTRA] patching ' duma-2_5_15 ' [EXTRA] extracting ' gdb-6.8a ' [EXTRA] P Atching ' gdb-6.8a ' [EXTRA] extracting ' ncurses-5.9 ' [EXTRA] patching ' ncurses-5.9 ' [EXTRA] extracting ' expat-2.1.0 ' [ EXTRA] Patching ' expat-2.1.0 ' [EXTRA] extracting ' ltrace-0.5.3 ' [EXTRA] patching ' ltrace-0.5.3 ' [EXTRA] Extractin  G ' strace-4.5.19 ' [EXTRA] patching ' strace-4.5.19 ' [INFO] extracting and patching toolchain Components:done in 122.16s (at 08:07) [INFO] =================================================================[info] installing GMP for Host[EXTRA] Confi  Guring Gmp[extra] Building Gmp[extra] installing Gmp[info] installing GMP for Host:done in 92.38s (at 09:39) [INFO ] =================================================================[info] Installing MPFR for Host[EXTRA] Configuri Ng Mpfr[extra] Building Mpfr[extra] installing Mpfr[info] installing MPFR for Host:done in 29.47s (at 10:09) [INFO] ========= ========================================================[info] Installing binutils for Host[extra] Configuring binut Ils[extra] Building Binutils[extra] installing Binutils[info] installing binutils for Host:done in 106.15s (at 11 : [INFO] =================================================================[info] Installing pass-1 core C Compiler    [EXTRA]  Configuring Gcc[extra] Building Gcc[extra] installing Gcc[info] installing pass-1 core C Compiler:done in 342.05s (at 17:37) [INFO] =================================================================[info] installing kernel Headers[EXTRA] Ins talling kernel Headers[extra] Checking installed headers[info] Installing kernel headers:done in 4.34s (at 17:42) [in FO] =================================================================[info] Installing C Library headers & start F iles[EXTRA] Configuring C Library[extra] Installing C library Headers[extra] Installing C library start Files[info] Installing C Library Headers & Start Files:done in 29.92s (at 18:11) [INFO] ======================================== =========================[info] Installing pass-2 core C Compiler[extra] Configuring Gcc[extra] Building Gcc[extra ] Installing Gcc[info] installing Pass-2 core C Compiler:done in 351.52s (at 24:03) [INFO] ======================== =========================================[info] Installing C Library[extra] Configuring C Library[EXTRA] Building C Library[extra] Installing C Library[info] Installing C library:done in 522.75s (at 32:46) [INFO] ================ =================================================[info] Installing final Compiler[extra] Configuring Gcc[EXTRA] Bu Ilding Gcc[extra] Installing Gcc[info] installing final compiler:done in 335.12s (at 38:21) [INFO] ================ =================================================[info] Installing libelf for the Target[extra] configuring Libelf[extra] Building libelf[ EXTRA] Installing Libelf[info] installing libelf for the Target:done in 4.16s (at 38:25) [INFO] =================== ==============================================[info] Installing binutils for Target[extra] configuring binutils for T Arget[extra] Building binutils ' libraries (Libiberty BFD) for Target[extra] installing binutils ' libraries (libibert Y BFD) for target[info] installing binutils for Target:done in 60.76s (at 39:26) [INFO] ============================== ===================================[info] Installing Dmalloc[extra] Configuring Dmalloc[extra] Building Dmalloc[EX TRA] Installing Dmalloc[info] installing Dmalloc:done in 6.45s (at 39:32) [INFO] ================================== ===============================[info] Installing D.u.m.a.[extra] Copying Sources[extra] Building libraries ' libdum A.A libduma.so.0.0.0 ' [EXTRA] Installing libraries ' libduma.a libduma.so.0.0.0 ' [EXTRA] installing shared library Link[extra] installing WR Apper Script[info] Installing D.U.M.A.: Done with 1.28s (at 39:34) [INFO] =============================================== ==================[info] Installing Cross-gdb[extra] Configuring Cross-gdb[extra] Building Cross-gdb[extra] Ins Talling Cross-gdb[info] Installing Cross-gdb:done in 146.34s (at 42:00) [INFO] ======================================= ==========================[info] Installing native Gdb[extra] Building static target Ncurses[extra] Building Stati C Target Expat[extra] configuring native Gdb[extra] Building native Gdb[extra] installing native Gdb[info] Inst Alling native Gdb:done in 210.00s (at 45:30) [INFO] =================================================================[ INFO] Installing Gdbserver[extra] Configuring Gdbserver[extra] Building Gdbserver[extra] Installing Gdbserver[I NFO] Installing GdbserveR:done in 5.76s (at 45:36) [INFO] =================================================================[info] Installing l Trace[extra] Copying sources to build Dir[extra] configuring Ltrace[extra] Building Ltrace[extra] installing L Trace[info] Installing Ltrace:done in 2.56s (at 45:38) [INFO] ======================================================== =========[info] Installing Strace[extra] Configuring Strace[extra] Building Strace[extra] Installing Strace[INF O] Installing Strace:done in 9.81s (at 45:48) [INFO] =================================================================  [INFO] Cleaning-up the toolchain ' s directory[info] stripping all toolchain Executables[extra] installing the populate help Er[extra] Installing a cross-ldd Helper[extra] Creating toolchain Aliases[extra] Removing access to the build sys TEM tools[info] cleaning-up the toolchain ' s Directory:done in 1.42s (at 45:50) [INFO] Build completed at 20141201.0015 43[info] (ELApsed:45:49.64) [INFO] Finishing installation (may take a few seconds) ...  [45:50]/[email protected]:~/toolchain-build$



Arm cross-compiler tool to make V2

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.