From nobody Thu Jul 7 10:40:14 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 B76423E34BD for ; Thu, 7 Jul 2022 10:40:45 +0000 (UTC) (envelope-from bproffit@amaranth.digital) Received: from mail.amaranth.digital (mail.amaranth.digital [66.23.237.42]) (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 did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4LdtGz4mVZz3RTv for ; Thu, 7 Jul 2022 10:40:43 +0000 (UTC) (envelope-from bproffit@amaranth.digital) Received: from [192.168.1.47] (unknown [73.83.240.71]) by mail.amaranth.digital (Postfix) with ESMTPSA id 29F70F9E45; Wed, 6 Jul 2022 23:42:12 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=amaranth.digital; s=amaranth; t=1657165338; bh=t+hVszL3XiN2mkenIEs0Q9KLoMW4RHHj3p9sJXs7ecc=; h=Date:Subject:From:To:References:In-Reply-To; b=YscWxhXU3pAK5NqNU0tMfaRIhgoAMGvFx31wl6o93xPUDJC/zEQKeTI+ftfbD1HqO 41FZoBdhQboPd6uhVLfqPN1NUkh3WLFbPg07UdscGiBbFC1XWZAitSfhfsiU6h8r4Q o5abjaob/y2B4frjvi4drJ/Tb5Q28QMLe85lfb/kQeol2TUC+aH8bp3Yu6HolQfoN/ X3n090q5M62h9GizdfOoXWmpyQPI3Srf9BLpkFL1BzsQhxCSsLsj3ifPD7zx8EWivF jdSRP0YaFug8OWGyIJNyGpUeR0hQwVZtgbYh+mfwcAv4Xkry5eq1y6uTB2wYMulSGI rP1OBj0SIRpZg== Content-Type: multipart/alternative; boundary="------------ZgxhFWtfVGAMAFdukIcJ3pSt" Message-ID: <9c50da19-a0ae-7865-7d27-7f40727ec1ee@amaranth.digital> Date: Thu, 7 Jul 2022 03:40:14 -0700 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 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.9.1 Subject: Re: U-Boot fails to load from SD when a USB dual HDD device is attached Content-Language: en-US From: Bradley Proffit To: Mark Millard , maciphone2@googlemail.com, warlock@phouka.net, freebsd-arm@freebsd.org References: <12609da5-c560-f336-762f-32fc5fa71d48@amaranth.digital> <17F5F696-A1D2-4952-9163-BF7D185B8A27@yahoo.com> <6494efb2-6eae-b297-a0f2-ebef158b3b23@amaranth.digital> In-Reply-To: <6494efb2-6eae-b297-a0f2-ebef158b3b23@amaranth.digital> X-Spam-Status: No, score=-2.8 required=10.0 tests=DATE_IN_FUTURE_06_12, HTML_MESSAGE,NICE_REPLY_A,RCVD_IN_DNSWL_HI,RCVD_IN_ZEN_BLOCKED_OPENDNS, RDNS_NONE,SPF_SOFTFAIL,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED, URIBL_DBL_BLOCKED_OPENDNS,URIBL_ZEN_BLOCKED_OPENDNS autolearn=ham autolearn_force=no version=3.4.5 X-Spam-Checker-Version: SpamAssassin 3.4.5 (2021-03-20) on mail.amaranth.digital X-Rspamd-Queue-Id: 4LdtGz4mVZz3RTv X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=pass header.d=amaranth.digital header.s=amaranth header.b=YscWxhXU; dmarc=pass (policy=none) header.from=amaranth.digital; spf=pass (mx1.freebsd.org: domain of bproffit@amaranth.digital designates 66.23.237.42 as permitted sender) smtp.mailfrom=bproffit@amaranth.digital X-Spamd-Result: default: False [-1.09 / 15.00]; DMARC_POLICY_ALLOW(-0.50)[amaranth.digital,none]; R_SPF_ALLOW(-0.20)[+a:mail.amaranth.digital]; R_DKIM_ALLOW(-0.20)[amaranth.digital:s=amaranth]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; NEURAL_HAM_SHORT(-0.09)[-0.090]; MLMMJ_DEST(0.00)[freebsd-arm]; FREEMAIL_TO(0.00)[yahoo.com,googlemail.com,phouka.net,freebsd.org]; FROM_EQ_ENVFROM(0.00)[]; ASN(0.00)[asn:19318, ipnet:66.23.224.0/20, country:US]; MIME_TRACE(0.00)[0:+,1:+,2:~]; RCVD_COUNT_TWO(0.00)[2]; RCVD_VIA_SMTP_AUTH(0.00)[]; DKIM_TRACE(0.00)[amaranth.digital:+]; TO_MATCH_ENVRCPT_SOME(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; ARC_NA(0.00)[]; RCVD_TLS_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; RECEIVED_SPAMHAUS_PBL(0.00)[73.83.240.71:received] X-ThisMailContainsUnwantedMimeParts: N This is a multi-part message in MIME format. --------------ZgxhFWtfVGAMAFdukIcJ3pSt Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Update: While the bug in question is not a FreeBSD-specific issue, I figured that I would share this update for anyone who might benefit. I have built U-Boot from the ports tree (sysutils/u-boot-rpi4) with the following changes: files/rpi4_fragment: * *CONFIG_USB=n* * *CONFIG_USB_HOST=n* * *CONFIG_USB_STORAGE=n* * *CONFIG_USB_XHCI_PCI=n* * *CONFIG_USB_XHCI_HCD=n** * * *CONFIG_CMD_USB=n* U-Boot gives an error message regarding the unavailable 'usb' command since it's been disabled and I didn't remove a reference to it from the startup script, but it booted up anyway. This workaround prevents the bug (if you don't use a USB boot device) while I wait for some feedback from the U-Boot project maintainers. On 6/29/22 22:17, Bradley Proffit wrote: > Thanks for the pointers, everyone. > > I confirmed that this particular USB device, being self-powered, is > not pulling a current on the pi's USB port. I think this rules out a > voltage problem. > > The U-Boot interactive shell still shows the MMC device, but refuses > to boot from it under these conditions. The one-liner workaround you > mentioned is unfortunately not resolving this problem. > > Until I can find time to try fixing the bug, I am building U-Boot > without support for USB storage devices and network booting, since I > don't need those features at this time. I'll let you know if that works. > > > Bradley > > On 6/29/22 9:29 AM, Mark Millard wrote: >> On 2022-Jun-29, at 07:35, Klaus Küchemann >> wrote: >> >>> On 2022-Jun-29, at 02:06, Bradley Proffit >>> wrote: >>> >>>> I'm running FreeBSD 13.1 on the Raspberry Pi 4B, with a new dual >>>> SATA-to-USB hard drive docking station, and I've noticed a peculiar >>>> situation: U-Boot fails to load FreeBSD from the SD card when the >>>> docking station is plugged in and has two hard drives in it >>>> (presenting two USB storage devices to U-Boot), but still succeeds >>>> when:  …………... >>> >>> >>>> Am 29.06.2022 um 16:09 schrieb Mark Millard : >>>> >>>> >>>> See: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=256441 >>>> >>>> The problem is not limited or specific to FreeBSD's use of >>>> U-Boot. For example, demonstrated with Fedora 33 and some >>>> openbsd version as well. The problem is not new. >>>> >>>> . . . >>> >>> didn`t we workaround a similar issue ? : >>> >>> https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=253983#c59 >> I forgot to look up and reference: >> >> https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=253983 >> >> as well. I should have listed both, for sure. >> >> === >> Mark Millard >> marklmi at yahoo.com >> Bradley Proffit amaranth.digital --------------ZgxhFWtfVGAMAFdukIcJ3pSt Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit

Update:

While the bug in question is not a FreeBSD-specific issue, I figured that I would share this update for anyone who might benefit.

I have built U-Boot from the ports tree (sysutils/u-boot-rpi4) with the following changes:

files/rpi4_fragment:

  • CONFIG_USB=n
  • CONFIG_USB_HOST=n
  • CONFIG_USB_STORAGE=n
  • CONFIG_USB_XHCI_PCI=n
  • CONFIG_USB_XHCI_HCD=n
  • CONFIG_CMD_USB=n

U-Boot gives an error message regarding the unavailable 'usb' command since it's been disabled and I didn't remove a reference to it from the startup script, but it booted up anyway.

This workaround prevents the bug (if you don't use a USB boot device) while I wait for some feedback from the U-Boot project maintainers.

On 6/29/22 22:17, Bradley Proffit wrote:
Thanks for the pointers, everyone.

I confirmed that this particular USB device, being self-powered, is not pulling a current on the pi's USB port. I think this rules out a voltage problem.

The U-Boot interactive shell still shows the MMC device, but refuses to boot from it under these conditions. The one-liner workaround you mentioned is unfortunately not resolving this problem.

Until I can find time to try fixing the bug, I am building U-Boot without support for USB storage devices and network booting, since I don't need those features at this time. I'll let you know if that works.


Bradley

On 6/29/22 9:29 AM, Mark Millard wrote:
On 2022-Jun-29, at 07:35, Klaus Küchemann <maciphone2@googlemail.com> wrote:

On 2022-Jun-29, at 02:06, Bradley Proffit <bproffit@amaranth.digital> wrote:

I'm running FreeBSD 13.1 on the Raspberry Pi 4B, with a new dual SATA-to-USB hard drive docking station, and I've noticed a peculiar situation: U-Boot fails to load FreeBSD from the SD card when the docking station is plugged in and has two hard drives in it (presenting two USB storage devices to U-Boot), but still succeeds when:  …………...


Am 29.06.2022 um 16:09 schrieb Mark Millard <marklmi@yahoo.com>:


See: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=256441

The problem is not limited or specific to FreeBSD's use of
U-Boot. For example, demonstrated with Fedora 33 and some
openbsd version as well. The problem is not new.

. . .

didn`t we workaround a similar issue ? :

https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=253983#c59
I forgot to look up and reference:

https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=253983

as well. I should have listed both, for sure.

===
Mark Millard
marklmi at yahoo.com

Bradley Proffit
amaranth.digital
--------------ZgxhFWtfVGAMAFdukIcJ3pSt--