Re: u-boot debug, was: Re: U-boot on RPI3, sees disk but won't boot it

From: Klaus_Küchemann <maciphone2_at_googlemail.com>
Date: Sun, 02 Oct 2022 19:35:42 UTC

> Am 02.10.2022 um 20:20 schrieb bob prohaska <fbsd@www.zefox.net>:
> 
> On Sat, Oct 01, 2022 at 02:21:42PM -0700, Mark Millard wrote:
>> 
>> http://nemesis.zefox.com/~fbsd/pelorus_console.txt7_orig_fragment
>> 
>> still shows all the debug output. It did not
>> avoid the timing changes.
>> 
>> You might need to not use either of:
>> 
>> patch-common_usb__hub.c
>> patch-common_usb__storage.c
>> 
>> and to disable the LOG_DEBUG and DEBUG lines in:
>> 
>> patch-common_usb.c
>> 
>> via turning them into comments by adding // as
>> indicated below:
>> 
>> +//#define LOG_DEBUG
>> +//#define DEBUG
>> 
> 
> I think the changes were successful, u-boot compiles and
> runs. There's no extra output, and unfortunately only one 
> successful reboot so far. Bus scanning seems quite slow.
> Storage devices are rarely found on reset, but usb reset
> does sometimes work. Run bootcmd_usb0 paused for minutes
> at Device 0: and paused again after reporting ..current device.
> No echo from the console, ctrl-C did nothing. 
> 
> The attempt sequence was
> SRBSPRMRPRRPUPPRRUPUCUUC
> where 
> S is shutdown -r
> R is reset of u-boot
> U is usb reset
> P is powercycle
> M is stop at mountroot
> C is run bootcmd_usb0
> 
> The console log is at
> http://nemesis.zefox.com/~fbsd/pelorus_console.txt8_no_debug
> 
> It now appears that the run bootcmd_usb0 rather reliably gets
> stuck, with the disk LED on steadily (no activity). Maybe in
> one of the loops seen earlier? 
> 
> Thanks again for all your help!
> 
> bob prohaska
> 


So if you now reapply the  #define DEBUG  patches(while keeping the mdelay-patch) and the reboot issues definitely went away
we have a typical so called Heisenbug, hopefully more or less  now a fixed issue.

Well, USB-boot problems on earlier Pi models( afaik all except the 4) are commonly known, from defective HW to power cycle issues we will find a lot of discussions on the WWW and we will see that even the debug-message „is your USB cable bad?“  did fix issues in some cases. Others applied RNG devices or external clock or even plugging a mouse fixed it( to change usb enumeration).

I think with the working u-boot.bin after 1500 successful reboots you can be sure it’s working ….
just kidding… :-)


Regards

Klaus