From owner-freebsd-arm@freebsd.org Wed Mar 31 23:36:18 2021 Return-Path: Delivered-To: freebsd-arm@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C92515B4BD3 for ; Wed, 31 Mar 2021 23:36:18 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic305-21.consmr.mail.gq1.yahoo.com (sonic305-21.consmr.mail.gq1.yahoo.com [98.137.64.84]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4F9jPY6G0Gz4nfZ for ; Wed, 31 Mar 2021 23:36:17 +0000 (UTC) (envelope-from marklmi@yahoo.com) X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1617233775; bh=7U0yJKkcn8dtXMHy1Rlx2e3FDt0VNEpwSKeJe+ugvXO=; h=X-Sonic-MF:Subject:From:Date:To:From:Subject; b=th8gEc1gqnBDue2bNPkRCI3AI9f1K4sxUCvdHc4ZvZlVxG8fXNnFdHzJvzfOZPVUnLxX2QGg8xCFNxFdcgQyI0zsSxuImlGj6VbJcdxBwIGyNIT6YXX6xLkRmVtb7ftfCUjG+MM+pO0iXGzsFJmyw/2ZTwrAF0ZJK8AG9lUUx1VviCLO9xn2Reem2CS73D/txEZIFOfb4SVmwdLk94dFu5gCHtcalokuXIGVcpxksw7lOO4LlhnNa6xiHx6HzpQzdOP3f7ZVv6/sMkOEuysCvQIEt79IPIQq4kn+2UVjXF5Q2vbtSscujdCISZctZvi3jG8OrUimAY0kTXrNJhBR8A== X-YMail-OSG: ZcYUgAEVM1m2Mk6Z0CzRKqoPZZ84d77nWIqhfmddwsvlpK8W39v6cW9AY5HqdN3 jVWn3FgWxTIFHqILXbnjoD9VD7ELP.tFYYt7VFTbXtMb1d7i.NbsfaC4c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ggrymo6W49OwwV_M10vVlx78zw0EFCiEtvB9kkAzQ803ORnSVcqmezK2RlQk1qQVSjPI TwA1SL6NbI.ybzxH.8uj3rHyLlvDXAKkK9EArzXtUdDkwvR6ohOP0xC4eCv9c8dVUekCUEgnVoam pEHdbQ0.kWUTYvHwuHr6VtkKWSnLtN1x0Z.xcjoFOUcr.g0x8uPCar_.7d0n4.PJXIvba7qXAA4b txAqnxOi0Hyty5KTNgLsphWfGjam_NpJT.KDlBWd7ATt8tHyo0gaXGdcjsVDvI6mbSxWlLcNvwh5 UBbP3tB35K.G3Ah36oMx3Az9C306fTx0Ru.hWWFY- X-Sonic-MF: Received: from sonic.gate.mail.ne1.yahoo.com by sonic305.consmr.mail.gq1.yahoo.com with HTTP; Wed, 31 Mar 2021 23:36:15 +0000 Received: by kubenode542.mail-prod1.omega.bf1.yahoo.com (VZM Hermes SMTP Server) with ESMTPA ID 851c21fc3363c8fc4dd101533dc20a08; Wed, 31 Mar 2021 23:36:10 +0000 (UTC) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.60.0.2.21\)) Subject: Re: 32-bit executables on aarch64? From: Mark Millard In-Reply-To: Date: Wed, 31 Mar 2021 16:36:08 -0700 Cc: freebsd-arm@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: <1BF8C073-2913-4AA9-83DB-64CD3791147A@yahoo.com> References: <202103311655.12VGtx3T036893@office.dignus.com> To: Robert Clausecker X-Mailer: Apple Mail (2.3654.60.0.2.21) X-Rspamd-Queue-Id: 4F9jPY6G0Gz4nfZ X-Spamd-Bar: -- X-Spamd-Result: default: False [-2.50 / 15.00]; TO_DN_SOME(0.00)[]; FREEMAIL_FROM(0.00)[yahoo.com]; MV_CASE(0.50)[]; R_SPF_ALLOW(-0.20)[+ptr:yahoo.com]; DKIM_TRACE(0.00)[yahoo.com:+]; RCPT_COUNT_TWO(0.00)[2]; DMARC_POLICY_ALLOW(-0.50)[yahoo.com,reject]; NEURAL_HAM_SHORT(-1.00)[-1.000]; FROM_EQ_ENVFROM(0.00)[]; RCVD_TLS_LAST(0.00)[]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[yahoo.com]; ASN(0.00)[asn:36647, ipnet:98.137.64.0/20, country:US]; MID_RHS_MATCH_FROM(0.00)[]; DWL_DNSWL_NONE(0.00)[yahoo.com:dkim]; SUBJECT_ENDS_QUESTION(1.00)[]; ARC_NA(0.00)[]; R_DKIM_ALLOW(-0.20)[yahoo.com:s=s2048]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; FROM_HAS_DN(0.00)[]; RBL_DBL_DONT_QUERY_IPS(0.00)[98.137.64.84:from]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[text/plain]; SPAMHAUS_ZRD(0.00)[98.137.64.84:from:127.0.2.255]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[98.137.64.84:from]; RWL_MAILSPIKE_POSSIBLE(0.00)[98.137.64.84:from]; RCVD_COUNT_TWO(0.00)[2]; MAILMAN_DEST(0.00)[freebsd-arm] X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Porting FreeBSD to ARM processors List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Mar 2021 23:36:18 -0000 On 2021-Mar-31, at 15:45, Robert Clausecker wrote: > The intent is to test and develop software that only runs on > armv7 (specifically, Mecrisp Stellaris, a Forth system written > in ARM assembly). This is best done natively. >=20 > It's actually kinda annoying that no binary release tarballs > are provided for armv7, so setting up the jail involves an > annoying make world step. For amd64 jails, I can just unpack > the binary tarballs and fix the configuration and I'm good to go. >=20 > The problem with the armv7 machine was that it didn't have > enough RAM to make world (and setting up swap on an SD card is > a surefire way to send it to an early grave, so I'd rather avoid > that). Ended up having to swap over NFS and wait more than a > week for make world to complete. And that only because there is > no other way to upgrade the machine remotely. If only there were > binary release tarballs... >=20 > But surely, lib32 support for arm64 would be even better in this > regard. [There is no lib32 support, only the chroot support. (jail use may well inherit such chroot properties and also work. I've never explicitly used a jail.)] There are armv7 tarballs around --but exactly which stable/13 or main or whatever commits will happen to be available is more of a grab bag, depending on what the ci.freebsd.org builds happened to do. Example 2021-Mar-31 stable/13 armv7 .txz files are at: = https://artifact.ci.freebsd.org/snapshot/stable-13/a25c17022e2d6344dcbc619= 2af276d2798d76d44/arm/armv7/ Example 2021-Mar-31 main armv7 .txz files are at: = https://artifact.ci.freebsd.org/snapshot/main/006a01374f59b839ca1c900efd27= 4a3b92044b15/arm/armv7/ Multiple builds for the same day are possible. It is common for a give commit that only some of the architectures end up with a build. So finding what is available for a given architecture is messy. But it may well be worth the effort if you do not require releng or weekly snaphot builds or other special examples. Such .txz areas tend to stick around for much of a year. So once you have found one that you are willing to use, it should still be around to re-find for a while. I tend to sort the browser display for looking to find something of use, since git hashes do not sort usefully. For example: https://artifact.ci.freebsd.org/snapshot/main/?C=3DM&O=3DD Of course the paths for pre-git look different in some respects but they are there, such as: https://artifact.ci.freebsd.org/snapshot/main/r368818/arm/armv7/ > Yours, > Robert Clausecker >=20 > Am Wed, Mar 31, 2021 at 03:02:27PM -0700 schrieb Mark Millard: >>=20 >>=20 >> On 2021-Mar-31, at 14:12, Robert Clausecker wrote: >>=20 >>> Hi Mark, >>>=20 >>> This is news to me. Excellent news! I can't say how grateful I am >>> for having this pointed out by you. Can now go ahead and throw out >>> my dedicated armv7 test machine which has caused me a lot of >>> head aches with world builds and all that. >>>=20 >>>=20 >>=20 >> Somewhat depends on the type/intent of the testing activity. >> If testing the armv7 kernel is part of the point, then >> building might be done on the likely faster (and more RAM >> across processes) aarch64 environment in the chroot and >> some testing there as well. But for armv7 kernel testing, >> it would take use in an environment that was running actual >> armv7 FreeBSD kernel and world. >>=20 >> If such is needed, you can still buildworld, buildkernel, >> and build ports in a faster/more-RAM environment. >>=20 >> One way to have an armv7 chroot available in aarch64 is to >> have the media that is used for the actual armv7 system >> temporarily connected to the aarch64 system and mount the >> file system and chroot into it to do the builds and >> installs and such. (Might not be as easy if the armv7 >> system context is split into multiple mount points.) >> Later exit the chroot, dismount, connect back up to the >> armv7 system, and boot. (I'm not addressing special >> handling of u-boot or an msdos file system's contents >> or the like here.) >>=20 >> As for installkernel installworld, etcupdate, etc. if >> instead a cross build was made outside a chroot, the >> installs and such can target a mounted file system >> (DESTDIR=3D and the like is involved). This also avoids >> some of the technical issues that can be involved for >> live updating the same system that is running. >>=20 >> Building armv7 ports on aarch64 would always involve a >> chroot (possibly implicitly via poudriere's cross build >> way of working for such). >>=20 >> It is rare that I build for armv7 on an armv7. It is also >> rare that I build for aarch64 on slower aarch64 machines. >> A similar point was always been true for my historical >> powerpc64 and 32-bit powerpc activities. >>=20 >>>=20 >>> Am Wed, Mar 31, 2021 at 11:05:45AM -0700 schrieb Mark Millard: >>>>=20 >>>> On 2021-Mar-31, at 10:46, Robert Clausecker wrote: >>>>=20 >>>>> Hi Thomas, >>>>>=20 >>>>> Unfortunately, there is no support for running armv7 executables >>>>> on arm64, though it would technically be possible to implement. >>>>> I myself would really like to have this sort of thing but I lack >>>>> the knowledge to have it. Perhaps someone feels adventurous >>>>> enough to look into implementing support for this sort of thing. >>>>=20 >>>> aarch64 FreeBSD supports having an armv7 world installed >>>> in a directory tree for use with chroot. >>>>=20 >>>> I've a separate reply to the original submittal showing >>>> a use of such. >>>>=20 >>>> aarch64 FreeBSD lacks lib32 for more direct execution >>>> of armv7 FreeBSD code without involving a chroot use (or >>>> qemu use or other such). >>>>=20 >>>>> For historical reasons, the i386 and amd64 ports of gcc and clang >>>>> have a largely shared code base and are essentially the same port. >>>>> So options -m32, -m64 can be used to switch between them. The = same >>>>> is not possible for armv7 and arm64 which are distinct ports with >>>>> little to no shared backend code. Consider using -target armv7 >>>>> instead. >>>>>=20 >>>>> Yours, >>>>> Robert Clausecker >>>>>=20 >>>>> Am Wed, Mar 31, 2021 at 12:55:59PM -0400 schrieb Thomas David = Rivers: >>>>>>=20 >>>>>> I'm playing around with a (rather-old now) 13.0-pre-pre-pre = release >>>>>> on Raspberry PI 4B. >>>>>>=20 >>>>>> I was naively thinking I could just use -m32 to create a 32-bit >>>>>> executable... but the LLVM there promptly told me it didn't = recognize >>>>>> -m32. >>>>>>=20 >>>>>> I installed the gcc V9 port and it said the same thing. >>>>>>=20 >>>>>> This begged the question, is there no support of 32-bit ARM = (armv7) >>>>>> executables in the aarch64 environment? >>>>>=20 >>=20 =3D=3D=3D Mark Millard marklmi at yahoo.com ( dsl-only.net went away in early 2018-Mar)