From nobody Tue Oct 25 03:32:17 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 4MxHYz6Qhfz4gS1v for ; Tue, 25 Oct 2022 03:32:23 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic311-25.consmr.mail.gq1.yahoo.com (sonic311-25.consmr.mail.gq1.yahoo.com [98.137.65.206]) (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 4MxHYy5rwhz3f94 for ; Tue, 25 Oct 2022 03:32:22 +0000 (UTC) (envelope-from marklmi@yahoo.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1666668740; bh=6Jqvt38KmqcjcTteRd53+HuWzEUSl+1366mHY4GBdCs=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From:Subject:Reply-To; b=Hk6o+Hn3/kAvVF+5KfBY5bj7HbP9kqrOFSXuu3mDR0nscU4CuccfgZncuXTttOdTi09gyJLtH2MnQX9ZXEheQd+BgMiV5lTvLEr7Zf+hBMWm0HtUpu0aGbI5tvwJbFzjs62r2GIFO+c4j9yPy5wEInSpafCWo/+GN3T5F+b6OJnXcixAjdMNW5oQvxXzMaRqZ/hN89+nJ7JryeLSd5GPV1Pdk73I6iHFeQZ/FN9E+++aBADb0CDz7xFzpWEpphkERrAHnwogG8Y2mtchWHFGLp6sdudn5bOqmQndwKNUFe0O4ZVOI+zDSUNe8+3BtoudmiQZZLm/l96XEtIbb+zSfA== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1666668740; bh=7nGbB98PJcSjm811CtbqdLDa/i9FoKocRysbcJdAihB=; h=X-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p4L4XGs4gGK0esKCz7KBNq6MCeleVRN42qt4EX 54kRTd2A7NE.JtNE2vuoswsdqb.gCoc8qI_eyIOGBtL6AkKbJGqrT_6ivhRRimXkEhAcDuCkqUXO _YcDAkooo3vf_HhtZ4DyrtF1a7hh7X0rcLXNA9kmZbclD9hOqME8sEAjKzk5uUYotpUtZRIjT26x Nf350K9q228pnoAbdBd2RsDjEP.PTBYP9rIqnsOkATe87Vq2B77kBYYb9iUGw5saSns4nEqxg5yb MmRuDi5zfVRszc1BYpZzdn3MbTEgQh5TRAvK8obDBgBatHSFGUt9hDUA1JMdSfXFvpiMROl1aqg4 TVRUqNq_D_VcZuJlOW.3nd6RYPUt7V3q4Ox43G.atu2ZEoUbevS7jSWa8M2lbd5kPxlVIMpwm1yb 8fCNMCoqpcuwPEBEcfKNkMSbRvnVrz8f.vai2iBPcEZONkEmK.jxhlymeLaGU7pjaXlHvMC35zrl QlqJikVakjquCm1pgO25jePCO7l9Lb5xEgAviWqUxAoLBoGk3OGtYaGswAtvZ7UZAd0iur0Mh8RI BIg-- X-Sonic-MF: Received: from sonic.gate.mail.ne1.yahoo.com by sonic311.consmr.mail.gq1.yahoo.com with HTTP; Tue, 25 Oct 2022 03:32:20 +0000 Received: by hermes--production-gq1-754cb59848-v9h2d (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID 6df99cd53e913df2e6ac3f87158c192c; Tue, 25 Oct 2022 03:32:18 +0000 (UTC) Content-Type: text/plain; charset=us-ascii 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: EDK2 on RPi3 was: Re: u-boot debug, was: Re: U-boot on RPI3, sees disk but won't boot it From: Mark Millard In-Reply-To: <20221025005012.GA80394@www.zefox.net> Date: Mon, 24 Oct 2022 20:32:17 -0700 Cc: Klaus K??chemann , freebsd-arm Content-Transfer-Encoding: quoted-printable Message-Id: <605A6723-5D31-495C-8200-FD107115FC81@yahoo.com> References: <136B9190-4C73-45FB-8B41-FEEF7C38A253@yahoo.com> <3A76826B-B4E6-4837-915E-C9E1172BEA20@yahoo.com> <20221021175142.GA62386@www.zefox.net> <0697DE1F-C626-4289-894A-4141CDF1B91B@yahoo.com> <71AB9FAC-EB00-48F0-B0DD-0629C2D3C8C0@googlemail.com> <5719632F-8A92-4784-88D8-EAE3F20F2FA3@yahoo.com> <20221024174930.GA79381@www.zefox.net> <20221025005012.GA80394@www.zefox.net> To: bob prohaska X-Mailer: Apple Mail (2.3696.120.41.1.1) X-Rspamd-Queue-Id: 4MxHYy5rwhz3f94 X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=yahoo.com header.s=s2048 header.b=Hk6o+Hn3; dmarc=pass (policy=reject) header.from=yahoo.com; spf=pass (mx1.freebsd.org: domain of marklmi@yahoo.com designates 98.137.65.206 as permitted sender) smtp.mailfrom=marklmi@yahoo.com X-Spamd-Result: default: False [-3.50 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; MV_CASE(0.50)[]; DMARC_POLICY_ALLOW(-0.50)[yahoo.com,reject]; R_DKIM_ALLOW(-0.20)[yahoo.com:s=s2048]; R_SPF_ALLOW(-0.20)[+ptr:yahoo.com]; MIME_GOOD(-0.10)[text/plain]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; RCVD_VIA_SMTP_AUTH(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; ARC_NA(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[98.137.65.206:from]; DWL_DNSWL_NONE(0.00)[yahoo.com:dkim]; 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]; MID_RHS_MATCH_FROM(0.00)[]; DKIM_TRACE(0.00)[yahoo.com:+]; RCVD_TLS_LAST(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; FREEMAIL_ENVFROM(0.00)[yahoo.com]; MIME_TRACE(0.00)[0:+]; FREEMAIL_CC(0.00)[googlemail.com,freebsd.org] X-ThisMailContainsUnwantedMimeParts: N On 2022-Oct-24, at 17:50, bob prohaska wrote: > On Mon, Oct 24, 2022 at 11:50:11AM -0700, Mark Millard wrote: >>=20 >> bootcode.bin is only likely to help stages before >> u-boot.bin starts. If it makes to to u-boot.bin >> starting, bootcode.bin is then likely irrelevant >> from then on. >>=20 >> In fact bootcoce.bin is what loads the start*.elf Typo fix: bootcode.bin >> that is used. If the start*.elf starts, bootcode.bin >> is likely irrelevant past that point. >>=20 > I've put the console output at > http://www.zefox.net/~fbsd/rpi2/20221024/boot_console > in case it's of interest. It was a RPi2B v1.1 (Cortex-A7 form of armv7). It was a U-Boot 2022.04 based boot sequence for the U-Boot stage. swapon: /dev/sdda0s2b: No such file or directory looks like us has an incorrect "sd" between "/" and "da0s2b". I've not seen/noticed the following before: QUOTE ELF ldconfig path: /lib /usr/lib /usr/lib/compat /usr/local/lib = /usr/local/lib/compat/pkg /usr/local/lib/compat/pkg Soft Float compatibility ldconfig path: ldconfig: illegal option -- o usage: ldconfig [-32] [-elf] [-Rimrv] [-f hints_file] [directory | file = ...] END QUOTE But, to my knowledge, "Soft Float" is not in use any more (by default, anyway). It might be that something is left over from long ago? Looking, I see: QUOTE author Warner Losh 2022-01-07 05:34:18 +0000 committer Warner Losh 2022-01-07 05:34:18 = +0000 commit d418bc27e601ec6bba0506d0efb62eca5eda5ab8 (patch) tree 14a7fb6ba93ab48d7e1c746a09e7d1d5de6f897e = /libexec/rc/rc.d/ldconfig parent b68d6892ba8aa14470e94a408b43ce4d8b1761da (diff) download src-d418bc27e601ec6bba0506d0efb62eca5eda5ab8.tar.gz src-d418bc27e601ec6bba0506d0efb62eca5eda5ab8.zip libsoft: Remove runtime ldconfig support for libsoft Remove the runtime support for running ldconfig at boot to cache lists of libsoft libbraries. END QUOTE ( Note: /libexec/rc/rc.d/ldconfig is installed to /etc/rc.d/ldconfig .) Your /etc/rc.d/ldconfig script seems to have not been updated by use of etcupdate or mergemaster or other such. (How much else is also out of date? How much of what you have for /etc/ and the like goes back to 2022-Jan-07 or before?) > There are a surprising number > of what look like complaints/errors, but it boots anyway. >=20 >>=20 >>> The interest I expressed in EDK2 appears to have been misguided, >>> or at least premature. I was hoping it might be a more tractable >>> replacement for u-boot, but it's equally inscrutable to an amateur. >>=20 >>=20 >> Was this based on mina ports before vs. after: Another wonderful typo of mine: "mina". >> QUOTE >> author Mark Millard 2022-10-21 = 21:47:14 +0000 >> committer Lorenzo Salvadore = 2022-10-21 22:00:03 +0000 >>=20 >=20 > After. Before it failed in the expected way. After, it succeeded, but > built edk2 for macchiatobin that wasn't useful. I couldn't figure out > how to make poudriere attempt to build the needed rpi3 flavor (The FLAVORS material below is more for providing background in building flavored ports than for EDK2 specifically, but using EDK2 as the example . . .) The sysutils/edk2/Makefile has: FLAVORS=3D macchiatobin fvp rpi3 rpi4 xen_x64 bhyve qemu_x64 = qemu_i386 Being listed first, macchiatobin is the default flavor. To specify a flavor explicitly on the poudriere bulk command, use notation like one or more of the following on the command line: sysutils/edk2@macchiatobin sysutils/edk2@fvp sysutils/edk2@rpi3 sysutils/edk2@rpi4 So the last 2 of those 4 are the ones that fit your context. (The later ones in the FLAVORS list have: ONLY_FOR_ARCHS=3Damd64 .) Other than flavors handling . . . I've commented before that I'm not aware of an armv7 EDK2. So no coverage of an RPi2 v1.1 as far as I know. ( Also known via any of its dtb names, such as: bcm2709-rpi-2-b.dtb . bcm2710-rpi-2-b.dtb is the v1.2 aarch64 variant.) The RPi3 EDK2 only supplies the RPi* firmware that it gets via curl when the official RPi3 pftf EDK2 ( https://github.com/pftf/RPi3 ) related builds are done: - name: Download Raspberry Pi support files run: | curl -O -L = https://github.com/raspberrypi/firmware/raw/master/boot/bootcode.bin curl -O -L = https://github.com/raspberrypi/firmware/raw/master/boot/fixup.dat curl -O -L = https://github.com/raspberrypi/firmware/raw/master/boot/start.elf curl -O -L = https://github.com/raspberrypi/firmware/raw/master/boot/bcm2710-rpi-3-b.dt= b curl -O -L = https://github.com/raspberrypi/firmware/raw/master/boot/bcm2710-rpi-3-b-pl= us.dtb curl -O -L = https://github.com/raspberrypi/firmware/raw/master/boot/bcm2710-rpi-cm3.dt= b (FreeBSD's port does not deal with such things at all.) So no bcm2710-rpi-2-b.dtb . I do not know if the RPi3 EDK2 would be well behaved with an appropriate vintage bcm2710-rpi-2-b.dtb added or not. I've never tried such. I forgot to mention that the offical RPI4 pftf EDK2 ( https://github.com/pftf/RPi4 ) related build has 2 patches to EDK2: - name: Patch EDK2 repositories run: | patch --binary -d edk2 -p1 -i = ../0001-MdeModulePkg-UefiBootManagerLib-Signal-ReadyToBoot-o.patch patch --binary -d edk2-platforms -p1 -i = ../0002-Check-for-Boot-Discovery-Policy-change.patch These would not be in the FreeBSD port's build. FYI, for the RPi4 EDK2: - name: Download Raspberry Pi support files run: | curl -O -L ${{ env.RPI_FIRMWARE_URL }}/raw/${{ = env.START_ELF_VERSION }}/boot/fixup4.dat curl -O -L ${{ env.RPI_FIRMWARE_URL }}/raw/${{ = env.START_ELF_VERSION }}/boot/start4.elf curl -O -L ${{ env.RPI_FIRMWARE_URL }}/raw/${{ env.DTB_VERSION = }}/boot/bcm2711-rpi-4-b.dtb curl -O -L ${{ env.RPI_FIRMWARE_URL }}/raw/${{ env.DTB_VERSION = }}/boot/bcm2711-rpi-cm4.dtb curl -O -L ${{ env.RPI_FIRMWARE_URL }}/raw/${{ env.DTB_VERSION = }}/boot/bcm2711-rpi-400.dtb curl -O -L ${{ env.RPI_FIRMWARE_URL }}/raw/${{ env.DTBO_VERSION = }}/boot/overlays/miniuart-bt.dtbo curl -O -L ${{ env.RPI_FIRMWARE_URL }}/raw/${{ env.DTBO_VERSION = }}/boot/overlays/upstream-pi4.dtbo mkdir overlays mv *.dtbo overlays (I add and use disable-bt.stbo . They do mention its use in some instructions someplace.) > and didn't > find a flavor for rpi2. This was on a Pi4 running -current.=20 I supplied notes about RPi2B's earlier, above. > It's unclear to me if edk2 offers any advantage over u-boot, at least > when u-boot works. I only suggested EDK2 because U-Boot was not working well and there might be a chance that EDK2 might work better for for that stage in one or more of your detailed contexts. (No claim that this would improve FreeBSD kernel handling of any RPi*/bridge/drive combinations --or the earlier RPi* firmware stage.) If it does not work better for any, I'd suggeste avoiding being outside the somewhat supported FreeBSD RPi* context: avoid EDK2. (I use both styles of booting, but I'm odd.) I'll note that the main ports has updated U-Boot's from 2022.04 to 2022.10 . No clue if you might see behavioral changes for the U-Boot stage if you update. Also, Warner L. has checked in a fix for main FreeBSD's EFI loader build ( in stand/efi/ ) for armv7(/armv6). The next snapshot for armv7 main [so: 14] should have it. > I think HPS's changes to usb probably did help, Good. > but > won't know for a while yet given the erratic nature of the troubles.=20= Yep. =3D=3D=3D Mark Millard marklmi at yahoo.com