From nobody Wed Dec 06 20:23:22 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 4Slpkx11n9z52vm9 for ; Wed, 6 Dec 2023 20:23:37 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic313-20.consmr.mail.gq1.yahoo.com (sonic313-20.consmr.mail.gq1.yahoo.com [98.137.65.83]) (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 4Slpkw5d2gz3NkB for ; Wed, 6 Dec 2023 20:23:36 +0000 (UTC) (envelope-from marklmi@yahoo.com) Authentication-Results: mx1.freebsd.org; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1701894215; bh=bq/ZNi9UiajzOs4v/EIpJZx+Yp64BZqZKWGrd2BeHac=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From:Subject:Reply-To; b=Ju9ZnQRvvl71ccYj3kkkNVQWXdHFjEfDP5cQmFEi3b1HA+3KxdVImy3VlHRi/gZkeadeMw8YQCFdXJlAM566uj4Fi+Lu0ZBMZBXEZxQlHYegOESTb736sNauuSLGVER21RW2udxy0W5DrCmqK4uQN8JSbOJAiufcb15CXYsuDhITekWH9m9P//JWLZou/H9bCy+WgDhh8cZURxqlW7l81Abgg0W10ku2/NhQkE8D65xpQT+1/6ostJH5VNsa28M6JsiiWlsKWhChsDdPs6mT2k/aedtM99JY9MEdvbfvI1tm5B4lzwb9rqibDAYlUyHoudg/+psJN5N9u1LrVdUJtg== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1701894215; bh=zxN9P9BsicIY00HwkTyrO0IEcyY0dLvupWth6CuU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W9.fhTR8pGD.PA6MXdf0Tg5npsFIARH5_YSf2BknCreZddcDQoHkg5CtGF43EoR6gn27W1Y loQDxB1DsKWS25Imyly5YOZJH0WJpFqszhdUEEbddk6OIFxIPj3HibaOScR7Myn7LsIbJtDxbhiu Lgb5gqfueQJu3en_VrwzLd6wn4VF74.zRUUzxa3Mjq86NhaEzk.54uo6ZTU4qNNUpNqbesJoIHxw cjB9oR8tq2ab_fmVrfdCV_GaOUwOXWlI7zphFz9FHinemAAGVRYRPtXmYaBG2ihZxDzNIe2M9X4r 9wyvRMxIHOgBrQ4rdmglEunWj.TPfPPSo6j4iclYk.lr8LDESOd6EvbMouOnVZRQivx83pgjsDpF VXHgeQF.Wt7VDXKVaFKJpla88_ME6e8mRNB7z3p.Da2vroPxPf6I0Y5tilZ0ky2Yj3dzs_65fbZg Uu3l3SsIsGHafq6DPB.yNGlxJLXZh3fhbADu1RLBkAxfBw20VZ6Ms69kUo8Ua.66wh_S2kJasQhU MnKF8B.aCPVqHCMTcx_yia2lFMjAdEmjIB_9m7Gtss8VopmyqcZsocTVFVAiEYpyBnqEsKdvAaNG aNg-- X-Sonic-MF: X-Sonic-ID: b5e15118-b82f-45a3-a9b8-d2512d5ffeae Received: from sonic.gate.mail.ne1.yahoo.com by sonic313.consmr.mail.gq1.yahoo.com with HTTP; Wed, 6 Dec 2023 20:23:35 +0000 Received: by hermes--production-gq1-64499dfdcc-95tsn (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID 45abd471dbfb00642a372c5dec981b2f; Wed, 06 Dec 2023 20:23:32 +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 16.0 \(3774.200.91.1.1\)) Subject: Re: RPi2 USB boot problems, maybe hardware? From: Mark Millard In-Reply-To: Date: Wed, 6 Dec 2023 12:23:22 -0800 Cc: freebsd-arm@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: References: To: bob prohaska X-Mailer: Apple Mail (2.3774.200.91.1.1) X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:36647, ipnet:98.137.64.0/20, country:US] X-Spamd-Bar: ---- X-Rspamd-Queue-Id: 4Slpkw5d2gz3NkB On Dec 6, 2023, at 08:19, bob prohaska wrote: > 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. You missed a stage in that description, more software is involved: A) bootcode.bin loads and starts the (other) RPi* firmware from the EFI partition B) That (other) RPi* firmware in turn, eventually, finds, loads, and starts U-Boot. You have not reported on the (other) RPi* firmware version that is in use. Technically, you might have a different vintage of bootcode.bin on the microsd card. I'll note that I've not done any RPi*-firmware/U-Boot/FreeBSD-loader/FreeBSD kernel combination checking in a long time. > U-boot > fails to find the hard disk. I've not intentionally changed U-boot. Has the FreeBSD port been updated since you last updated U-Boot? Do modern armv7 snapshots still use the same U-Boot vintage that you have in place? Again, I've not done any testing/tracking in some time. > Sometimes repeated power cycles induce the Pi to boot successfully > and I'm starting to wonder if there's a hardware problem. >=20 > The serial console reports >=20 > *** FINAL System shutdown message from bob@www.zefox.com *** = =20 >=20 > System going down IMMEDIATELY = =20 >=20 >=20 > Dec 6 07:29:31 www shutdown[61398]: reboot by bob:=20 > 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 >=20 > 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 ...=20 >=20 > U-Boot 2023.07.02 (Aug 25 2023 - 05:50:16 +0000) That provides the U-Boot vintage but not the RPI* firmware vintage. > 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!? Does the above message appear when it manages to boot? Only when it later fails to find the disk? That message may be the earliest visible evidence of whatever the actual problem is. > 1 USB Device(s) found > scanning usb for storage devices... 0 Storage Device(s) found I have boot devices for which I end up using the combination: usb_pgood_delay being 2000 usb_ready_retry being 5 in order to avoid such usually or always happening. (It is possible that usb_pgood_delay alone would be sufficient in my context with such.) > Hit any key to stop autoboot: 0=20 > U-Boot> usb tree > USB device tree: > 1 Hub (480 Mb/s, 0mA) > U-Boot Root Hub=20 >=20 > U-Boot>=20 >=20 > The failure to enumerate more USB devices seems odd. The prior message: scanning bus usb@7e980000 for devices... cannot reset port 1!? may imply that such is not odd at this point. > Issuing a reset command, or usb reset, results in a hang. Again, possibly related to the message. > The red LED remains on. It does seem possible to explore with > u-boot commands that don't involve resetting. For example, the=20 > usb tree command. >=20 > Are there any u-boot commands that might shed light on what's wrong?=20= >=20 > 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. >=20 > During the successful power-up u-boot reports=20 > ... > starting USB... > Bus usb@7e980000: USB DWC2 > scanning bus usb@7e980000 for devices... unable to get device = descriptor (error=3D-22) So, no: scanning bus usb@7e980000 for devices... cannot reset port 1!? message in this example. Any USB issues after that message (unless power has been cycled) may just be later consequences that do not contribute much more information. I've no clue how to figure out what leads to the message being generated. > 5 USB Device(s) found > scanning usb for storage devices... 1 Storage Device(s) found > Hit any key to stop autoboot: 0=20 > .... >=20 > No USB connections were changed between the start attempts. >=20 > Once up the machine seems quite stable, building world slowly > but reliably. =3D=3D=3D Mark Millard marklmi at yahoo.com