Re: Cross compiling user applications for armv7

From: Michał_Kruszewski <mkru_at_protonmail.com>
Date: Sat, 13 Sep 2025 07:20:56 UTC
Basically you are saying that I should have a separate physical arm64 machine for doing embedded armv7 development on FreeBSD.
If I understand this correctly, I just can't understand how can people say that FreeBSD is embedded friendly.
This is so much complex and convoluted compared to just using, for example, Buildroot on Linux.
This also doesn't feel like a *nix way of solving things.
I thought that after cross compiling world and kernel, there is some shell script that I can simply source to start cross-development for target platform.


Regards,
Michał Kruszewski


Sent with Proton Mail secure email.

On Saturday, September 13th, 2025 at 12:23 AM, Mark Millard <marklmi@yahoo.com> wrote:

> 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