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