From nobody Mon Sep 26 17:09:13 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 4Mbq3x4hq9z4YJGM; Mon, 26 Sep 2022 17:09:17 +0000 (UTC) (envelope-from fbsd@www.zefox.net) Received: from www.zefox.net (www.zefox.net [50.1.20.27]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "www.zefox.com", Issuer "www.zefox.com" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Mbq3w4kgPz3Fn6; Mon, 26 Sep 2022 17:09:16 +0000 (UTC) (envelope-from fbsd@www.zefox.net) Received: from www.zefox.net (localhost [127.0.0.1]) by www.zefox.net (8.16.1/8.15.2) with ESMTPS id 28QH9D61068553 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Mon, 26 Sep 2022 10:09:14 -0700 (PDT) (envelope-from fbsd@www.zefox.net) Received: (from fbsd@localhost) by www.zefox.net (8.16.1/8.15.2/Submit) id 28QH9DOf068552; Mon, 26 Sep 2022 10:09:13 -0700 (PDT) (envelope-from fbsd) Date: Mon, 26 Sep 2022 10:09:13 -0700 From: bob prohaska To: Mark Millard Cc: FreeBSD Mailing List , freebsd-arm Subject: Re: u-boot debug, was: Re: U-boot on RPI3, sees disk but won't boot it Message-ID: <20220926170913.GA68300@www.zefox.net> References: <20220921175026.GA45144@www.zefox.net> <5DB9C93B-B9E1-418D-ABA3-8A0CFCE85C0F@yahoo.com> <3781CF46-C4F7-4579-8655-B7558B724C0A@yahoo.com> <20220922014500.GA46697@www.zefox.net> <20220925160531.GA63213@www.zefox.net> <20220925193415.GA63733@www.zefox.net> <0C5BA8D9-0EEB-421A-99E7-2E6F10D5D425@yahoo.com> <20220926010420.GA64437@www.zefox.net> 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 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Rspamd-Queue-Id: 4Mbq3w4kgPz3Fn6 X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=none (mx1.freebsd.org: domain of fbsd@www.zefox.net has no SPF policy when checking 50.1.20.27) smtp.mailfrom=fbsd@www.zefox.net X-Spamd-Result: default: False [-1.06 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; AUTH_NA(1.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.96)[-0.961]; MID_RHS_WWW(0.50)[]; WWW_DOT_DOMAIN(0.50)[]; MIME_GOOD(-0.10)[text/plain]; MLMMJ_DEST(0.00)[freebsd-ports@freebsd.org,freebsd-arm@freebsd.org]; R_DKIM_NA(0.00)[]; FREEMAIL_TO(0.00)[yahoo.com]; ASN(0.00)[asn:7065, ipnet:50.1.16.0/20, country:US]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; TO_DN_ALL(0.00)[]; RCVD_COUNT_THREE(0.00)[3]; RCVD_TLS_LAST(0.00)[]; FROM_HAS_DN(0.00)[]; ARC_NA(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; R_SPF_NA(0.00)[no SPF record]; DMARC_NA(0.00)[zefox.net]; MID_RHS_MATCH_FROM(0.00)[] X-ThisMailContainsUnwantedMimeParts: N On Sun, Sep 25, 2022 at 09:47:55PM -0700, Mark Millard wrote: > > I'll note that: > > https://github.com/u-boot/u-boot/blob/master/include/configs/rpi.h > > shows it #defines some other CONFIG_... names, including > the one that my existing patch adjusts ( CONFIG_EXTRA_ENV_SETTINGS ). > This is at least suggestive. But it may be some other .h file > would have to be used instead. > Looking at root@pelorus:/usr/ports/sysutils/u-boot-rpi-arm64/work/u-boot-2022.04/configs # more rpi_arm64_defconfig CONFIG_ARM=y CONFIG_ARCH_BCM283X=y CONFIG_SYS_TEXT_BASE=0x00080000 CONFIG_SYS_MALLOC_F_LEN=0x2000 CONFIG_TARGET_RPI_ARM64=y CONFIG_ENV_SIZE=0x4000 CONFIG_DEFAULT_DEVICE_TREE="bcm2711-rpi-4-b" .... the entries in the file look to be of the right format, although it it's a .h file. Adding a few lines looks like an easy experiment, even if it's not the "correct" way. > > Going in a different direction: Having the RPi* firmware and > U-Boot load from a microsd card but the EFI material from > the USB media likely would do you no good. U-Boot would still > have to get the USB media working for its activity in order > for U-Boot to find and load the EFI material that is on the > USB media. It is the same problem again. > U-boot seems biased toward booting a microSD, which works very well. Given that the FreeBSD kernel seems to have no trouble with the disk, might it make sense to boot a small FreeBSD system from a microSD and then run some sort of single-user script to find and re-boot from the USB device? All the machinery of the kernel and system would be available to gather system information for the (re)-boot step. I originally thought that's how it would be done. However, I'm no programmer. As you've doubtless noticed 8-) It's roundabout, but u-boot seems to be a fairly black box. Great when it works, inscrutable when it doesn't. [snipped] > > The above does not have FreeBSD present and has made the EFI > material on the microsd card be not-found (via using the > efi_disabled directory name instead). This leads U-Boot to > find the EFI material on the USB media instead --where it > has the normal path related names. > Can you explain a little more how renaming /boot/efi to /boot/efi_disabled works? If that forces u-boot on the microSD card to search for usb devices again it might do the trick for me. Or, do I misunderstand your intent? Thanks for writing! bob prohaska