From nobody Wed Dec 06 16:19:16 2023 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 4SljK71Bbqz53dhf for ; Wed, 6 Dec 2023 16:19:23 +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 4SljK56HTsz4Svd for ; Wed, 6 Dec 2023 16:19:21 +0000 (UTC) (envelope-from fbsd@www.zefox.net) Authentication-Results: mx1.freebsd.org; dkim=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; dmarc=none Received: from www.zefox.net (localhost [127.0.0.1]) by www.zefox.net (8.17.1/8.15.2) with ESMTPS id 3B6GJGVH019319 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Wed, 6 Dec 2023 08:19:17 -0800 (PST) (envelope-from fbsd@www.zefox.net) Received: (from fbsd@localhost) by www.zefox.net (8.17.1/8.15.2/Submit) id 3B6GJGPt019318; Wed, 6 Dec 2023 08:19:16 -0800 (PST) (envelope-from fbsd) Date: Wed, 6 Dec 2023 08:19:16 -0800 From: bob prohaska To: freebsd-arm@freebsd.org Cc: bob prohaska Subject: RPi2 USB boot problems, maybe hardware? Message-ID: 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-Spamd-Result: default: False [0.28 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; SUBJECT_ENDS_QUESTION(1.00)[]; AUTH_NA(1.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.62)[-0.617]; WWW_DOT_DOMAIN(0.50)[]; MID_RHS_WWW(0.50)[]; MIME_GOOD(-0.10)[text/plain]; FROM_EQ_ENVFROM(0.00)[]; RCVD_TLS_LAST(0.00)[]; R_DKIM_NA(0.00)[]; R_SPF_NA(0.00)[no SPF record]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:7065, ipnet:50.1.16.0/20, country:US]; MLMMJ_DEST(0.00)[freebsd-arm@freebsd.org]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DMARC_NA(0.00)[zefox.net]; ARC_NA(0.00)[]; RCPT_COUNT_TWO(0.00)[2]; MID_RHS_MATCH_FROM(0.00)[]; TO_DN_SOME(0.00)[]; FROM_HAS_DN(0.00)[]; RCVD_COUNT_TWO(0.00)[2] X-Rspamd-Queue-Id: 4SljK56HTsz4Svd X-Spamd-Bar: / Since a recent build/install cycle a Pi2 v1.1 (armv7) has stopped booting stable/14. The machine uses bootcode.bin on the microSD, which finds and loads u-boot from the USB mechanical disk. U-boot fails to find the hard disk. I've not intentionally changed U-boot. Sometimes repeated power cycles induce the Pi to boot successfully and I'm starting to wonder if there's a hardware problem. The serial console reports *** FINAL System shutdown message from bob@www.zefox.com *** System going down IMMEDIATELY Dec 6 07:29:31 www shutdown[61398]: reboot by bob: Stopping apache24. Waiting for PIDS: 1093. Stopping cron. Waiting for PIDS: 1078, 1078. Stopping sshd. Waiting for PIDS: 1075. Stopping devd. Waiting for PIDS: 774. Writing entropy file: . Writing early boot entropy file: . Terminated . Dec 6 07:29:36 www syslogd: exiting on signal 15 Waiting (max 60 seconds) for system process `vnlru' to stop... done Waiting (max 60 seconds) for system process `syncer' to stop... Syncing disks, vnodes remaining... 3 2 0 0 done All buffers synced. Swap device da0s2b removed. Uptime: 14h16m14s Resetting system ... U-Boot 2023.07.02 (Aug 25 2023 - 05:50:16 +0000) DRAM: 948 MiB RPI 2 Model B (0xa21041) Core: 75 devices, 12 uclasses, devicetree: board MMC: mmc@7e300000: 1 Loading Environment from FAT... ** Bad device specification mmc 0 ** In: serial Out: vidconsole Err: vidconsole Net: No ethernet found. starting USB... Bus usb@7e980000: USB DWC2 scanning bus usb@7e980000 for devices... cannot reset port 1!? 1 USB Device(s) found scanning usb for storage devices... 0 Storage Device(s) found Hit any key to stop autoboot: 0 U-Boot> usb tree USB device tree: 1 Hub (480 Mb/s, 0mA) U-Boot Root Hub U-Boot> The failure to enumerate more USB devices seems odd. Issuing a reset command, or usb reset, results in a hang. The red LED remains on. It does seem possible to explore with u-boot commands that don't involve resetting. For example, the usb tree command. Are there any u-boot commands that might shed light on what's wrong? Depowring the Pi and external hub (along with the disk) and letting it sit for ten minutes allows the machine to reboot hands-off when power is applied to hub and Pi. During the successful power-up u-boot reports ... starting USB... Bus usb@7e980000: USB DWC2 scanning bus usb@7e980000 for devices... unable to get device descriptor (error=-22) 5 USB Device(s) found scanning usb for storage devices... 1 Storage Device(s) found Hit any key to stop autoboot: 0 .... No USB connections were changed between the start attempts. Once up the machine seems quite stable, building world slowly but reliably. Thanks for reading, any suggestions appreciated! bob prohaska