From nobody Tue Oct 18 18:36:40 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 4MsMyn5XFRz4fB7q for ; Tue, 18 Oct 2022 18:36:49 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic310-21.consmr.mail.gq1.yahoo.com (sonic310-21.consmr.mail.gq1.yahoo.com [98.137.69.147]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4MsMym3Xz8z3kFv for ; Tue, 18 Oct 2022 18:36:48 +0000 (UTC) (envelope-from marklmi@yahoo.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1666118206; bh=e+CXlWzI/6Y5In8Ju4wQpIi1iowZMA8lPhfcinjrV1c=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From:Subject:Reply-To; b=NpuPMtXDckdmrl3ELRM0EYH6799sPOLLOK9WYZW7JgnoqCiWNwHgt5slmSMQe9FpzTBtRq/YgzpsZdP1zwJYVNjtmcdp15oP/HJ7FATDnQDG/k42Js8eqylXB65L7SeN/GOyxl+eAvfTHfrolNHMpgazeWwaOKd4inEQEM63hMshM5lsh5HwAsJlSX5HFbyxEIZLTvGBtU2M6uI3DVKZ8yb7r6CRMfAXRzgdg0AoXxn18yCapsQ6GRzSYMS6353ZcaefH7owGYXG6Yhck1xAaydSZ/m3X2dT22D9GzFhf1mHZ7PGAfyap4WMpTLoQRychj3SZbJ0LVG610Lx29rjsQ== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1666118206; bh=gUfIjKnZ+oeixN+5zQvzlsVSa/uC2EVldcmpHpe1T0w=; h=X-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kWpNTnKLJ86llREPPIYnMoBofR1JL_IS gMQfA0X9lARoF5BOVswO7pBTxecRxQC9rxHNjYMVQ2XjkLrnHKXPFo2fyqJrFyas9a8TssdTD7zX pIx.g5H4wjxRNcYaEwasIgOC4iPmv92U0Apt_PA4tSzD9CcctNsUOQGa73cS9wHPu.cIWdkZpAjL s2Axks5CGV4FrpLmSGKjXOfcYvHjDwpeqAFpjSW6nTenIIcySYsCafgDQV2QR21alhrL1FzlCPfO 549MiGaigXLGXCtEbnwFZspWFgs4dtoSsrqwrc.hA6TjEsEIkJB9aPS280Vh55GKBUNH9g.glB9P wPZMpsFCmWIKQgxUiX6EhehuTc61rTcYx84z8ZkXilACJw_QoC5v3RNlV1oq1QL47V96ipFg.jBv bnwSUbnQn_0UWMvPzHhbT.bhdpTiyqG1wSu4jfqntgxCoWYSICrwuZ3dVVq2NFXP28NLv.xtefhP gC1mfEC2PnVOUcio0CW9xSLsqaCBVLdBt79I_iJXr8w64aiwFXFrJi7EpGR4jQycjlIe617go8Ma drLI- X-Sonic-MF: Received: from sonic.gate.mail.ne1.yahoo.com by sonic310.consmr.mail.gq1.yahoo.com with HTTP; Tue, 18 Oct 2022 18:36:46 +0000 Received: by hermes--production-gq1-75cfcccdb-kcc9l (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID d6618b0693f89704dc1251b10e8e5879; Tue, 18 Oct 2022 18:36:41 +0000 (UTC) Content-Type: text/plain; charset=utf-8 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 (Mac OS X Mail 16.0 \(3696.120.41.1.1\)) Subject: Re: Running armv7 on aarch64 From: Mark Millard In-Reply-To: Date: Tue, 18 Oct 2022 11:36:40 -0700 Cc: freebsd-arm , Brooks Davis Content-Transfer-Encoding: quoted-printable Message-Id: <8C629ACD-5BDD-490C-B036-3889BECA6D54@yahoo.com> References: <3CA3B1F4-46CB-4C75-8451-AF2CA4E9F74B@yahoo.com> To: Kristof Provost X-Mailer: Apple Mail (2.3696.120.41.1.1) X-Rspamd-Queue-Id: 4MsMym3Xz8z3kFv X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=yahoo.com header.s=s2048 header.b=NpuPMtXD; dmarc=pass (policy=reject) header.from=yahoo.com; spf=pass (mx1.freebsd.org: domain of marklmi@yahoo.com designates 98.137.69.147 as permitted sender) smtp.mailfrom=marklmi@yahoo.com X-Spamd-Result: default: False [-3.47 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.97)[-0.968]; DMARC_POLICY_ALLOW(-0.50)[yahoo.com,reject]; MV_CASE(0.50)[]; R_DKIM_ALLOW(-0.20)[yahoo.com:s=s2048]; R_SPF_ALLOW(-0.20)[+ptr:yahoo.com]; MIME_GOOD(-0.10)[text/plain]; ARC_NA(0.00)[]; FROM_HAS_DN(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; DWL_DNSWL_NONE(0.00)[yahoo.com:dkim]; TO_MATCH_ENVRCPT_SOME(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; ASN(0.00)[asn:36647, ipnet:98.137.64.0/20, country:US]; RCVD_IN_DNSWL_NONE(0.00)[98.137.69.147:from]; TO_DN_ALL(0.00)[]; RCVD_COUNT_THREE(0.00)[3]; FREEMAIL_FROM(0.00)[yahoo.com]; RCVD_TLS_LAST(0.00)[]; DKIM_TRACE(0.00)[yahoo.com:+]; MIME_TRACE(0.00)[0:+]; FROM_EQ_ENVFROM(0.00)[]; FREEMAIL_ENVFROM(0.00)[yahoo.com]; MLMMJ_DEST(0.00)[freebsd-arm@freebsd.org] X-ThisMailContainsUnwantedMimeParts: N On 2022-Oct-18, at 11:18, Kristof Provost wrote: > On 18 Oct 2022, at 19:38, Mark Millard wrote: >=20 > On 2022-Oct-18, at 09:53, Kristof Provost wrote: >=20 > It=E2=80=99s not quite clear to me how this is supposed to work (now). = 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? >=20 > It=E2=80=99s broken on ab9293239c7d and e03b7883e97c at the very = least. >=20 > [I'm ignoring qemu, which I do not use. The below is from=20 > a Cortex-A72 aarch64 context that can execute Cortex-A7=20 > armv7 code as well. Have you been using qemu?] >=20 > Historically I've only been able to execute armv7 FreeBSD=20 > code on aarch64 FreeBSD via using the likes of, say,=20 > chroot'ing into an installed armv7 world in a directory=20 > tree that I created for such. (I manually split some=20 > liong-lineouptut for readabilty.) >=20 >=20 > Thanks for that! >=20 > 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 = 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. >=20 > I can=E2=80=99t chroot into that armv7 jail, I still see errors like = this: >=20 > (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 >=20 > But at least I think I=E2=80=99m looking in the correct direction now. Appropriately set up, poudriere's jails are like the chroot example I used. I do my armv7 port builds on a Cortex-A72 system via poudriere. (No qemu use involved.) # poudriere jail -jmain-CA7 -i Jail name: main-CA7 Jail version: 14.0-CURRENT Jail arch: arm.armv7 Jail method: null Jail mount: /usr/obj/DESTDIRs/main-CA7-poud Jail fs: =20 Jail updated: 2021-06-27 17:58:33 Jail pkgbase: disabled /usr/obj/DESTDIRs/main-CA7-poud is analogous to my prior armv7 world example. =3D=3D=3D Mark Millard marklmi at yahoo.com