在kernel-build中使用交叉编译工具

时间:2013-06-06 03:46:38

标签: linux kernel arm cross-compiling beagleboard

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

我的问题是:

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

1 个答案:

答案 0 :(得分: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生成任务。希望它会有所帮助!