你是對的,你需要一個適當的MIPS工具鏈交叉編譯應用程序和Buildroot能做到這一點。但你可能需要調整buildroot的menuconfig選項。 根據file
的輸出,您的選項可能會更改。在我的系統,二進制應用程序通知如下:
ELF 32-bit MSB executable, MIPS, MIPS32 rel2 version 1 (SYSV)
這是我爲我的Buildroot裏面的menuconfig的啓用的選項:
Target Architecture (mips) --->
Target Architecture Variant (mips 32r2) --->
Target ABI (o32) --->
Target options --->
Build options --->
(/opt/cross-mips-buildroot) Toolchain and header file location?
Toolchain --->
Toolchain type (Buildroot toolchain) --->
Kernel Headers (Linux 2.6.34.x kernel headers) --->
uClibc C library Version (uClibc 0.9.31.x) --->
[*] Build/install a shared libgcc?
[*] Enable compiler tls support
[*] Build gdb debugger for the Target
[*] Build gdb server for the Target
[*] Build gdb for the Host
GDB debugger Version (gdb 6.8) --->
[*] Enable large file (files > 2 GB) support?
[*] Enable WCHAR support
[*] Use software floating point by default
[*] Enable stack protection support
[*] Build/install c++ compiler and libstdc++?
[*] Include target utils in cross toolchain
Package Selection for the target --->
[*] BusyBox
[*] Run BusyBox's own full installation
Libraries --->
Networking --->
[*] libcurl
Text and terminal handling --->
[*] icu
-*- ncurses
Target filesystem options --->
Bootloaders --->
Kernel --->
本身安裝在工具鏈的/ opt /交叉mips-buildroot。你可以找到/選擇/交叉MIPS-buildroot的在/ usr/bin中/
嘗試編譯器和其他工具來編譯一個簡單的的Hello World應用程序,看看你是否能在MIPS系統內部運行它。
注意:此配置不會構建C++編譯器。如果您需要它,您可以grep LIBSTDCPP .config
並檢查它是否啓用並將其更改爲您喜歡的。然後make menuconfig
使它發生。
找到MIPS系統和exec ** **文件在其上的任何二進制應用程序和與我們共享的輸出 – karlphillip 2011-01-20 20:09:35
好了,文件的輸出用於從所述系統可執行的是: ELF 32位LSB的可執行,MIPS,MIPS-I版本1(SYSV),動態鏈接(使用共享庫),剝離 感謝您的所有幫助。 – sagenite 2011-01-20 22:11:28