Re: problems on FreeBSD14 on armv6 board (RPI1-B)

From: Mark Millard <marklmi_at_yahoo.com>
Date: Mon, 18 Dec 2023 00:41:36 UTC
On Dec 17, 2023, at 11:52, Alex Samorukov <samm@freebsd.org> wrote:

> On 2023/12/17 19:20, Mark Millard wrote:
> root sort of support for armv6, not
>> lib32 support.
>> The FreeBSD build servers ( ampere[1-3] ) are not booted with
>> such special kernels (or worlds). But they do build armv7 on
>> arm64. armv7 also used to be built via qemu on amd64 and had
>> the same sorts of problems back then that armv6 still has.
>> If you read my other notes in:
>> https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=256132
>> be aware that some later notes correct my errors in my earlier
>> notes, making for a messy read.
> 
> Thank you for reply. I had (possibly wrong) the impression that armv7 CPU is compatible with instructions.

But armv6 is not compatible with all armv7 instructions. The issue
would be more of making sure armv7 specifics are not put to use so
that the result is fully armv6 compatible.

> At least i can perfectly run armv6 binaries (e.g. rpi1 chroot) on armv7, despite the fact that it is "kern.supported_archs: aarch64 armv7". Also i was using this VM for a long time, just to build packages I am using for my old rpi1 (domoticz, ebusd, fresh libraries, etc). Now I am running full bulk and it seems to work fine.  I did a small patch to poudrier to make it possible [1], but it seems that upstream does not care about patches anymore.
> 
> Regarding bug 256132 - so far i cant find that it impacting my builds at all - binaries are running well.

Is all that testing only on an armv6-only processor? Testing on armv7
or aarch64-that-supports-armv7 would execute code that armv6 would
not.

> I could assume that some configure scripts could try to check (and enable) some flags for armv7 while building, but I think the chances are very low and it could be handled on ad-hoc basis.

What have you done to avoid armv7 specific defaults from being used,
instead causing armv6 defaults?

> Please correct me if i am missing something. Thank you, Oleksij

I'll note that I've never done such "armv6-only processor" testing.
I'll not have access to any FreeBSD arm6, arm7, or aarch64 contexts
until after something like 2024-Jan-01.

> [1] https://github.com/freebsd/poudriere/pull/1063
> 


===
Mark Millard
marklmi at yahoo.com