From owner-freebsd-arm@freebsd.org Wed Mar 31 22:02:33 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 6176D5B2358 for ; Wed, 31 Mar 2021 22:02:33 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic317-21.consmr.mail.gq1.yahoo.com (sonic317-21.consmr.mail.gq1.yahoo.com [98.137.66.147]) (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 4F9gKN23rJz4jCW for ; Wed, 31 Mar 2021 22:02:30 +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=1617228149; bh=anPwKjgNy2f1kQRcyHCcPry04+1bG/0AaR2OIPUVBAU=; h=X-Sonic-MF:Subject:From:Date:To:From:Subject; b=VFNIgzxwC49aZ6hy7V6uVClM8WePc+Zt2dDByYFluJvWQQODhnltqg7hG2SLTwVXZmO7NrhM53Wz+R/JzBbc2SXHU+bv+9qMlubPFuSYblV9yxLU/UvSIFe+gf823nbiRQwSknVRiPXO+Nv3qKBRrhBGiWvpxmA1+3tCpg77wxAeowvT7BASmcKpPXjFTHOhYlgOIIC/RhaAqGirOteU7oJUU7BsxPtyihFyMr7cr60J7vqYD9WIPorXBxreaqp55HzFq+L3wggXpMXlTmcnjqAAHITMaIjagb1TegPJtkMTtgyMqQRx1FlicMmJGEJjzuaZTXWqJSg3I6DvuR8/6Q== X-YMail-OSG: 5642tlcVM1n1QNCGztk1GfC1vSW7Ha0Lq.2wlcvcDQ8FCcuQGacsk.7Ox08sOjb YajAhronFiErEdtKbeNmZiSD_30Dpca0obQgS5nSVh_hdbwtN6KdQGYgh.vQJLx219nDg.ko5EB9 yVNBd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nTfu9DtaWmkRBl64PwJ0X6jIdfb.0oQ0uKcAOvZYvZKL_.eOR.fHqglWbq_PC_JoMpOpXqNi _XiEHyw09FGhOn04Ra9kYBZtci2tnzPt3BVYf490EZeLsDUls3hDT652Hve7ms_Uj_YVfSuYO01y RAg_o0o.q_eeFlxRgt1sNxFyFxvbYLwok7Ix6Ym74p2HMrpQ6r2GR1SfqUT863LQHhMxMrAoH3v0 jleUy9Mz_roBBuYdDZiaJipBxe4SYYIJvoFzGl162iIEVF2yOhQmGLeiqJfR. X-Sonic-MF: Received: from sonic.gate.mail.ne1.yahoo.com by sonic317.consmr.mail.gq1.yahoo.com with HTTP; Wed, 31 Mar 2021 22:02:29 +0000 Received: by kubenode516.mail-prod1.omega.gq1.yahoo.com (VZM Hermes SMTP Server) with ESMTPA ID 8e3fee5b1f59537d0c3ce9446beadc83; Wed, 31 Mar 2021 22:02:28 +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 15:02:27 -0700 Cc: freebsd-arm@freebsd.org Content-Transfer-Encoding: 7bit Message-Id: References: <202103311655.12VGtx3T036893@office.dignus.com> To: Robert Clausecker X-Mailer: Apple Mail (2.3654.60.0.2.21) X-Rspamd-Queue-Id: 4F9gKN23rJz4jCW 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.66.147:from]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[text/plain]; SPAMHAUS_ZRD(0.00)[98.137.66.147:from:127.0.2.255]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[98.137.66.147:from]; RWL_MAILSPIKE_POSSIBLE(0.00)[98.137.66.147: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 22:02:33 -0000 On 2021-Mar-31, at 14:12, Robert Clausecker wrote: > Hi Mark, > > 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. > > 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. If such is needed, you can still buildworld, buildkernel, and build ports in a faster/more-RAM environment. 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.) 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= 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. Building armv7 ports on aarch64 would always involve a chroot (possibly implicitly via poudriere's cross build way of working for such). 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. > > Am Wed, Mar 31, 2021 at 11:05:45AM -0700 schrieb Mark Millard: >> >> On 2021-Mar-31, at 10:46, Robert Clausecker wrote: >> >>> Hi Thomas, >>> >>> 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. >> >> aarch64 FreeBSD supports having an armv7 world installed >> in a directory tree for use with chroot. >> >> I've a separate reply to the original submittal showing >> a use of such. >> >> aarch64 FreeBSD lacks lib32 for more direct execution >> of armv7 FreeBSD code without involving a chroot use (or >> qemu use or other such). >> >>> 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. >>> >>> Yours, >>> Robert Clausecker >>> >>> Am Wed, Mar 31, 2021 at 12:55:59PM -0400 schrieb Thomas David Rivers: >>>> >>>> I'm playing around with a (rather-old now) 13.0-pre-pre-pre release >>>> on Raspberry PI 4B. >>>> >>>> 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. >>>> >>>> I installed the gcc V9 port and it said the same thing. >>>> >>>> This begged the question, is there no support of 32-bit ARM (armv7) >>>> executables in the aarch64 environment? >>> > === Mark Millard marklmi at yahoo.com ( dsl-only.net went away in early 2018-Mar)