Quantcast
Viewing all articles
Browse latest Browse all 4854

C/C++ • Re: Best Practices for Cross Compiling to Raspberry Pi 5 from WSL2 Ubuntu?

Hello
Anyone cross-compiling to the Rasberry Pi 5?

What's the current state of the art to cross compile binaries from AMD64/Ubuntu/WSL2 to the Raspberry Pi 5?

Is it chroot? Docker images? Something else?

I just did a chroot setup and the process was pretty rough. I wonder if there is something better that people are using. I can see some options being discussed in this thread https://news.ycombinator.com/item?id=34762779, but I'm not sure what others are doing.

Thanks!
I'm my opinion the Pi 4 is fast enough that cross compiling is more trouble than it's worth and the Pi 5 is twice faster.

Having said that I've used chroot environments on faster ARM machines to build binaries for the Raspberry Pi, especially ARMv6 binaries. Since this is not really cross compiling, it doesn't have the difficulty of needing you distinguish between the cross complier and native tools.

One could do something similar with user mode QEMU to allow an ARM chroot to run on an x86 system. Given how fast the Pi 5 is, QEMU would generally be slower.

Statistics: Posted by ejolson — Tue Jan 23, 2024 7:05 am



Viewing all articles
Browse latest Browse all 4854

Trending Articles