From nobody Wed Sep 21 20:27:45 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 4MXqjQ4dGyz4cDnp for ; Wed, 21 Sep 2022 20:27:54 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic310-21.consmr.mail.gq1.yahoo.com (sonic310-21.consmr.mail.gq1.yahoo.com [98.137.69.147]) (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 4MXqjP4wzrz3kl8 for ; Wed, 21 Sep 2022 20:27:53 +0000 (UTC) (envelope-from marklmi@yahoo.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1663792071; bh=NFnGaQ1A4ZP4ofuWHcLYMNwayQQalL7VNGzdFsyRxSA=; h=From:Subject:Date:In-Reply-To:Cc:To:References:From:Subject:Reply-To; b=g5a4lIxTjIPpHItzd9cw1MKdhjTonT4gq/+U3HwE5DJPTHlq/Ucnu7CWwA72aeg2O1vN8vfdeJXhXdLWapF0FrEin8u3g6fWQJp63t90c9Wd/THuIznWqWnWgWqaB0RDrA4MmRBv7V112PiB4RZ5KmArjtOU2uONRypV3HSPO6x2FgtmQt+JqlLnz0cAoY29plIHMC0RpdXCazhAhOLpQz4++RmScVZzsXiuZ5tj/VXnh7ecyUJsN4vL85tNvMULD5swPSK7zNAr4SWHuxkvnz1VEW98xWrtyVmFd1A4XczMCsSbhjaP5Gkjr2jOQ/K52ik7nMMKd72cz+oyKiLTrg== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1663792071; bh=Ddkw9aRucaNiNpnEfRp+PbxQbq0Qtp8ugRsz0FTFA6w=;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sqc_FCVED7aTcZ4V1fms8A1K6XFNuCSe3OP8oIJmWMHaTz8BM9UmOWLUNXLab 2Z3h2rmcLQpM8m0rhRYtt0UUCyZx4jH_2JGJqd6h.hyDzTXYyXt5BD.bsTMKifM7nIb0ltB.Trlq S8cafoe0u.__AAV5LjmouUlL3CDoSwvpu1AnguzlVcUhjJocF430rYEmWFYi4h3G8K_mbpJlat9Q 9a_uZwICdT8KX911s2wrDtJUDR.xlmyMTqNuM9Jv3CW.I1OiDkfbMebzSgpMmqiQGmNpElncko0W OakEEJkBvs362yUImawse3d1nIE9ec9ekHB1hD1pitClMYthKCh5GVzwaFRLsQU0tvLe_Z2UaGuc iz61U8scgz2c_c.Vv4_KGmTqm0pOEQlyMj.mKoC73GsTqYkHACpCFLUayGlENMpr3bw.XrVWqwih 7nKrB4bzLObk0EzHAS1JydMaWViLMEfYvuB8HNR1VDcQNnsMmRpuJ9CS2agVT1W0AzOQjr11e80t 4tWzuceOQvXoSN6RxOwwdKfp_mBsS3Ux7X2Fv1zJQThtr3in2HFNGB5R8cILAqQIVZEcO4NyJKG6 2z._9Jw-- X-Sonic-MF: Received: from sonic.gate.mail.ne1.yahoo.com by sonic310.consmr.mail.gq1.yahoo.com with HTTP; Wed, 21 Sep 2022 20:27:51 +0000 Received: by hermes--production-bf1-64b498bbdd-tl26t (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID c5904217a6e0b218c0625561a168f8ac; Wed, 21 Sep 2022 20:27:47 +0000 (UTC) From: Mark Millard Message-Id: <3781CF46-C4F7-4579-8655-B7558B724C0A@yahoo.com> Content-Type: multipart/mixed; boundary="Apple-Mail=_5214F6BF-C69F-47AF-9598-756FEBEB5C6A" 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 Date: Wed, 21 Sep 2022 13:27:45 -0700 In-Reply-To: <5DB9C93B-B9E1-418D-ABA3-8A0CFCE85C0F@yahoo.com> Cc: freebsd-arm To: bob prohaska References: <20220919221553.GA33878@www.zefox.net> <9A2A4E83-22F2-4441-82BF-0B8E6718ED34@yahoo.com> <20220921154240.GA37735@www.zefox.net> <8CC2A42B-21AC-44C6-BD02-44D320CADF63@yahoo.com> <20220921175026.GA45144@www.zefox.net> <5DB9C93B-B9E1-418D-ABA3-8A0CFCE85C0F@yahoo.com> X-Mailer: Apple Mail (2.3654.120.0.1.13) X-Rspamd-Queue-Id: 4MXqjP4wzrz3kl8 X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=yahoo.com header.s=s2048 header.b=g5a4lIxT; dmarc=pass (policy=reject) header.from=yahoo.com; spf=pass (mx1.freebsd.org: domain of marklmi@yahoo.com designates 98.137.69.147 as permitted sender) smtp.mailfrom=marklmi@yahoo.com X-Spamd-Result: default: False [-3.42 / 15.00]; NEURAL_HAM_LONG(-1.00)[-0.999]; NEURAL_HAM_MEDIUM(-0.98)[-0.976]; NEURAL_HAM_SHORT(-0.95)[-0.948]; 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)[multipart/mixed,text/plain]; DWL_DNSWL_NONE(0.00)[yahoo.com:dkim]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; FROM_HAS_DN(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_TLS_LAST(0.00)[]; FREEMAIL_ENVFROM(0.00)[yahoo.com]; RCVD_IN_DNSWL_NONE(0.00)[98.137.69.147:from]; RCVD_COUNT_THREE(0.00)[3]; HAS_ATTACHMENT(0.00)[]; FREEMAIL_FROM(0.00)[yahoo.com]; ASN(0.00)[asn:36647, ipnet:98.137.64.0/20, country:US]; TO_DN_ALL(0.00)[]; RCPT_COUNT_TWO(0.00)[2]; DKIM_TRACE(0.00)[yahoo.com:+]; MIME_TRACE(0.00)[0:+,1:+,2:~]; FROM_EQ_ENVFROM(0.00)[]; MLMMJ_DEST(0.00)[freebsd-arm@freebsd.org] X-ThisMailContainsUnwantedMimeParts: N --Apple-Mail=_5214F6BF-C69F-47AF-9598-756FEBEB5C6A Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 On 2022-Sep-21, at 11:52, Mark Millard wrote: > On 2022-Sep-21, at 10:50, bob prohaska wrote: >=20 >> On Wed, Sep 21, 2022 at 09:17:31AM -0700, Mark Millard wrote: >>>=20 >>>> On Mon, Sep 19, 2022 at 05:26:08PM -0700, Mark Millard wrote: >>>>>=20 >>>>> 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. >>>>>=20 >>>>> 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: >>>>>=20 >>>>> # 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 >>>>>=20 >>>>=20 >>=20 >> I seem to have fumbled the attempt at replicating your patch. It's >> recognized but fails with: >>=20 >> =3D=3D=3D> Applying extra patch patches for = u-boot-rpi-arm64-2022.04_1 from = /usr/ports/sysutils/u-boot-rpi-arm64/files/ >> No such line 209 in input file, ignoring >> 1 out of 1 hunks failed--saving rejects to include/configs/rpi.h.rej >> =3D=3D=3D> FAILED Applying extra patch patch-include_configs_rpi.h >> =3D=3D=3D> FAILED to apply cleanly extra patch patch(es) = patch-include_configs_rpi.h >> *** Error code 1 >>=20 >> If I open the local patch with=20 >> vi = /usr/ports/sysutils/u-boot-rpi-arm64/files/patch-include_configs_rpi.h >> it's displayed as: >>=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 > The lines that begin with spaces should instead begin with > a space and then a tab instead. (Whitespace does not > necessarily survive unchanged through E-mail or such.) > The space is not from the patched file but the tab is: > the first column is a form of instruction indicating > what to do for the line. >=20 > There should be 2 more lines after the "BOOTENV" line. Each > has just one space. The 8 in "+210,8" indicates how many > lines below are for the specific line replacements. So > there should be 8 lines. The lines with the "+" then tab > sequence are new lines. The ones with a leading space > should have the text after the space matching the original > file content: no change but checks for matching context. > A "-" then tab line would be for deleting a line if it > matches. >=20 > Similar points go for the other two patches that I sent in > later E-mail. >=20 > I'm unsure about the "No such line 209 in input file, ignoring" > message details. But I'd not sorry until the patch file > is correct. >=20 >> The text was transferred from your email to vi using copy-paste.=20 >> The ports were updated last night, might that be the problem?=20 >> Prior to adding the new patch u-boot-rpi-arm64 built successfully. >=20 > My ports tree is as of: >=20 > # ~/fbsd-based-on-what-commit.sh -C /usr/ports/ > branch: main > merge-base: 7e8044bf1f9999f77ac2e1fc2e688df9250dc9ae > merge-base: CommitDate: 2022-09-13 06:28:06 +0000 > 7e8044bf1f99 (HEAD -> main, freebsd/main, freebsd/HEAD) = graphics/drm-510-kmod: Update to drm_v5.10.113_7 > n595518 (--first-parent --count for merge-base) >=20 > u-boot-rpi-arm64 has not changed since: >=20 > author Emmanuel Vadot 2022-05-02 = 15:15:40 +0000 > committer Emmanuel Vadot 2022-05-03 = 08:10:43 +0000 >=20 > u-boot-rpi3 has not changed since: >=20 > author Emmanuel Vadot 2022-05-02 = 15:15:40 +0000 > committer Emmanuel Vadot 2022-05-03 = 08:10:43 +0000 >=20 > u-boot-rpi4 has not changed since: >=20 > author Emmanuel Vadot 2022-05-02 = 15:15:40 +0000 > committer Emmanuel Vadot 2022-05-03 = 08:10:43 +0000 >=20 > u-boot master has not chnaged since: >=20 > author Tobias Kortkamp 2022-09-10 = 17:41:16 +0000 > committer Stefan E=C3=9Fer 2022-09-10 = 17:41:16 +0000 I used: tar -xf /usr/ports/distfiles/u-boot/u-boot-2022.04.tar.bz2 = u-boot-2022.04/include/configs/rpi.h to create a local u-boot-2022.04/include/configs/rpi.h in order to look at the modern file. The ENV_DEVICE_SETTINGS line from: #define CONFIG_EXTRA_ENV_SETTINGS \ "dhcpuboot=3Dusb start; dhcp u-boot.uimg; bootm\0" \ ENV_DEVICE_SETTINGS \ ENV_DFU_SETTINGS \ ENV_MEM_LAYOUT_SETTINGS \ BOOTENV appears to be at line 173. A correct patch file finds the matching lines despite the difference in line numbers, a difference that is not too large by its matching criteria (given correct text matches). The modern FreeBSD lists might allow text attachments so I'll try that publicly. (It still has the 210 line number.) =3D=3D=3D Mark Millard marklmi at yahoo.com --Apple-Mail=_5214F6BF-C69F-47AF-9598-756FEBEB5C6A Content-Disposition: attachment; filename=patch-include_configs_rpi.h Content-Type: application/octet-stream; x-unix-mode=0644; name="patch-include_configs_rpi.h" Content-Transfer-Encoding: 7bit --- 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=2000\0" \ + "usb_ready_retry=5\0" \ BOOTENV --Apple-Mail=_5214F6BF-C69F-47AF-9598-756FEBEB5C6A--