系统相关
首页 > 系统相关> > linux-在内核构建中使用交叉编译工具

linux-在内核构建中使用交叉编译工具

作者:互联网

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

我的问题是:

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

解决方法:

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

回答第二个问题-您可以通过两种方式做到这一点:

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

标签:beagleboard,arm,kernel,cross-compiling,linux
来源: https://codeday.me/bug/20191123/2065775.html