Re: Cross compiling user applications for armv7

From: Michał_Kruszewski <mkru_at_protonmail.com>
Date: Tue, 23 Sep 2025 07:39:17 UTC
I have been experimenting with FreeBSD for embedded for some time and here are my thoughts.
I am going to make a direct comparison with Linux, because I have a few years experience, and I believe I know what people expect, or at least what I expect.

1. FreeBSD is known to be famous of a good documentation.
Well, to be honest, I didn't feel that.
There is missing documentation everywhere.
build(7), for example, does not document 'distribution' or 'distrib-dirs' targets.
poudriere man pages claim that it is possible to cross build packages as non root.
I have tried in multiple ways, and I think it is simply _not_ possible.
When I tried to contact people responsible for documentation, I got no reply.
Linux is not better in this area, but I expected more based on what people claim in the Internet.

2. No way to cross-compile target system with newer version than the host system.
I don't want to run unstable host to utilize the newest system for the target platform.
You can build newer kernel and world, but not packages.
For me, someone who comes from embedded world, the way poudriere is designed is just a broken concept.
I tried to come around this using the buildenv, but it doesn't work.
See point 7.
In Linux this is not a problem at all.

3. No way to build and distribute FreeBSD without root privileges.
For arm64, even the install targets don't work with NO_ROOT=YES.
I must be able to do this if I want to show FreeBSD as a Linux alternative to students during practice classes.
With Linux, you can do this.
What is more, this is even how things work by default.

4. The process of cross-building packages for armv7 is broken for months.
It simply freezes at the end.
This means that probably no one uses it.

5. No support for Mali GPU.
There is generally less support for various drivers.
This is usually not a big deal, as you can write drivers for most of the devices on your own.
However, in terms of GPU, it is too complex and time-consuming task.

6. Cross build of packages is _slow_.
Moreover, this is inherent because of the way it was designed.
Cross building packages on FreeBSD is a few times slower than on Linux.

7. No way to cross compile ports using buildenv.
Yesterday, I tried to cross compile packages using buildenv.
Why?
Because I thought that if building a package does not require running any code on a target architecture, then it should be possible.
It turned out I was wrong, you can't do that.
This is clearly a design flaw of how ports/packages work.

8. No CUDA support.

I feel like the only selling point for FreeBSD in embedded, compared to Linux, is simplicity and consistency as it is a whole system not just a kernel.
If you are going to build an embedded router, then probably you can accept the above disadvantages.
However, if you are going to implement something not network related, be prepared to hassle.

Regards,
Michał