【问题标题】:Using cross-compilation tools in kernel-build在内核构建中使用交叉编译工具
【发布时间】:2013-06-01 22:44:11
【问题描述】:

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

我的问题是:

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

【问题讨论】:

    标签: linux kernel arm cross-compiling beagleboard


    【解决方案1】:

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

    回答第二个问题 - 有两种方法:

     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 生成任务。希望对您有所帮助!

    【讨论】:

    • 谢谢,我回答了我的第一个问题,将交叉编译命名空间留空(使用本地编译工具)并开始构建内核(现在大约 30 分钟)。我会研究你提到的工具链,谢谢。
    猜你喜欢
    • 2013-12-09
    • 2017-08-11
    • 1970-01-01
    • 2016-03-02
    • 1970-01-01
    • 2018-04-25
    • 2011-03-28
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多