From nobody Thu Oct 13 06:44:45 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 4Mp0Pc1Wjfz4fDCc for ; Thu, 13 Oct 2022 06:44:52 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic316-8.consmr.mail.gq1.yahoo.com (sonic316-8.consmr.mail.gq1.yahoo.com [98.137.69.32]) (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 4Mp0Pb0nvCz3gb2 for ; Thu, 13 Oct 2022 06:44:51 +0000 (UTC) (envelope-from marklmi@yahoo.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1665643489; bh=ZAIKzwcp3G81Z4whiAiuyPHkuczkcayvk5/g5zSFOrY=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From:Subject:Reply-To; b=VWJJZ/sZGSCZpkAZ4RBwUHu3NbuNgsMvOngseK7yOwsBoKGJChjKfWQdiNc2epIhWHncykqrA7etrWn2kr2uPuocEizEjG50USrGZu/bxEbCtGgiX8dx2+gtdJRlefZzeZ32ptEF7+3LRrE4hWB1uO7YIFJ7d9ZHlo96MKOJ7DLt1b75qQs0vpJnjgbxwEHMPfYRb7+bPJmECh2cjYdsGB80PYApgEMUaaxzyIDD7vurswxiIZMI/hpqXHZ6l7TLylOQMhnwbDlcyv/y/fBTgTO9a/4+7e+3KIZAExdyXjZnz8LQD5h694Vo/VXkJfRnwa9W2e26g8wdAqvaan476w== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1665643489; bh=jQYfYdXq95qOFtf0RpXG/Y0TG76x8Xj0LmSG0brb0m3=;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FWsJ3e7z3fdbIJeFlJqzRpcmm_4eLUtsiwC9pCy0SiySS4Z1zxTriiF cDwSHebtAEpE.YL1N88WOrVepqCvvXl6_L9VGWG9rZvYzkfP_ZsTQkTzXrklCDmWPFFagOJgfeU3 9A9ScW1CKer4cyfh5Qgxtbp4WD2pIQgyhdIhcc9wZFoOz12q4eVX8NNZD6REYHa3QdnGRO0qeLtz Q264u.NUSADW5v.ow7CJl8CMPETz4.DAtBNNLfXJc4_bNvw3COKoN10W1JpX2pnSTkn5EJ3jtnmt NTrUC92ExqQbfGBRY9d7.v8tj5U3rsifyysuwpm5ACa7ed7auYAe_9z.9UJA6X_RLx9D_C2Fp4jO 4jY9bvs0HeBFAzJ6_1B97eNokkpdiAGiGhrVHct4CJIFtctM3B6daaN.qB6sX24yZEELwLZuHZSP rZqxiDUcpr0w_AHWy.HvcXV4b7C6SytYkyRAAguDfYLpHi1.LW8PGthJ9sNZQWI7n1DZkjXkVURT kqyuSrr76mbz3pVo4qdRmA40KOSD2JpqxGig3uUdn3dh5vsMlpTqrMLf5ITnUDoCC2dW53.xzxGG rclY- X-Sonic-MF: Received: from sonic.gate.mail.ne1.yahoo.com by sonic316.consmr.mail.gq1.yahoo.com with HTTP; Thu, 13 Oct 2022 06:44:49 +0000 Received: by hermes--production-ne1-5db649d989-bf48q (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID b88f873637eca2cc603b93177e989992; Thu, 13 Oct 2022 06:44:46 +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: FYI: FreeBSD-14.0-CURRENT-arm-armv7-GENERICSD-20220930-42dc8696df5-258315.img is broken for RPi2 v1.1 (so: armv7) From: Mark Millard In-Reply-To: <6BA96801-D70D-48EC-8DA9-F67C2826609A@yahoo.com> Date: Wed, 12 Oct 2022 23:44:45 -0700 Cc: freebsd-arm Content-Transfer-Encoding: quoted-printable Message-Id: References: <6B46F46A-2CAF-42C9-9A04-63567D7DB9B2@yahoo.com> <28D78C89-E195-4EF1-BB7B-E7F75060BDC7@yahoo.com> <5B631C27-E68C-4F38-96B5-B311110A8F86@yahoo.com> <6EF84694-7CD7-4A9F-BF9C-DFFB52F557AD@yahoo.com> <6A679278-69E0-4592-BFED-48ED8598C2F1@yahoo.com> <6BA96801-D70D-48EC-8DA9-F67C2826609A@yahoo.com> To: Warner Losh X-Mailer: Apple Mail (2.3696.120.41.1.1) X-Rspamd-Queue-Id: 4Mp0Pb0nvCz3gb2 X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=yahoo.com header.s=s2048 header.b="VWJJZ/sZ"; dmarc=pass (policy=reject) header.from=yahoo.com; spf=pass (mx1.freebsd.org: domain of marklmi@yahoo.com designates 98.137.69.32 as permitted sender) smtp.mailfrom=marklmi@yahoo.com X-Spamd-Result: default: False [-3.42 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-0.997]; NEURAL_HAM_SHORT(-0.92)[-0.920]; MV_CASE(0.50)[]; DMARC_POLICY_ALLOW(-0.50)[yahoo.com,reject]; R_SPF_ALLOW(-0.20)[+ptr:yahoo.com]; R_DKIM_ALLOW(-0.20)[yahoo.com:s=s2048]; MIME_GOOD(-0.10)[text/plain]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DWL_DNSWL_NONE(0.00)[yahoo.com:dkim]; RCVD_IN_DNSWL_NONE(0.00)[98.137.69.32:from]; MID_RHS_MATCH_FROM(0.00)[]; ASN(0.00)[asn:36647, ipnet:98.137.64.0/20, country:US]; MLMMJ_DEST(0.00)[freebsd-arm@freebsd.org]; 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:+]; FROM_EQ_ENVFROM(0.00)[]; RCPT_COUNT_TWO(0.00)[2]; FREEMAIL_ENVFROM(0.00)[yahoo.com]; MIME_TRACE(0.00)[0:+]; RWL_MAILSPIKE_POSSIBLE(0.00)[98.137.69.32:from] X-ThisMailContainsUnwantedMimeParts: N On 2022-Oct-12, at 22:28, Mark Millard wrote: > On 2022-Oct-11, at 19:55, Mark Millard wrote: >=20 >> On 2022-Oct-11, at 12:10, Warner Losh wrote: >>=20 >>> On Tue, Oct 11, 2022 at 1:03 PM Warner Losh wrote: >>>>=20 >>>>=20 >>>> On Tue, Oct 11, 2022 at 12:50 PM Mark Millard = wrote: >>>> . . . >>>>=20 >>>> For: >>>>=20 >>>> boot-2022-09-16-15-45-b44869cba1b3-good >>>> boot-2022-09-16-18-02-dd2b9c296776-bad >>>>=20 >>>> there are no armv7 artifacts available between. >>>>=20 >>>> The range is: >>>>=20 >>>> A) =E2=80=A2 git: b44869cba1b3 - main - sound: add patch for = Lenovo Legion 5 Intel Nuno Teixeira=20 >>>> B) =E2=80=A2 git: a705c72f2142 - main - stand: use = archsw.arch_copyin instead of i386_copyin Warner Losh=20 >>>> C) =E2=80=A2 git: 4c670b53a000 - main - stand: use = archsw.arch_copyin instead of direct call Warner Losh=20 >>>> D) =E2=80=A2 git: 8b19d28d68a3 - main - stand: Create = MOD_ALIGN macro and use it everywhere Warner Losh=20 >>>> E) =E2=80=A2 git: bca9c87b6104 - main - stand: Create = common/modinfo.h Warner Losh=20 >>>> F) =E2=80=A2 git: 5d1531d9d4e7 - main - stand: Move = md_copymodules into modinfo.c and reduce copies Warner Losh=20 >>>> G) =E2=80=A2 git: 2e6ed47a4609 - main - stand: Move MOD_xxx = macros from modinfo.h to .c Warner Losh=20 >>>> H) =E2=80=A2 git: fc352701ff3a - main - stand: collapse all = copies of *copyenv into md_copyenv Warner Losh=20 >>>> =E2=80=A2 git: e895ab3fbdc1 - main - stand: Remove dead store = to bi_kernelname Warner Losh=20 >>>> =E2=80=A2 git: d43bcf62a218 - main - stand: Stop support = booting 4.x and earlier kernels Warner Losh=20 >>>> =E2=80=A2 git: 59b1d074280d - main - i386: Mark the obsolete = fields in bootinfo with _was_ Warner Losh=20 >>>> =E2=80=A2 git: 4134f677eb39 - main - i386: Make boot loader = smaller by reducing size of bootinfo Warner Losh=20 >>>> =E2=80=A2 git: 9758dd3de1cd - main - stand: Allocate bootinfo = rather than have it be static Warner Losh=20 >>>> =E2=80=A2 git: c0ecae78abbe - main - stand/elf: Only support = swapping headers on powerpc. Warner Losh=20 >>>> =E2=80=A2 git: dd2b9c296776 - main - stand: fix mismerge = Warner Losh >>>>=20 >>> Yea, I did a bunch of refactoring. I'm surprised that this produced = a change at all. Would be nice to >>> know which one of these caused the problems. >>=20 >> 5d1531d9d4e7 has the stand/common/metadata.c "align" >> removal that the later dd2b9c296776 fixes as the >> "mismerge". So it appears that most of the stages >> would not build without adjustment for that. >>=20 >> So presume I've made the adjustment for any such >> such cases below. >>=20 >> H) fc352701ff3a Bad >> D) 8b19d28d68a3 Good >> F) 5d1531d9d4e7 Bad >> E) bca9c87b6104 Good >>=20 >> So the good -> bad back-to-back sequence pair is: >>=20 >> git: bca9c87b6104 - main - stand: Create common/modinfo.h Warner Los >> git: 5d1531d9d4e7 - main - stand: Move md_copymodules into modinfo.c = and reduce copies Warner Losh >>=20 >>=20 >> Note: I cross build armv7 via aarch64 normally. >> There is no "buildstand" analogous to buildworld >> or buildkernel that takes TARGET and TARGET_ARCH >> for cross builds. Thus I ended up with a full >> buildworld to establish a context for the cross >> builds. >>=20 >=20 > I got another oddity to add to the evidence, > although it might just be a separate issue. >=20 > First off some context: With the additions to > the microsd card: >=20 > /boot/efi/bcm2710-rpi-2-b.dtb > /boot/efi/bcm2710-rpi-3-b-plus.dtb > /boot/efi/bcm2710-rpi-3-b.dtb > /boot/efi/bcm2710-rpi-cm3.dtb >=20 > I can have armv7 13.1-STABLE FreeBSD boot: >=20 > RPi2B v1.1 (The official support targets this.) > RPi2B v1.2 (not tested but I could) > RPi3B+ (no access to such) > RPi3B (tested) > Computer Module 3 (no access to such) >=20 > (I recently sent out notes out that are for mostly USB > booting to match more closely Bob P.'s context. This > has some more involved to span the range and some > specifics of dealing with oddities of the media I have > access to show up in order for me to demonstrate > operation.) >=20 > Part of the point of 13.1-STABLE here is avoiding all > the recent EFI loader changes, not just one block of > them. >=20 > But for main [so: 14] and the same bca9c87b6104 based EFI > loader that I reported as working on the RPi2B v1.1, I get > differing behavior between: >=20 > RPi2B v1.1 (boots with serial console & HDMI output throughout) > vs. > RPi3B (serial output stops and, when HDMO is connected, > HDMI output keeps going) >=20 > For the RPi3B, the last serial console line output is: >=20 > Kernel args: (null) >=20 > By contrast, for RPi2B v1.1 with both the serial console and > the HDMI connected, both get console output, reaching the > login prompt. (I've not certified every line is present > on both. There could be differences for all I know.) >=20 > So, in this context, the RPi3B seems to hit the console > handling type of issue that you were originally expecting. >=20 > I originally looked into this in case the results meant > that you could use a bcm2710 based RPi* instead of a > bcm2709 based one for investigating the armv7-style-boot > with 5d1531d9d4e7 and later EFI loader problem(s), giving > you more options. >=20 Adding 2 more files (only 1 necessary) and adjusting config.txt I get both the serial console and the HDMI console not stopping for the armv7 bca9c87b6104 EFI loader --on both the RPi3B and the RPi2B v1.1 . I added: # ls -Tld /boot/efi/overlays/*-bt.dtbo -rwxr-xr-x 1 root wheel 1073 Mar 3 13:29:56 2021 = /boot/efi/overlays/disable-bt.dtbo -rwxr-xr-x 1 root wheel 1819 Mar 3 13:29:56 2021 = /boot/efi/overlays/miniuart-bt.dtbo but am just using disable-bt.dtbo --via the updated config.txt : # diff -u /boot/efi/config.txt.orig /boot/efi/config.txt --- /boot/efi/config.txt.orig 2022-10-07 05:38:00.000000000 +0000 +++ /boot/efi/config.txt 2022-10-13 05:39:26.000000000 +0000 @@ -3,3 +3,6 @@ kernel=3Du-boot.bin kernel7=3Du-boot.bin dtoverlay=3Dmmc +# +# Local addition(s): +dtoverlay=3Ddisable-bt This changes which UART is used for the serial console. (As does the alternative *-bt.dtbo .) So, in summary, to allow armv7 boots via the likes of a RPi3B as well as a RPi2B v1.1 with the serial console and HDMI console both operational (if connected) . . . Based on microsd card media that are from the likes of: FreeBSD-14.0-CURRENT-arm-armv7-GENERICSD-20221007-b05b1ecbef0-258483.img The changes are as follows. For /boot/efi/EFI/BOOT/bootarm.efi , use the bca9c87b6104 EFI loader from main [so: 14], not later. (Other earlier ones/13.1-STABLE ones/etc. also would work.) Add the files: /boot/efi/bcm2710-rpi-2-b.dtb /boot/efi/bcm2710-rpi-3-b-plus.dtb /boot/efi/bcm2710-rpi-3-b.dtb /boot/efi/bcm2710-rpi-cm3.dtb Add at least one of: /boot/efi/overlays/disable-bt.dtbo /boot/efi/overlays/miniuart-bt.dtbo Put one of those 2 to use via config.txt , such as via: # diff -u /boot/efi/config.txt.orig /boot/efi/config.txt --- /boot/efi/config.txt.orig 2022-10-07 05:38:00.000000000 +0000 +++ /boot/efi/config.txt 2022-10-13 05:39:26.000000000 +0000 @@ -3,3 +3,6 @@ kernel=3Du-boot.bin kernel7=3Du-boot.bin dtoverlay=3Dmmc +# +# Local addition(s): +dtoverlay=3Ddisable-bt With this both the serial console and HDMI console should work, each allowing a login. This may suggest armv7 snapshot content changes in addition to the EFI loader fixes for what is after bca9c87b6104 . =3D=3D=3D Mark Millard marklmi at yahoo.com