2013-06-06 55 views
2

我正在構建beagleboard-xm上的linux內核(在this tutorial之後 - 我在步驟10中)。我一直需要大量的交叉編譯工具,前綴爲arm-linux-gnueabi。我唯一能夠安裝的是arm-linux-gnueabi-gcc,現在我需要arm-linux-gnueabi-ld在內核構建中使用交叉編譯工具

我的問題是:

  • 我需要使用交叉編譯工具,這樣,如果我建立這將是運行在同一臺計算機上的內核?
  • 如何安裝這些交叉編譯工具?我一直在瘋狂搜索arm-linux-gnueabi,結果很少。

回答

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生成任務。希望它會有幫助!

+0

謝謝,我通過將交叉編譯命名空間留空(使用本地編譯工具)並開始構建內核(現在大約30分鐘)來回答我的第一個問題。我會研究你提到的工具鏈,謝謝。 – tay10r

相關問題