From nobody Tue Oct 18 18:18:03 2022 X-Original-To: freebsd-arm@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4MsMYB1cdPz4f7GK for ; Tue, 18 Oct 2022 18:18:06 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4MsMYB14b7z3fyJ; Tue, 18 Oct 2022 18:18:06 +0000 (UTC) (envelope-from kp@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1666117086; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=5+NSGs1eFV3qIkt++hxTqwOspM5MIM5aXHJkkueQ244=; b=QcMcVuwZ9WV+tI6kKvm3PF4JBWQl0fYkoi9nEPK27R1kPCNqI6kgeH6xgnYYAYip1lyvuY MD0zRN6S3x03df/V2bnhdVPccKhr2VFvKzrj6bZX9uBPKjSeAgEAfKnHgX6E62lwNupsnF HS9iXSOr19nQR7bDG+PT3Y1YBuUpVeHG6uJxbZbdFNqxU89WRUVFNTdJWMrXmTAXslZl+z Oi55hBBVVf+sVa0kpnghuOohA7iuGZ8dpJ8EPQ6R8i7SXSzP1LqQ6k80Q0WnGtgEdLijgt ygggeqIGSv/zQV1pef9teI/pqkwxr/2shzlkpunUrvPhtPx4njcbRhmOm+MuOw== Received: from venus.codepro.be (venus.codepro.be [5.9.86.228]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "mx1.codepro.be", Issuer "R3" (verified OK)) (Authenticated sender: kp) by smtp.freebsd.org (Postfix) with ESMTPSA id 4MsMY96NLhz1Z9Z; Tue, 18 Oct 2022 18:18:05 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: by venus.codepro.be (Postfix, authenticated sender kp) id 143E630023; Tue, 18 Oct 2022 20:18:04 +0200 (CEST) From: Kristof Provost To: Mark Millard Cc: freebsd-arm , Brooks Davis Subject: Re: Running armv7 on aarch64 Date: Tue, 18 Oct 2022 20:18:03 +0200 X-Mailer: MailMate (1.14r5918) Message-ID: In-Reply-To: <3CA3B1F4-46CB-4C75-8451-AF2CA4E9F74B@yahoo.com> References: <3CA3B1F4-46CB-4C75-8451-AF2CA4E9F74B@yahoo.com> List-Id: Porting FreeBSD to ARM processors List-Archive: https://lists.freebsd.org/archives/freebsd-arm List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-arm@freebsd.org MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="=_MailMate_B232686B-A96C-4E90-A8C5-9FD7370DC60A_=" Content-Transfer-Encoding: 8bit ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1666117086; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=5+NSGs1eFV3qIkt++hxTqwOspM5MIM5aXHJkkueQ244=; b=kLc4iTd+veqKrkNEVIqLxR9oOWAIvreyxQeyRf1hLQbp9mi9qtIHnMx+dEHn1+veFBwcyq wYjKtrYwI1bZndQKGxnH6qmNGY55a9p+FQpwnEh4/wLE/CcV/t2i/kq9QkmiOJzBHZoFOV gQ8MlUmcqDkep2LYR8iqtLk1YXClUycomIDqSqCVvicXqgHRpsIVH8NnPUVSOUooawtfX1 BW64OFCr9a+Gqz+mXGLJ3ibLUg+zE2i9j7mG+2Mr5Yjl6+T/+j7VJU1cCWmVfqxfaF07GV PELvmHaSEX61Emk1Dfz4zZDvfQGGHJmsHBS+Z3FgEbGOKbyjuSBy5IM3YVuJ6A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1666117086; a=rsa-sha256; cv=none; b=DQS2MudZ1JVjCYA1i4jKe2dGjuVuebTN5Axf+2bB5aNLL1Q4b9QeUN1GGI8AVboXs5kJHA E/shKZni4G9e0Ou9Xy/vSvFDH8hs98cUamk8oO+5ZecdAEb9maiy7qFkTAWwgnf1qGT8L0 ZEsFbhPXna4dXu3gecZ9X50QVpsiHxayAihrGNKGQWoroKpA1SqUnvHjtPskZ8lIw55Jk/ ulnGaRrHEPtpW1bLQMhxX6AY7CP+/0zJOIhT5aa8VeyBO7kOgBwWT0k7FXXkEagU5mV9zB KQtM0cm1VWClIU4+LphsZ58mliq2UQAUrp9C/Tq64diGxra70FGdFunXA6Uc2g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N --=_MailMate_B232686B-A96C-4E90-A8C5-9FD7370DC60A_= Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 18 Oct 2022, at 19:38, Mark Millard wrote: > On 2022-Oct-18, at 09:53, Kristof Provost wrote: >> It’s not quite clear to me how this is supposed to work (now). On >> amd64 there’s a separate /libexec/ld-elf32.so.1, which we don’t >> have on aarch64. Is it supposed to be built? >> >> It’s broken on ab9293239c7d and e03b7883e97c at the very least. > > [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’s at least part of what I was missing. Long story short, I’m trying to build an armv7 image on an aarch64 machine, and having issues with poudriere. I figured I was going to simplify things by executing the armv7 binary directly (to debug), but that’s missing a few steps and had me chasing down the wrong track. I can’t chroot into that armv7 jail, I still see errors like this: (kp@freebsd_current) /usr/local/poudriere/data/.m/main-pfSense_factory_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’m looking in the correct direction now. Best regards, Kristof --=_MailMate_B232686B-A96C-4E90-A8C5-9FD7370DC60A_= Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable

On 18 Oct 2022, at 19:38, Mark Millard wrote:

On 2022-Oct-18, at 09:53, Kristof P= rovost <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 t= he very least.

[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 mac= hine, and having issues with poudriere. I figured I was going to simplify= things by executing 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 this:

(k=
p@freebsd_current)  /usr/local/poudriere/data/.m/main-pfSense_factory_por=
ts_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 d= irection now.

Best regards,
Kristof

--=_MailMate_B232686B-A96C-4E90-A8C5-9FD7370DC60A_=--