From nobody Tue Sep 27 20:36:05 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 4McWcG1zvLz4csL4 for ; Tue, 27 Sep 2022 20:36:14 +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 4McWcF2tpgz4GHB for ; Tue, 27 Sep 2022 20:36:13 +0000 (UTC) (envelope-from marklmi@yahoo.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1664310972; bh=FIe39gqCmxqIY9dmfgTFL6Ge+c+FB0OlbAoaKewC7+g=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From:Subject:Reply-To; b=J459nPD+frlYPLUZMz4Npz7iKoncALUQdCnq92xrSZDHexj9OBrGLOTOc0mmuPYWT7BQGZZM0jP0Cx3c3Evh43z9wDlwsRPhx6CFemwWgBqKJaUGM1S+n21IIEbn5BvHzs9JlQz6216Ger7eyT3aYjV1nPIRcHAAo1OsjeMIMqOBcfbsb42Z+PZEC3+WaQbOAfI1Vc27kPHyZjN7taNHIpTe8wGpVBj2hJ2qgo0HPNl7YPMcEIfpRFICrql44YywFiTXr1nCb/WR3SbyaPidMGEeVWyBOk1njOz04FckBj2H0gWx+W2BxXG3/jFUgTJweOFzUGU4WkV7qjbzZZgPNg== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1664310972; bh=kPiH3J7EjDOT5UKa24RPVJA4klL5my2UHnPkAClegRs=; h=X-Sonic-MF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aZ4833AjetalAuh5L Aa7rcESjuAx2LN5_oflWKh45jxkRG7.K2w2us1tUdg7iA99ogJ9QBdu_kcWsn7pePHd21gkNsKGS iaX0zh0se67DjMQ1ydm2uZBPBMQ5XFyeRIlp0MjYDp.UhuUDKU66hYIhBVBsrl4HjeeYCjdf4Mpj EEaX_s76G_g.I2Z_xPqJmnVw0gxeWMrmgGq6IxKU..CMrTKrA8I2vWRzC4FaW6ChzLHFtn16M5Ww WMaqwqU1XPjWrZohAHjhzMXbm8TlYf97Z7JtNdWlji3cHnFPeskbTTJx8EXWL8iqpKO5QITJVnKp ABvbxGiniAn3QriroH135980siYnJ6AgQ8.kcTFVKNQBDCho2FPRoqODfAY6tv7R.8uJB2iG7h4A MwGpCM0xf4JmyxC.knclW7VWq9rpJA4s6mUegIQu5Va0L8nKgT4W0fwA6BWFLaRCT6UvtPmqkAW0 b3vn1HNEtDfgiS4iTrDZShYuMZFC8AMou_dOtxI3guiODgDYaSVrAVqLkr9raXpul9uzjw.g6.fX iYF9q8g-- X-Sonic-MF: Received: from sonic.gate.mail.ne1.yahoo.com by sonic310.consmr.mail.gq1.yahoo.com with HTTP; Tue, 27 Sep 2022 20:36:12 +0000 Received: by hermes--production-bf1-759bcdd488-2jz9z (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID bac2736957376163bd7e4836a84f0cfc; Tue, 27 Sep 2022 20:36:08 +0000 (UTC) Content-Type: text/plain; charset=utf-8 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 \(3696.120.41.1.1\)) Subject: Re: u-boot debug, was: Re: U-boot on RPI3, sees disk but won't boot it From: Mark Millard In-Reply-To: <61CFA9D4-8DFD-41C5-A2B4-E5B3CD78C327@yahoo.com> Date: Tue, 27 Sep 2022 13:36:05 -0700 Cc: freebsd-arm , =?utf-8?Q?Klaus_K=C3=BCchemann?= Content-Transfer-Encoding: quoted-printable Message-Id: <650FD030-783D-46C4-8CC9-50D608569898@yahoo.com> References: <20220921154240.GA37735@www.zefox.net> <8CC2A42B-21AC-44C6-BD02-44D320CADF63@yahoo.com> <20220921175026.GA45144@www.zefox.net> <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> <9A3609DF-D873-4712-A61D-C351C162EF2A@googlemail.com> <61CFA9D4-8DFD-41C5-A2B4-E5B3CD78C327@yahoo.com> To: bob prohaska X-Mailer: Apple Mail (2.3696.120.41.1.1) X-Rspamd-Queue-Id: 4McWcF2tpgz4GHB X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=yahoo.com header.s=s2048 header.b=J459nPD+; 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.50 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-1.000]; MV_CASE(0.50)[]; DMARC_POLICY_ALLOW(-0.50)[yahoo.com,reject]; R_DKIM_ALLOW(-0.20)[yahoo.com:s=s2048]; R_SPF_ALLOW(-0.20)[+ptr:yahoo.com]; MIME_GOOD(-0.10)[text/plain]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; RCVD_VIA_SMTP_AUTH(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; ARC_NA(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[98.137.69.147:from]; DWL_DNSWL_NONE(0.00)[yahoo.com:dkim]; ASN(0.00)[asn:36647, ipnet:98.137.64.0/20, country:US]; MLMMJ_DEST(0.00)[freebsd-arm@freebsd.org]; TO_DN_ALL(0.00)[]; RCVD_COUNT_THREE(0.00)[3]; FREEMAIL_FROM(0.00)[yahoo.com]; MID_RHS_MATCH_FROM(0.00)[]; DKIM_TRACE(0.00)[yahoo.com:+]; RCVD_TLS_LAST(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; FREEMAIL_ENVFROM(0.00)[yahoo.com]; MIME_TRACE(0.00)[0:+]; FREEMAIL_CC(0.00)[freebsd.org,googlemail.com] X-ThisMailContainsUnwantedMimeParts: N On 2022-Sep-27, at 13:06, Mark Millard wrote: > On 2022-Sep-27, at 12:48, Klaus K=C3=BCchemann = wrote: >=20 >> Am 27.09.2022 um 21:20 schrieb Mark Millard : >>>=20 >>> On 2022-Sep-27, at 11:33, Klaus K=C3=BCchemann = wrote: >>>=20 >>>=20 >>>>> Am 27.09.2022 um 19:58 schrieb Klaus K=C3=BCchemann = : >>>>>=20 >>>>>=20 >>>>>> Am 27.09.2022 um 18:03 schrieb bob prohaska : >>>>>>=20 >>>>>> 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. >>>>>=20 >>>>> you can add the following to common/usb.c (e.g. insert in line = 44): >>>>>=20 >>>>> #define DEBUG >>>>>=20 >>>>> -- >>>>>=20 >>>>> that should then print out all debug functions inside the usb.c = file to the console=20 >>>>> after recompilation of u-boot. >>>>>=20 >>>>> Regards >>>>>=20 >>>>> Klaus >>>>=20 >>>> I saw there is /*#include */ available in usb.c=20 >>>> so you could also try to add : >>>>=20 >>>> #define LOG_DEBUG >>>>=20 >>>> to the common/usb.c file which should also then enable the debug = functions >>>> which then would be output in logging style. >>>>=20 >>>> You will need the debug output to to narrow down the issue. >>>>=20 >>>> just a guess :=20 >>>> electrical problem(of the Pi itself) which could perhaps be fixed = by manipulating the scan delay time . >>>=20 >>> Looks to me like: >>>=20 >>> https://github.com/u-boot/u-boot/blob/master/common/usb_hub.c >>>=20 >>> might be relevant, not just: >>>=20 >>> https://github.com/u-boot/u-boot/blob/master/common/usb.c >>>=20 >>>=20 >>> For example, usb_hub.c is where usb_pgood_delay is involved. >>> (My patch to enable my boot media assigns that, not that >>> such helped Bob.) >>>=20 >>> But I've not been able to uniquely identify all the specific >>> identifiers for all the (relevant) "usb boot scan delays", >>> although I'd expect that pgood_delay (and its usb_pgood_delay) >>> would be considered an example. >>>=20 >>> =3D=3D=3D >>> Mark Millard >>> marklmi at yahoo.com >>=20 >> good idea, >> I would then suggest to enable debug also in common/usb_hub.c >> by adding #define DEBUG or #define LOG_DEBUG .. >>=20 >> for the usb.c I=E2=80=99d expect something from the mdelay function = as an usb scan timer.. >> so let=E2=80=99s see what debug logs usb.c & usb_hub.c will spit = out .. >=20 > I'm not sure it would be relevant, there is also: >=20 > https://github.com/u-boot/u-boot/blob/master/common/usb_storage.c >=20 > But , unlike usb_pgood_delay that I recognized and it > being in usb_hub.c , I've no specific identification > of something relevant from usb_storage.c . Also, it looks like having LOG_DEBUG force DEBUG is a recent change for: https://github.com/u-boot/u-boot/commits/master/include/log.h Commits on Jul 26, 2022 log: force DEBUG when LOG_DEBUG is activated=20 So, for the vintage of U-Boot source that the u-boot ports are based on, DEBUG would need to be separately defined. The logic in question in the modern log.h requires LOG_DEBUG to be defined before the: #include include/log.h @@ -194,6 +194,9 @@ int _log_buffer(enum log_category_t cat, enum = log_level_t level, #ifdef LOG_DEBUG #define _LOG_DEBUG LOGL_FORCE_DEBUG #ifndef DEBUG #define DEBUG #endif #else #define _LOG_DEBUG 0 #endif The inner #ifndef DEBUG related 3 lines are the new code. So it may be best to always #define LOG_DEBUG in whatever *.c file(s) before the line with: #include Even the old logic indicates such ( _LOG_DEBUG handling ). =3D=3D=3D Mark Millard marklmi at yahoo.com