From nobody Tue Sep 20 00:26:08 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 4MWj5R5p9Pz4cPFJ for ; Tue, 20 Sep 2022 00:26:19 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic312-25.consmr.mail.gq1.yahoo.com (sonic312-25.consmr.mail.gq1.yahoo.com [98.137.69.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 4MWj5Q5qvDz4JtH for ; Tue, 20 Sep 2022 00:26:18 +0000 (UTC) (envelope-from marklmi@yahoo.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1663633575; bh=+Mbk9AHxLeJlEvczBiWfcRPZ33JBOSYqWzHUTkLw0QA=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From:Subject:Reply-To; b=moI9dHydM6pTz5qcc+QFvBVYncvqoV3zxQvyqxMBNJ1942U/Gw5TQiXTVypUaXJkryANgfLBHeb23HuODN60e9nEKNg5WGufw2al8cyE9pVNewFpI4/3l5HEwQ3/aMKstVoRo4rnqMI3OXskR9ExJIPzhHTaTYfDJxRRDisxI/H+tA4vNsPqOyLjiAjqa+h0cXC3gDcS0EXS5BAVKsikjVymgeQdlXxDT0HjVhAAQ7v5YDDixdkDhYp05Why+KkDH4YOIwckUazTQ5sBKFzJKyJW81gr3P/WRffkbDIQJkXTmYv3GDSONkGfzIRlP1ZzQBhTFWX1c9nUT9L2XpobZg== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1663633575; bh=G6oiGiAFRlYEvFN+NpdypoAM3l6dU27zlz3WZeHq27x=; h=X-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9GJtUXUAw7930XJI8DT8rFPFqhrV9KF9lSDDR7DGy92KjM3sjwh4kas 0pOCTFV_vxFuMseqK2qEPnq4KHWnqWqd9sveybwztYnX21RFgkQ0FFw5FxnKN5RBMd6VMb9.eKSg zur7GiS3Z7bFqL.ihRxvoHXPdqYRjrN7W.J4DrC3wBzVApQzq1kTOw1gDKxd4wXJegUkFVnlgpCn RIaqbUfxeBO6PXQi2NGbI_oUrOd6Mv48EtVtix2HYDC9LHFN3PI9e2anBRWvVAT7TRa2h_WbVzFH c5p.lM1IT7aiZ4THpx9WBb6q6baNMPoJKiVB7EhAdN1_YErAfCyzJZd24S1puoI0s5tSw3VxaG0S sYyk__12w8gSB3yGw0kzaEPEjzmt2g4rtQG18pgt4JFSMs8TjNrIbe1jOz84Kd_.BkWISxUQfExo 1k1OKV8_VzAzbduAQpLHoEbDokgtQAEtJmNiR44Ca5.klsv7l8.5yeiT7FyjIBSMCdNNV8A6_piE YAOWK5RWFBwJzzD2vSaiKwgcxPeF8GpGoR4XQuy18Dhs34yUyKhOANjVA0x2ZCKIuPkGhzpEmWLx Q6WM- X-Sonic-MF: Received: from sonic.gate.mail.ne1.yahoo.com by sonic312.consmr.mail.gq1.yahoo.com with HTTP; Tue, 20 Sep 2022 00:26:15 +0000 Received: by hermes--production-ne1-544744cc75-mbjj6 (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID 494ae54db8e2e99bcb020b33f491467b; Tue, 20 Sep 2022 00:26:10 +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 14.0 \(3654.120.0.1.13\)) Subject: Re: U-boot on RPI3, sees disk but won't boot it From: Mark Millard In-Reply-To: <20220919221553.GA33878@www.zefox.net> Date: Mon, 19 Sep 2022 17:26:08 -0700 Cc: freebsd-arm Content-Transfer-Encoding: quoted-printable Message-Id: <9A2A4E83-22F2-4441-82BF-0B8E6718ED34@yahoo.com> References: <20220919221553.GA33878@www.zefox.net> To: bob prohaska X-Mailer: Apple Mail (2.3654.120.0.1.13) X-Rspamd-Queue-Id: 4MWj5Q5qvDz4JtH X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=yahoo.com header.s=s2048 header.b=moI9dHyd; dmarc=pass (policy=reject) header.from=yahoo.com; spf=pass (mx1.freebsd.org: domain of marklmi@yahoo.com designates 98.137.69.206 as permitted sender) smtp.mailfrom=marklmi@yahoo.com X-Spamd-Result: default: False [-3.39 / 15.00]; NEURAL_HAM_LONG(-0.99)[-0.995]; NEURAL_HAM_MEDIUM(-0.95)[-0.953]; NEURAL_HAM_SHORT(-0.94)[-0.943]; 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.206: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.206:from] X-ThisMailContainsUnwantedMimeParts: N On 2022-Sep-19, at 15:15, bob prohaska wrote: > Dealing with a Pi3B running stable-13, current as of today. >=20 > Root device is a USB hard drive on a powered hub, no microSD. >=20 > About half the time it boots hands-off via power cycling or > shutdown -r, other times it stops in u-boot reporting: >=20 > U-Boot 2022.04 (Sep 05 2022 - 16:28:34 -0700) >=20 > DRAM: 948 MiB > RPI 3 Model B (0xa02082) > Core: 69 devices, 10 uclasses, devicetree: board > MMC: mmc@7e300000: 2 > Loading Environment from FAT... In: serial > Out: vidconsole > Err: vidconsole > Net: No ethernet found. > starting USB... > Bus usb@7e980000: USB DWC2 > scanning bus usb@7e980000 for devices... 6 USB Device(s) found > scanning usb for storage devices... 0 Storage Device(s) found >=20 > This looks a bit strange, since u-boot was loaded from the USB = disk.... I have 2 directions for this . . . #0: U-Boot resets the bus, re-enumerates the devices, etc. This can time out or otherwise fail despite prior activity by the RPi* firmware that managed to use the device. My NVMe USB SSD media have such issues with RPI4B's, also getting 0 found in U-Boot. This is why I build U-Boot using the patch: # more = /usr/ports/sysutils/u-boot-rpi-arm64/files/patch-include_configs_rpi.h=20= --- include/configs/rpi.h.orig 2022-01-22 06:03:55.862541000 -0800 +++ include/configs/rpi.h 2022-01-22 06:03:05.435341000 -0800 @@ -210,6 +210,8 @@ ENV_DEVICE_SETTINGS \ ENV_DFU_SETTINGS \ ENV_MEM_LAYOUT_SETTINGS \ + "usb_pgood_delay=3D2000\0" \ + "usb_ready_retry=3D5\0" \ BOOTENV =20 =20 It may well be that the Samsung T7 Touch's are outside of the USB specifications in some way that requires such. I can not claim that U-Boot is wrong relative to the specifications. It is just that the adjustment is needed for my media. #1: I'm unsure if this applies to more than RPi4B's and the like . . . Booting an RPi* can have the clock speed(s) vary during booting and this can mess up timeouts/waits/etc. during booting, timing too early, for example. I use one of: init_turbo=3D60 # or other sufficient number of seconds or, if I'm always after turbo mode for general operation, force_turbo=3D1 in config.txt to avoid the failure. On the RPi4B's I have to boot based on both #0 and #1 being in place. Either not being in place can lead to the 0 found status. A powered hub being involved adds complications not invovled in my context. > Next: >=20 > MMC Device 0 not found > no mmc device at slot 0 > MMC Device 1 not found > no mmc device at slot 1 > Card did not respond to voltage select! : -110 >=20 > Device 0: unknown device > missing environment variable: pxeuuid > Retrieving file: pxelinux.cfg/01-b8-27-eb-ba-68-d5 > Retrieving file: pxelinux.cfg/00000000 > Retrieving file: pxelinux.cfg/0000000 > Retrieving file: pxelinux.cfg/000000 > Retrieving file: pxelinux.cfg/00000 > Retrieving file: pxelinux.cfg/0000 > Retrieving file: pxelinux.cfg/000 > Retrieving file: pxelinux.cfg/00 > Retrieving file: pxelinux.cfg/0 > Retrieving file: pxelinux.cfg/default-arm-bcm283x-rpi > Retrieving file: pxelinux.cfg/default-arm-bcm283x > Retrieving file: pxelinux.cfg/default-arm > Retrieving file: pxelinux.cfg/default > Config file not found >=20 > At this point one can enumerate the USB devices: >=20 > U-Boot> usb tree > USB device tree: > 1 Hub (480 Mb/s, 0mA) > | U-Boot Root Hub=20 > | > +-2 Hub (480 Mb/s, 2mA) > | > +-3 Vendor specific (12 Mb/s, 90mA) > | FTDI FT232R USB UART AM00KE3E > | =20 > +-4 Vendor specific (480 Mb/s, 2mA) > | =20 > +-5 Hub (480 Mb/s, 100mA) > | GenesysLogic USB2.1 Hub=20 > | > +-6 Mass Storage (480 Mb/s, 500mA) >=20 > U-Boot>=20 >=20 > The obvious oddity is that clearly a mass storage device has > been found (indeed, u-boot was started from it) but u-boot > does not recognize it as the device to boot from.=20 What the RPi* firmware does to get U-Boot in place is not used by U-Boot for its activity. The RPi* firmware need not work the same as U-Boot, allowing for differing results. > So far it appears that rebooting from multi-user via shutdown -r > works about half the time. If the disk isn't recognized, an immediate > reset command usually ends the same way. Simply waiting for 15-30 > minutes before rebooting _usually_ results in successful disk=20 > discovery and boot.=20 >=20 > Can anyone suggest simple experiments that might shed light on > what's going on? The u-boot employed was compiled from ports > and system up to date at the time. The same type of disk on a > Pi4 running -current (no powered hub needed) boots without=20 > problems.=20 I warn that my notes above are based on RPi4B activity, not RPi3B use. Also, no power hub use is involved. How much applies to your context is a valid question. =3D=3D=3D Mark Millard marklmi at yahoo.com