3

我正在 beagleboard-xm 上构建 linux 内核(遵循本教程- 我在第 10 步)。我一直需要很多带有前缀的交叉编译工具arm-linux-gnueabi。我唯一能够安装的是arm-linux-gnueabi-gcc,现在我需要arm-linux-gnueabi-ld

我的问题是:

  • 如果我在将要运行的同一台计算机上构建内核,是否需要使用这样的交叉编译工具?
  • 如何安装这些交叉编译工具?我疯狂地arm-linux-gnueabi用谷歌搜索了很少的结果。
4

1 回答 1

3

对您的第一个问题的回答是 - 不。如果您在将运行内核的同一台计算机上构建内核,则不需要交叉编译工具。主机编译器工具链将为您完成工作。

回答第二个问题 - 有两种方法可以做到:

 a) using existing cross compilation tools (already build), you can download it via Software Center of any popular distro like Fedora, Ubuntu. Cross compilation will be prefixed with platform name i.e if you need arm tool chains it will be something like arm-linux-gnueabi-gcc.

 b) You can build your own cross compilation tool chains from the source of GCC. It's quite difficult and time consuming stuff.

但是,您可以避免上述所有步骤,并且可以使用 buildroot、openembedded 等工具。这将为您简化所有任务并帮助您为您构建一个漂亮的嵌入式内核。这些工具为您完成了所有与交叉编译相关的工具链构建、内核构建、rootfs 生成任务。希望它会有所帮助!

于 2013-06-06T04:16:58.767 回答