本文介绍了十字从Linux编译到ARM-ELF(ARM926EJ-S / MT7108)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经安装了所有的交叉编译我的Ubuntu系统上的软件包,到目前为止,但我有一个
的问题,需要一些帮助。

I have installed all cross compile packages on my ubuntu system so far but am having aproblem and need some help.

Processor       : ARM926EJ-S rev 5 (v5l)
BogoMIPS        : 184.72
Features        : swp half thumb fastmult edsp java
CPU implementer : 0x41
CPU architecture: 5TEJ
CPU variant     : 0x0
CPU part        : 0x926
CPU revision    : 5
Cache type      : write-back
Cache clean     : cp15 c7 ops
Cache lockdown  : format C
Cache format    : Harvard
I size          : 32768
I assoc         : 4
I line length   : 32
I sets          : 256
D size          : 32768
D assoc         : 4
D line length   : 32
D sets          : 256

Hardware        : MT7108
Revision        : 0000
Serial          : 0000000000000000

这是目标机器,我需要交叉编译的。什么标志应该我
编译时使用?任何帮助将大大AP preciated ..谢谢
前进。

This is the target machine I need to cross compile for. What flags should Iuse when compiling? Any help would be greatly appreciated.. Thanks inadvance.

推荐答案

容易缓存搜索手臂| grep的^ GCC - 给出了下面的列表中,

apt-cache search arm | grep ^gcc- gives the following list,


  1. GCC-4.7-aarch64-Linux的GNU - GNU C编译器

  2. GCC-4.7-臂Linux的gnueabi - GNU C编译器

  3. GCC-4.7-臂Linux的gnueabi基 - GCC,GNU编译器集(基本包)

  4. GCC-4.7-臂Linux的gnueabihf - GNU C编译器

  5. GCC-4.7-臂Linux的gnueabihf基 - GCC,GNU编译器集(基本包)

  6. GCC-4.7-multilib的臂-Linux的gnueabi - GNU C编译器(multilib的文件)

  7. GCC-4.7-multilib的臂-Linux的gnueabihf - GNU C编译器(multilib的文件)

  8. GCC-aarch64-Linux的GNU - GNU C编译器的arm64架构

  9. GCC-ARM的Linux的gnueabi - GNU C编译器阿梅尔架构

  10. GCC-ARM的Linux的gnueabihf - GNU C编译器的armhf架构

您应该安装的 GCC-ARM的Linux的gnueabi 的这是一个别名的 GCC-4.7-臂Linux的gnueabi 的。 GCC-4.7 multilib的臂-Linux的gnueabi 的也是可能的,但更加复杂。使用标志, -march =的ARMv5TE -mtune = ARM926EJ-S -msoft浮动-mfloat-ABI =软。您可以通过指定做更多的调整 - PARAM NAME = VALUE 选项 GCC 与调整你的系统参数内存子系统的时间。

You should install gcc-arm-linux-gnueabi which is an alias for gcc-4.7-arm-linux-gnueabi. gcc-4.7-multilib-arm-linux-gnueabi is also possible, but more complicated. Use the flags, -march=armv5te -mtune=arm926ej-s -msoft-float -mfloat-abi=soft. You can do more tuning by specifying the --param NAME=VALUE option to gcc with parameters tuned to your systems memory sub-system timing.

您可能无法使用这些 GCC 版本作为您的的Linux 的可能编译 OABI 和/或相比所述一个编译器被用于建造是相当古老的。在某些情况下,的的libc 的将调用一个新的的Linux API 的,这可能不是present。如果编译器/ libc中没有配置是向下兼容的,那么它可能无法与您的系统工作。您可以使用的创建是建立以满足您的系统定制的编译器,但是这是更复杂的。

You may not be able to use these gcc versions as your Linux maybe compiled with OABI and/or be quite ancient compared to the one the compiler was built for. In some cases, the libc will call a newer Linux API, which may not be present. If the compiler/libc was not configured to be backwards compatible, then it may not work with your system. You can use crosstool-ng to create a custom compiler that is built to suit your system, but this is much more complex.

这篇关于十字从Linux编译到ARM-ELF(ARM926EJ-S / MT7108)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

11-01 06:26