Re: Cross compiling user applications for armv7
Date: Fri, 12 Sep 2025 22:23:22 UTC
On Sep 12, 2025, at 14:10, Michał Kruszewski <mkru@protonmail.com> wrote: > A simple way is to set up an armv7 chroot / jail on an arm64 host such as a Raspberry Pi (Apple devices don't work!). > Then it's just like a native environment, but usually much faster. > I don't have physical arm64 host. > I also don't want to create a VM. > The whole idea seems weird and unnatural. Ignoring the RPi4B detail: FreeBSD official armv7 port-packages are built this way on arm64 hardware that natively supports user-space armv7 code. (ampere* systems are used.) FreeBSD official i386 port-packages are built this way on amd64 hardware that natively supports user-space i386 code. No use of qemu variants of any kind: no attempt at non-native-capable host environments. (Back when amd64 and qemu was used for the likes of armv7, lots of stuff failed to build mcuh of the time over the years --stuff that builds just fine now. This was abandoned after native became available. armv6 was always qemu based on amd64 and could not build much as of the last time a build was run.) > It sounds more like an exotic workaround. It is the official technique used for what FreeBSD distributes for armv7 port-packages. > Regards, > Michał Kruszewski > > > Sent with Proton Mail secure email. > > On Friday, September 12th, 2025 at 10:46 PM, Robert Clausecker <fuz@fuz.su> wrote: > >> Hi Michał, >> >> A simple way is to set up an armv7 chroot / jail on an arm64 host such as >> a Raspberry Pi (Apple devices don't work!). Then it's just like a native >> environment, but usually much faster. >> >> Yours, >> Robert Clausecker >> >> Am Fri, Sep 12, 2025 at 04:19:42PM +0000 schrieb Michał Kruszewski: >> >>> Is there any tutorial on how to cross compile custom user application for armv7? >>> I struggle t find any. >>> Cross compiling the system is pretty easy. >>> However, how can one cross compile custom user application or kernel drivers. >>> >>> Regards, >>> Michał Kruszewski >>> >>> Sent with Proton Mail secure email. >> >> >> -- >> () ascii ribbon campaign - for an encoding-agnostic world >> /\ - against html email - against proprietary attachments > > === Mark Millard marklmi at yahoo.com