From nobody Tue Sep 27 21:59:22 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 4McYSG3B9mz4d2Y9 for ; Tue, 27 Sep 2022 21:59:26 +0000 (UTC) (envelope-from maciphone2@googlemail.com) Received: from mail-ej1-x62e.google.com (mail-ej1-x62e.google.com [IPv6:2a00:1450:4864:20::62e]) (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-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4McYSF5NKRz4P4J for ; Tue, 27 Sep 2022 21:59:25 +0000 (UTC) (envelope-from maciphone2@googlemail.com) Received: by mail-ej1-x62e.google.com with SMTP id dv25so23410840ejb.12 for ; Tue, 27 Sep 2022 14:59:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20210112; h=message-id:in-reply-to:to:references:date:subject:mime-version :content-transfer-encoding:from:from:to:cc:subject:date; bh=9Cgjf9gpsemmpTqFAwMGnlt4ANEh/qdz1I86Y3/pn+c=; b=B1Ub66Gsr/u3P751/+Swc1BupwlwOD0f5Fg4hgVhNN94MeUIOsctL6s7pLTlYdsJaZ Yb1dvwnPzYkuPHl3MEDkpm48DjrGzZs4P0+3q/3tJ9io9y3kYfM5LC/DWnR0D+vIj1rc QujckR5dkGiwNCZWfuYgh4DW9jH0uuGZizphld7ZqI49/HiAMj5XycekdQW2dv39A4R4 Y/O+OhzofVOf71EDSqHvJo48D0Mqsu0AXAoY2W1xI45Uo4uanzqxqHTxCwLN353Tato9 VrAcJhus9g0Rtoc06Abtq1mmdocy49m3cNRX20HmVtLqmzOZ1it5Vj1Jv/vHFbP8bRoy 3q6w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=message-id:in-reply-to:to:references:date:subject:mime-version :content-transfer-encoding:from:x-gm-message-state:from:to:cc :subject:date; bh=9Cgjf9gpsemmpTqFAwMGnlt4ANEh/qdz1I86Y3/pn+c=; b=FZa79XOm1bCLl51Zf8HjLkS+8nviniNDvNPN54AarGRBPGAKWZZnSPjyAoQrQ6T8z9 EfIsxOhF2pjv8LPX7GIQuBrf7mUye2OpmPQcF7jPY4Kzc5o0gT7RKiDm7fYf1jUe9+ti DK7wN2KtNp3k/+PwWEoPdC2V0DkA9mfbmr6AUujdlyYwjJWLhzkn+EmWgpJypXzaVrM3 CSnPDT8J64zzChRpwLgKtC60xc5ys7jlRDd2lRVM/BbKDOYic0TNVPkrIt0wsaAAfJNA r/UxC++xA4kqE5k9YRlWns0ct8X/PA9S35c1+9ST1muR2fBYgmH9zjnvrf3zF7MdrzLO 2EIA== X-Gm-Message-State: ACrzQf1aLj4nXmUFZBXeuSZ1apT282rPc+f+475oB/YaWZicuflnAs5Y nXjhkJrBYwSH6La5VZF8XJFqnBcepng= X-Google-Smtp-Source: AMsMyM6Ew4G5FGSnjqQjOz40dIzgdlho/FhTreAJwLx78o5aT8IR22YxvVPdWLcAB0aVPVulS+0bIw== X-Received: by 2002:a17:907:3f28:b0:781:e093:d0db with SMTP id hq40-20020a1709073f2800b00781e093d0dbmr24416548ejc.295.1664315964337; Tue, 27 Sep 2022 14:59:24 -0700 (PDT) Received: from smtpclient.apple (dynamic-046-114-185-233.46.114.pool.telefonica.de. [46.114.185.233]) by smtp.googlemail.com with ESMTPSA id k20-20020aa7d8d4000000b00457d9c16fb2sm545404eds.23.2022.09.27.14.59.23 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 27 Sep 2022 14:59:23 -0700 (PDT) From: =?utf-8?Q?Klaus_K=C3=BCchemann?= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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 Date: Tue, 27 Sep 2022 23:59:22 +0200 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> <20220927213342.GA72077@www.zefox.net> To: bob prohaska , Mark Millard , freebsd-arm@freebsd.org In-Reply-To: <20220927213342.GA72077@www.zefox.net> Message-Id: X-Mailer: Apple Mail (2.3696.120.41.1.1) X-Rspamd-Queue-Id: 4McYSF5NKRz4P4J X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=googlemail.com header.s=20210112 header.b=B1Ub66Gs; dmarc=pass (policy=quarantine) header.from=googlemail.com; spf=pass (mx1.freebsd.org: domain of maciphone2@googlemail.com designates 2a00:1450:4864:20::62e as permitted sender) smtp.mailfrom=maciphone2@googlemail.com X-Spamd-Result: default: False [-3.49 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-0.999]; NEURAL_HAM_SHORT(-0.99)[-0.991]; MV_CASE(0.50)[]; DMARC_POLICY_ALLOW(-0.50)[googlemail.com,quarantine]; R_DKIM_ALLOW(-0.20)[googlemail.com:s=20210112]; R_SPF_ALLOW(-0.20)[+ip6:2a00:1450:4000::/36]; MIME_GOOD(-0.10)[text/plain]; ARC_NA(0.00)[]; FROM_HAS_DN(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; DWL_DNSWL_NONE(0.00)[googlemail.com:dkim]; RCPT_COUNT_THREE(0.00)[3]; TO_MATCH_ENVRCPT_SOME(0.00)[]; PREVIOUSLY_DELIVERED(0.00)[freebsd-arm@freebsd.org]; MID_RHS_MATCH_FROM(0.00)[]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US]; RCVD_IN_DNSWL_NONE(0.00)[2a00:1450:4864:20::62e:from]; RCVD_COUNT_THREE(0.00)[3]; FREEMAIL_FROM(0.00)[googlemail.com]; TO_DN_SOME(0.00)[]; RCVD_TLS_LAST(0.00)[]; DKIM_TRACE(0.00)[googlemail.com:+]; FROM_EQ_ENVFROM(0.00)[]; FREEMAIL_TO(0.00)[www.zefox.net,yahoo.com,freebsd.org]; FREEMAIL_ENVFROM(0.00)[googlemail.com]; MIME_TRACE(0.00)[0:+]; MLMMJ_DEST(0.00)[freebsd-arm@freebsd.org] X-ThisMailContainsUnwantedMimeParts: N > Am 27.09.2022 um 23:33 schrieb bob prohaska : >=20 > [sent also to uboot@freebsd.org. If that's verboten or needless > please indicate] Verboten :-) Ha Ha , you speak German, great ! >=20 > On Tue, Sep 27, 2022 at 08:33:33PM +0200, Klaus K??chemann wrote: >>=20 >>> Am 27.09.2022 um 19:58 schrieb Klaus K??chemann = : >>>=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 > 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=20 > changes alone aren't sufficient.=20 Perhaps Mark is right that #define LOG_DEBUG has to be placed in line 1 = of the file ?=20 I didn`t investigate( all I say is from remembering past issues) . >=20 >=20 >> just a guess :=20 >> electrical problem(of the Pi itself) which could perhaps be fixed by = manipulating the scan delay time . >>=20 > 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. Well, I didn=E2=80=99t mean voltage in that sense, but it=E2=80=99s = possible that the Pi3=20 has another voltage regulator chip onboard than newer PIs and that=20 this older regulator isn=E2=80=99t capable of handling power regulation = correctly(e.g. for the specific Sabrent device) .. just a guess.. >=20 > 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) >=20 > Switching to a recent u-boot-rpi-arm64 seemed to > make matters much worse. Went back to the older > version of u-boot. Very interesting, to be honest: 8 tries of 11 is not really bad, so I would continue with that setup=20 For the case that it=E2=80=99s not mission critical production system = :-) >=20 > It's tempting to say the switch is the problem, but the > disk holding -current from which I copied the old u-boot=20 > booted reliably using the Pi3 and its previous hub and=20 > power supply. >=20 > That's where my question of supporting files came from. > Right now the stable-13 disk has an added > FORCE_TURBO=3D1 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=20 > config.txt, have an effect on u-boot's behavior? Yes, all files in boot/msdos (e.g. dtb & start.elf) related to the = device have effect on behavior=20 But I hadn`t tested that with Pi3 >=20 > Thanks for reading! >=20 > bob prohaska >=20 So maybe that trial&error by switching to older/other available = u-boot-versions or boot files may help as you said=20 But locating the real issue should only be possible by enabling debug = output =E2=80=A6 Regards=20 Klaus