第一个问题的答案是 - 不需要交叉编译工具,如果您要在运行它的同一台计算机上构建内核。主机编译器工具链将为您完成这项工作。
回答第二个问题 - 两种方法可以做到这一点:
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分钟)来回答我的第一个问题。我会研究你提到的工具链,谢谢。 – tay10r