From nobody Mon Sep 19 22:15:53 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 4MWfC35VNVz4d2FF for ; Mon, 19 Sep 2022 22:15:59 +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 4MWfC242tZz49MF for ; Mon, 19 Sep 2022 22:15:58 +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 28JMFstw034106 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Mon, 19 Sep 2022 15:15:54 -0700 (PDT) (envelope-from fbsd@www.zefox.net) Received: (from fbsd@localhost) by www.zefox.net (8.16.1/8.15.2/Submit) id 28JMFr9k034105; Mon, 19 Sep 2022 15:15:53 -0700 (PDT) (envelope-from fbsd) Date: Mon, 19 Sep 2022 15:15:53 -0700 From: bob prohaska To: freebsd-arm@freebsd.org Cc: bob prohaska Subject: U-boot on RPI3, sees disk but won't boot it Message-ID: <20220919221553.GA33878@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 X-Rspamd-Queue-Id: 4MWfC242tZz49MF 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.09 / 15.00]; AUTH_NA(1.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-0.997]; NEURAL_HAM_MEDIUM(-0.99)[-0.993]; MID_RHS_WWW(0.50)[]; WWW_DOT_DOMAIN(0.50)[]; MIME_GOOD(-0.10)[text/plain]; MLMMJ_DEST(0.00)[freebsd-arm@freebsd.org]; R_DKIM_NA(0.00)[]; R_SPF_NA(0.00)[no SPF record]; ASN(0.00)[asn:7065, ipnet:50.1.16.0/20, country:US]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RCPT_COUNT_TWO(0.00)[2]; RCVD_COUNT_THREE(0.00)[3]; RCVD_TLS_LAST(0.00)[]; ARC_NA(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; FROM_HAS_DN(0.00)[]; DMARC_NA(0.00)[zefox.net]; TO_DN_SOME(0.00)[]; MID_RHS_MATCH_FROM(0.00)[] X-ThisMailContainsUnwantedMimeParts: N Dealing with a Pi3B running stable-13, current as of today. Root device is a USB hard drive on a powered hub, no microSD. About half the time it boots hands-off via power cycling or shutdown -r, other times it stops in u-boot reporting: U-Boot 2022.04 (Sep 05 2022 - 16:28:34 -0700) 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 This looks a bit strange, since u-boot was loaded from the USB disk.... Next: 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 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 At this point one can enumerate the USB devices: U-Boot> usb tree USB device tree: 1 Hub (480 Mb/s, 0mA) | U-Boot Root Hub | +-2 Hub (480 Mb/s, 2mA) | +-3 Vendor specific (12 Mb/s, 90mA) | FTDI FT232R USB UART AM00KE3E | +-4 Vendor specific (480 Mb/s, 2mA) | +-5 Hub (480 Mb/s, 100mA) | GenesysLogic USB2.1 Hub | +-6 Mass Storage (480 Mb/s, 500mA) U-Boot> 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. 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 discovery and boot. 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 problems. Thanks for reading, bob prohaska