Date: Wed, 19 Oct 2022 10:58:03 +0200 From: Kristof Provost <kp@FreeBSD.org> To: Mark Millard <marklmi@yahoo.com> Cc: freebsd-arm <freebsd-arm@freebsd.org>, Brooks Davis <brooks@freebsd.org> Subject: Re: Running armv7 on aarch64 Message-ID: <D530FC71-847A-4BCB-8FD1-FBA617ED6E1B@FreeBSD.org> In-Reply-To: <DD4575CF-3F12-44D2-8B4B-644FC60C20A4@FreeBSD.org> References: <E67F7119-13B2-4166-BE22-D3A89E522E7E@FreeBSD.org> <3CA3B1F4-46CB-4C75-8451-AF2CA4E9F74B@yahoo.com> <DD4575CF-3F12-44D2-8B4B-644FC60C20A4@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On 18 Oct 2022, at 20:18, Kristof Provost wrote: > On 18 Oct 2022, at 19:38, Mark Millard wrote: >> On 2022-Oct-18, at 09:53, Kristof Provost <kp@FreeBSD.org> wrote: >>> It=E2=80=99s not quite clear to me how this is supposed to work (now)= =2E On amd64 there=E2=80=99s a separate /libexec/ld-elf32.so.1, which we = don=E2=80=99t have on aarch64. Is it supposed to be built? >>> >>> It=E2=80=99s broken on ab9293239c7d and e03b7883e97c at the very leas= t. >> >> [I'm ignoring qemu, which I do not use. The below is from >> a Cortex-A72 aarch64 context that can execute Cortex-A7 >> armv7 code as well. Have you been using qemu?] >> >> Historically I've only been able to execute armv7 FreeBSD >> code on aarch64 FreeBSD via using the likes of, say, >> chroot'ing into an installed armv7 world in a directory >> tree that I created for such. (I manually split some >> liong-lineouptut for readabilty.) >> > Thanks for that! > > That=E2=80=99s at least part of what I was missing. Long story short, I= =E2=80=99m trying to build an armv7 image on an aarch64 machine, and havi= ng issues with poudriere. I figured I was going to simplify things by exe= cuting the armv7 binary directly (to debug), but that=E2=80=99s missing a= few steps and had me chasing down the wrong track. > > I can=E2=80=99t chroot into that armv7 jail, I still see errors like th= is: > > (kp@freebsd_current) /usr/local/poudriere/data/.m/main-pfSense_fac= tory_ports_plus_devel/ref % sudo chroot . > ELF binary type "9" not known. > ELF binary type "9" not known. > chroot: /bin/sh: Exec format error > > But at least I think I=E2=80=99m looking in the correct direction now. > For those playing along at home, I believe I now understand why the above= doesn=E2=80=99t work. This is a VMWare Fusion VM (preview of 09/22), and it appears to no longe= r support 32-bit arm. FreeBSD refuses to start a 32-bit arm binary due to the check in elf32_ar= m_abi_supported(). It reads the id_aa64pfr0_el1 special register, which d= oesn=E2=80=99t indicate 32-bit support. It lists 0x1101000011111111 as a = value now. Simply removing the check allows the 32-bit binary to execute, but that c= rashes the VM, so isn=E2=80=99t very useful. Best regards, Kristof
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?D530FC71-847A-4BCB-8FD1-FBA617ED6E1B>