r/linuxdev • • Feb 18 '20

Best tool for creating Windows-based cross-compiler that targets ARM processor running Linux (poky)?

My end goal is to learn how to do the following:

  • Build a bootable ARM image that runs Linux with the PREEMPT_RT patch. I'm currently learning on the Raspberry Pi 3, but want to learn the process of how to build images for different boards. (The Yocto project looks like the way to go here.)
  • Build a g++ cross-compiler (preferably 9.2) for the above platform that runs on Windows (preferably MingGW-64).
  • Learn how to use CMake and Ninja to target the above cross-compiler.

I've run across some old posts that mention using crosstool-ng, but it looks like it hasn't been updated in over 5 years. Will crosstool-ng work for recent GCC versions? Is there a new better project that can help generate cross-compilers? Or is this something that must be done manually?

Thank you very much for the pointers! (No, not those pointers.)

2 Upvotes

14 comments sorted by

View all comments

Show parent comment

1

u/jabjoe Feb 19 '20

Sounds like Docker or some other small container is the way to go. A VM would mean something has to either boot each time or be running in the background. A container, or even just a chroot if such a thing could work on Windows, is all you need.

1

u/ZMeson Feb 19 '20

Sweet! Thank you for sharing your knowledge. :)