Ubuntu10.04 install the Cross Compiler

Source: Internet
Author: User
Development Environment: Ubuntu10.04, linux-2.6.26.5 development steps: 1. Install and download possible software packages. Sudoapt-getinstallbisonflexbuild-essentialpatchlibncurese5-dev // libncurese5-dev in 10.04 seems apt-get cannot be found, but the newest can also see the deb of these software reported

Development Environment: Ubuntu 10.04, linux-2.6.26.5

Development steps:

1. Install and download software packages that may be used.

Sudo apt-get install bison flex build-essential patch libncurese5-dev

// Libncurese5-dev in 10.04 seems apt-get cannot be found, but the new force can see

You can also report the deb of these software, and then sudo dpkg-I *. deb

2. downgrade the gcc version.

Ubuntu's default gcc is 4.4, and version height is also a problem (this is really speechless, really terrible) but does not need to uninstall 4.4, because the gcc we input in the terminal is just a soft connection to the gcc-4.4, point this soft connection to 4.1. Two methods:

(A). Install apt-get directly.

Sudo apt-get install gcc-4.1

Gcc is overwritten after installation, pointing to the gcc-4.1.

(B) download the software package

Gcc-4.1_4.1.2-23Ubuntu3_i386.deb

Gcc-4.1-base_4.1.2-23Ubuntu3_i386.deb

Cpp-4.1_4.1.2-23Ubuntu3_i386.deb

Then install sudo dpkg-I *. deb

Modify the soft connection after installation

Sudo rm/usr/bin/gcc

Sudo ln-s/usr/bin/gcc-4.1/usr/bin/gcc

3. Modify the sh version

Run: ls-la/bin/sh

The link to/bin/sh is dash. Run the following command:

Sudo dpkg-reconfigure dash

Select no to delete dash

You can run ls-la/bin/sh again to see that it now points to bash. Don't think it's dash ~

4. Create the installation folders crosstool and downloads, preferably in/home/lnux. Do not move them once they are created.

Mkdir/home/linux/downloads, and input crosstoll-0.43.tar.gz. In addition, there are other source code packages to be used below. If not, the packages will be automatically downloaded below.

5. Unzip the crosstool-0.43.

Cd/home/linux/downloads

Tar-zxvf crosstool-0.43.tar.gz

Cd crosstool-0.43

There are many scripts and configuration files in this directory, and each supported processor has corresponding scripts. The demo-arm-softfloat.sh we choose now is to build an arm cross-compilation toolchain that supports soft floating points

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.