From nobody Tue Sep 27 21:33:42 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 4McXtg1tDTz4d0Bn; Tue, 27 Sep 2022 21:33:47 +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 4McXtd6hqlz4MPd; Tue, 27 Sep 2022 21:33:45 +0000 (UTC) (envelope-from fbsd@www.zefox.net) Received: from www.zefox.net (localhost [127.0.0.1]) by www.zefox.net (8.16.1/8.15.2) with ESMTPS id 28RLXhVP072865 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Tue, 27 Sep 2022 14:33:43 -0700 (PDT) (envelope-from fbsd@www.zefox.net) Received: (from fbsd@localhost) by www.zefox.net (8.16.1/8.15.2/Submit) id 28RLXhDX072864; Tue, 27 Sep 2022 14:33:43 -0700 (PDT) (envelope-from fbsd) Date: Tue, 27 Sep 2022 14:33:42 -0700 From: bob prohaska To: Klaus K??chemann Cc: freebsd-arm@freebsd.org, freebsd-ports@freebsd.org, uboot@freebsd.org Subject: Re: u-boot debug, was: Re: U-boot on RPI3, sees disk but won't boot it Message-ID: <20220927213342.GA72077@www.zefox.net> References: <5DB9C93B-B9E1-418D-ABA3-8A0CFCE85C0F@yahoo.com> <3781CF46-C4F7-4579-8655-B7558B724C0A@yahoo.com> <20220922014500.GA46697@www.zefox.net> <20220925160531.GA63213@www.zefox.net> <20220925193415.GA63733@www.zefox.net> <3D6CF13E-261D-41D2-AC5B-923C0BF54087@yahoo.com> <20220927160328.GA71742@www.zefox.net> <67C09E9F-AD1D-4D0D-9E6F-9C1B046D8952@googlemail.com> <4154AFCB-7428-4005-843A-4EF8C0EBCCB8@googlemail.com> 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 In-Reply-To: <4154AFCB-7428-4005-843A-4EF8C0EBCCB8@googlemail.com> X-Rspamd-Queue-Id: 4McXtd6hqlz4MPd X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=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 X-Spamd-Result: default: False [-1.08 / 15.00]; AUTH_NA(1.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-0.995]; NEURAL_HAM_LONG(-0.98)[-0.983]; MID_RHS_WWW(0.50)[]; WWW_DOT_DOMAIN(0.50)[]; MIME_GOOD(-0.10)[text/plain]; MLMMJ_DEST(0.00)[freebsd-arm@freebsd.org,freebsd-ports@freebsd.org,uboot@freebsd.org]; FREEMAIL_TO(0.00)[googlemail.com]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; R_DKIM_NA(0.00)[]; ASN(0.00)[asn:7065, ipnet:50.1.16.0/20, country:US]; TO_MATCH_ENVRCPT_SOME(0.00)[]; R_SPF_NA(0.00)[no SPF record]; RCVD_TLS_LAST(0.00)[]; FROM_HAS_DN(0.00)[]; ARC_NA(0.00)[]; RCVD_COUNT_THREE(0.00)[3]; RCPT_COUNT_THREE(0.00)[4]; DMARC_NA(0.00)[zefox.net]; TO_DN_SOME(0.00)[]; MID_RHS_MATCH_FROM(0.00)[] X-ThisMailContainsUnwantedMimeParts: N [sent also to uboot@freebsd.org. If that's verboten or needless please indicate] On Tue, Sep 27, 2022 at 08:33:33PM +0200, Klaus K??chemann wrote: > > > Am 27.09.2022 um 19:58 schrieb Klaus K??chemann : > > > > > >> Am 27.09.2022 um 18:03 schrieb bob prohaska : > >> > >> I did look at common/usb.c but it's far from obvious how one > >> can turn on the logging feature so as to report more errors > >> to the console. > > > > you can add the following to common/usb.c (e.g. insert in line 44): > > > > #define DEBUG > > > > -- > > > > that should then print out all debug functions inside the usb.c file to the console > > after recompilation of u-boot. > > > > Regards > > > > Klaus > > I saw there is /*#include */ available in usb.c > so you could also try to add : > > #define LOG_DEBUG > > to the common/usb.c file which should also then enable the debug functions > which then would be output in logging style. > > You will need the debug output to to narrow down the issue. > I tried running make clean, make extract, adding #define DEBUG and #define LOG_DEBUG at line 44 in common/usb.c, then running make from /usr/ports/sysutils/u-boot-rpi-arm64. The resulting u-boot.bin is still 582712 bytes, just as before. AIUI one effect of turning on debug is a larger executable, so it appears I'm doing something wrong or those changes alone aren't sufficient. > just a guess : > electrical problem(of the Pi itself) which could perhaps be fixed by manipulating the scan delay time . > Power issues don't seem prevalanet. Voltage at both the Pi3 and hub USB ports is never below 5.0 volts, usually around 5.15, with 5.0 at the time of power-on and probably POST. I also replaced the powered hub with a second, nominally identical, unit. That helped, shutdown -r worked 8 tries out of 11. This with U-Boot 2020.10 (Mar 04 2021 - 04:32:31 +0000) Switching to a recent u-boot-rpi-arm64 seemed to make matters much worse. Went back to the older version of u-boot. It's tempting to say the switch is the problem, but the disk holding -current from which I copied the old u-boot booted reliably using the Pi3 and its previous hub and power supply. That's where my question of supporting files came from. Right now the stable-13 disk has an added FORCE_TURBO=1 in config.txt, which seems to help. The rest of the files in /booto/msdos are as provided in the original image file. Do any of them, beyond config.txt, have an effect on u-boot's behavior? Thanks for reading! bob prohaska >