Build MIPS cross-compilation environment __linux under Linux Linux

Source: Internet
Author: User
Tags bz2

Build MIPS cross-compiling environment under Ubuntu


Cost Dickens, finally put MIPS cross compilation environment built. Next share this article with you, the method inside is I personally tried, absolutely easy to use. Thank you for the blogger who wrote this article.



MIPS is a RISC processor architecture, similar to the x86,arm and so on, today we introduce how to build MIPS under Ubuntu Cross-compilation environment:



1. Download:

Download BuildRoot in http://buildroot.uclibc.org/downloads/snapshots/buildroot-snapshot.tar.bz2:

TAR-JXVF buildroot-snapshot.tar.bz2
CD BuildRoot



2. Configure BuildRoot:

Make Clean

Make menuconfig

A menu selection interface similar to the compiled Linux appears, as shown in the following figure:




Select the first "Target architecture" and Change to MIPS (little endian), as shown below:



In addition, choose "toolchain", be sure to change the "Kernel Headers" Linux version to your own host Linux version (because we compiled the MIPS crossover tool is required to run on our host), The following figure, my host is Ubuntu 11.04, Linux version is 2.6.38-8:






3. Compile:

Attention:

1. The compilation process must be networked , because download some of the compressed packets stored in the BUILDROOT/DL folder, such as Binutils, GCC and so on. The following figure:



2. Must be installed in advance Bison, Flex, Texinfo, ncurses , such as my first compilation, the following error occurred, because I did not install Texinfo:

sudo apt-get install texinfo is OK:


After that is a long wait, almost 1 hours ...




4.

After the compilation is complete, an output folder is added to the BuildRoot folder, which is the compiled file:

CD Buildroot/output/host/usr/bin

We found that the MIPS ' cross compilation tool has been generated ~ ~:





5.

In addition, under the buildroot/output/target folder, we found that this is the Linux 2.6.36-8 version of the BusyBox we chose before. The following figure:



We use the file command to view one of the executables, as follows:



We see that the generated file is really a MIPS platform, under my x86 is not able to run.




6.

For later convenience, we add the Bin folder directly to the environment variable, which saves us from entering a long path in the future.

Add the path to the ~/.BASHRC file, and then run the source command:

Source ~/.BASHRC

Specific please refer to: http://blog.csdn.net/xiaoguaihai/article/details/8766448



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.