Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 21 Sep 2022 13:27:45 -0700
From:      Mark Millard <marklmi@yahoo.com>
To:        bob prohaska <fbsd@www.zefox.net>
Cc:        freebsd-arm <freebsd-arm@freebsd.org>
Subject:   Re: U-boot on RPI3, sees disk but won't boot it
Message-ID:  <3781CF46-C4F7-4579-8655-B7558B724C0A@yahoo.com>
In-Reply-To: <5DB9C93B-B9E1-418D-ABA3-8A0CFCE85C0F@yahoo.com>
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>

next in thread | previous in thread | raw e-mail | index | archive | help

--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 <marklmi@yahoo.com> wrote:

> On 2022-Sep-21, at 10:50, bob prohaska <fbsd@www.zefox.net> 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 <manu@FreeBSD.org>	2022-05-02 =
15:15:40 +0000
> committer	Emmanuel Vadot <manu@FreeBSD.org>	2022-05-03 =
08:10:43 +0000
>=20
> u-boot-rpi3 has not changed since:
>=20
> author	Emmanuel Vadot <manu@FreeBSD.org>	2022-05-02 =
15:15:40 +0000
> committer	Emmanuel Vadot <manu@FreeBSD.org>	2022-05-03 =
08:10:43 +0000
>=20
> u-boot-rpi4 has not changed since:
>=20
> author	Emmanuel Vadot <manu@FreeBSD.org>	2022-05-02 =
15:15:40 +0000
> committer	Emmanuel Vadot <manu@FreeBSD.org>	2022-05-03 =
08:10:43 +0000
>=20
> u-boot master has not chnaged since:
>=20
> author	Tobias Kortkamp <tobik@FreeBSD.org>	2022-09-10 =
17:41:16 +0000
> committer	Stefan E=C3=9Fer <se@FreeBSD.org>	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--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3781CF46-C4F7-4579-8655-B7558B724C0A>