From nobody Mon Sep 26 04:47:55 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 4MbVcj755xz4csBZ for ; Mon, 26 Sep 2022 04:48:05 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic301-20.consmr.mail.gq1.yahoo.com (sonic301-20.consmr.mail.gq1.yahoo.com [98.137.64.146]) (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 4MbVch4lQMz4K5K for ; Mon, 26 Sep 2022 04:48:04 +0000 (UTC) (envelope-from marklmi@yahoo.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1664167681; bh=HuEJX6SnEfkuw/AI1j0pP+e5OKNmMrS1ObHwfeYc6Zg=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From:Subject:Reply-To; b=RFpgvbGxoqzidRDvmHUZ6bps1sjNIa+kQtlG1M69WmRtsMx+599pDn/OK9eh8OGdN8WufOWdVM5ssbKQsvQ3QTI7PEj2eXb9ntOS3f18rgwnDVaib0164jePphONguFpcYUhS/u1KU0klBU4HGvEYUvVYJVa3xS/u0lgiHiv4cBGCkjskziHguFQoNNgVJI6ovfhphxZWIu5NGqULlzAMeIDA49Ct0aghPtgSiEXIk7iSBqTmN6cAX7DVju9hwA+9gOn9q/HTbBES3cOARER9M0inKvQJLwovkm/Go1JaWU1Ihf6EtUi5n4XhtNf4C2poD8pd5vS08nlqT2NF1J8Gg== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1664167681; bh=6TxlzXCmXWpSURoaY/83YqwEzQqodM6Sgjr0LwLZdVx=; h=X-Sonic-MF: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6yFejD9OQ9Fg3afLp j67zMAoZsJRPiKOa16sPhJsqGbBryFfZ_QCPXt0HPF4549YVzxAY1mAH8BSdbCyelGUqQ2wlOi1k v0DnEoQaOQ3vhLdqB4fDI9uvLI3wQ6aTjE6rDz.LjcIzft11IGEeMoz6fxmjBTGLHVXAMAdTOC2u 6Tl3ui0MwFaGCwwff8L45Rh97Fjaw19j_lliRrs_DcjPyca5N7bcO9ktz4NdqC1DK1IFcwmgiNKE xvc8pLoi0eHdFkF.O5hiYH4Fg0Y46bZfSpAea4UKA8HbDZGaQtOUmi1.lVN.6VfDTE78oty.jnWS r5DjABkSdG2W4mVjHDrfC5VAycBmIBR8bVwyqq.CDxnUujGZq5a5AITaVi2YU4N.6oEUQxG5Ay.h tFJBU.4.TPqJxqeGu6DGrSDYQcz9Pw13qJ83xGdscBsqaxtWpIFH1pexI88ZC2M7KrTEhD1f0YkW kTZRECYYdXVo2mc3RShO6qv0SQz6w5Z66CwG7XKGDeACyE2Be798sSl3CLVJYTbrJsGhXxY5SG6K Qm4zU3g-- X-Sonic-MF: Received: from sonic.gate.mail.ne1.yahoo.com by sonic301.consmr.mail.gq1.yahoo.com with HTTP; Mon, 26 Sep 2022 04:48:01 +0000 Received: by hermes--production-ne1-6dd4f99767-x2f2n (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID 77668da53ee25b4a16206626a77b7c08; Mon, 26 Sep 2022 04:47:56 +0000 (UTC) Content-Type: text/plain; charset=us-ascii 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: <20220926010420.GA64437@www.zefox.net> Date: Sun, 25 Sep 2022 21:47:55 -0700 Cc: FreeBSD Mailing List , freebsd-arm Content-Transfer-Encoding: quoted-printable Message-Id: 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> <0C5BA8D9-0EEB-421A-99E7-2E6F10D5D425@yahoo.com> <20220926010420.GA64437@www.zefox.net> To: bob prohaska X-Mailer: Apple Mail (2.3696.120.41.1.1) X-Rspamd-Queue-Id: 4MbVch4lQMz4K5K X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=yahoo.com header.s=s2048 header.b=RFpgvbGx; dmarc=pass (policy=reject) header.from=yahoo.com; spf=pass (mx1.freebsd.org: domain of marklmi@yahoo.com designates 98.137.64.146 as permitted sender) smtp.mailfrom=marklmi@yahoo.com X-Spamd-Result: default: False [-3.32 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.82)[-0.823]; 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.64.146:from]; DWL_DNSWL_NONE(0.00)[yahoo.com:dkim]; RCVD_TLS_LAST(0.00)[]; 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:+]; MIME_TRACE(0.00)[0:+]; FROM_EQ_ENVFROM(0.00)[]; ASN(0.00)[asn:36647, ipnet:98.137.64.0/20, country:US]; FREEMAIL_ENVFROM(0.00)[yahoo.com]; RWL_MAILSPIKE_POSSIBLE(0.00)[98.137.64.146:from] X-ThisMailContainsUnwantedMimeParts: N On 2022-Sep-25, at 18:04, bob prohaska wrote: > On Sun, Sep 25, 2022 at 03:57:34PM -0700, Mark Millard wrote: >> On 2022-Sep-25, at 12:34, bob prohaska wrote: >>>=20 >>> . . . >>>=20 >>> IIRC I did try replacing the Sabrent enclosure with the Startech >>> enclosure, which worked and seemed to implicate the Sabrent as >>> the culprit. Thus my interest in u-boot debug information. =20 >>=20 >> Looking at = https://u-boot.readthedocs.io/en/latest/develop/logging.html >> it appears the logging availability has to be enabled at compile = time: >>=20 >> QUOTE >> Enabling logging >>=20 >> The following options are used to enable logging >> at compile time: >>=20 >> ??? CONFIG_LOG - Enables the logging system >> ??? CONFIG_LOG_MAX_LEVEL - Max log level to >> build (anything higher is compiled out) >> ??? CONFIG_LOG_CONSOLE - Enable writing log >> records to the console >>=20 >> If CONFIG_LOG is not set, then no logging will be available. >>=20 >> The above have SPL and TPL versions also, e.g. >> CONFIG_SPL_LOG_MAX_LEVEL and CONFIG_TPL_LOG_MAX_LEVEL. >>=20 >> If logging is disabled, the default behaviour is to output >> any message at level LOGL_INFO and below. If logging is >> disabled and DEBUG is defined (at the very top of a C file) >> then any message at LOGL_DEBUG will be written. >> END QUOTE >>=20 >=20 > I looked at the page but didn't understand where/how to set > those parameters. Do they go in a configuration or Makefile=20 > somewhere? I tried using=20 > setenv CONFIG_LOG 1 > setenv CONFIG_LOG_CONSOLE 1 > setenv CONFIG_LOG_MAX_LEVEL 4 >=20 > [The numbers were guessed at]=20 >=20 > All showed up in an env command, but the the resulting u-boot.bin > executable did not change size and behaves as before.=20 It may be that they could go someplace in the same file that u-boot-rpi-arm64/files/patch-include_configs_rpi.h patches. I'd have to go exploring to find out. I'll note that: https://github.com/u-boot/u-boot/blob/master/include/configs/rpi.h shows it #defines some other CONFIG_... names, including the one that my existing patch adjusts ( CONFIG_EXTRA_ENV_SETTINGS ). This is at least suggestive. But it may be some other .h file would have to be used instead. Going in a different direction: Having the RPi* firmware and U-Boot load from a microsd card but the EFI material from the USB media likely would do you no good. U-Boot would still have to get the USB media working for its activity in order for U-Boot to find and load the EFI material that is on the USB media. It is the same problem again. Side Note: I actually boot the RPi3B that way. Note the "efi_disabled" below that prevents trying to boot FreeBSD's EFI material from the microsd card. Instead it finds and uses the EFI material on the USB media I use and EFI in turn finds the kernel on the same media as the EFI material (so the USB media). # mount -onoatime -tmsdosfs /dev/mmcsd0s1 /mnt # ls -Tld /mnt/* -rwxr-xr-x 1 root wheel 18693 Aug 5 04:11:18 2021 = /mnt/COPYING.linux -rwxr-xr-x 1 root wheel 1594 Aug 5 04:11:18 2021 = /mnt/LICENCE.broadcom -rwxr-xr-x 1 root wheel 240 Apr 20 19:18:14 2022 /mnt/README -rwxr-xr-x 1 root wheel 5888 Apr 20 19:25:22 2022 = /mnt/armstub8-gic.bin -rwxr-xr-x 1 root wheel 5888 Apr 20 19:25:22 2022 = /mnt/armstub8.bin -rwxr-xr-x 1 root wheel 27425 Aug 5 04:11:18 2021 = /mnt/bcm2710-rpi-2-b.dtb -rwxr-xr-x 1 root wheel 29542 Aug 5 04:11:18 2021 = /mnt/bcm2710-rpi-3-b-plus.dtb -rwxr-xr-x 1 root wheel 28923 Aug 5 04:11:18 2021 = /mnt/bcm2710-rpi-3-b.dtb -rwxr-xr-x 1 root wheel 27421 Aug 5 04:11:18 2021 = /mnt/bcm2710-rpi-cm3.dtb -rwxr-xr-x 1 root wheel 49825 Aug 5 04:11:18 2021 = /mnt/bcm2711-rpi-4-b.dtb -rwxr-xr-x 1 root wheel 49821 Aug 5 04:11:18 2021 = /mnt/bcm2711-rpi-400.dtb -rwxr-xr-x 1 root wheel 50499 Aug 5 04:11:18 2021 = /mnt/bcm2711-rpi-cm4.dtb -rwxr-xr-x 1 root wheel 52456 Aug 5 04:11:18 2021 = /mnt/bootcode.bin -rwxr-xr-x 1 root wheel 968 Sep 25 12:49:00 2022 /mnt/config.txt drwxr-xr-x 1 root wheel 32768 Apr 9 01:06:08 2021 = /mnt/efi_disabled -rwxr-xr-x 1 root wheel 7278 Aug 5 04:11:18 2021 /mnt/fixup.dat -rwxr-xr-x 1 root wheel 5407 Aug 5 04:11:18 2021 /mnt/fixup4.dat -rwxr-xr-x 1 root wheel 3211 Aug 5 04:11:18 2021 = /mnt/fixup4cd.dat -rwxr-xr-x 1 root wheel 8416 Aug 5 04:11:18 2021 = /mnt/fixup4db.dat -rwxr-xr-x 1 root wheel 8418 Aug 5 04:11:18 2021 /mnt/fixup4x.dat -rwxr-xr-x 1 root wheel 3211 Aug 5 04:11:18 2021 = /mnt/fixup_cd.dat -rwxr-xr-x 1 root wheel 10262 Aug 5 04:11:18 2021 = /mnt/fixup_db.dat -rwxr-xr-x 1 root wheel 10262 Aug 5 04:11:18 2021 /mnt/fixup_x.dat drwxr-xr-x 1 root wheel 32768 Aug 5 04:11:18 2021 /mnt/overlays -rwxr-xr-x 1 root wheel 2959904 Aug 5 04:11:18 2021 /mnt/start.elf -rwxr-xr-x 1 root wheel 2235712 Aug 5 04:11:18 2021 /mnt/start4.elf -rwxr-xr-x 1 root wheel 799964 Aug 5 04:11:18 2021 = /mnt/start4cd.elf -rwxr-xr-x 1 root wheel 3731528 Aug 5 04:11:18 2021 = /mnt/start4db.elf -rwxr-xr-x 1 root wheel 2987720 Aug 5 04:11:18 2021 /mnt/start4x.elf -rwxr-xr-x 1 root wheel 799964 Aug 5 04:11:18 2021 = /mnt/start_cd.elf -rwxr-xr-x 1 root wheel 4803496 Aug 5 04:11:18 2021 = /mnt/start_db.elf -rwxr-xr-x 1 root wheel 3711432 Aug 5 04:11:18 2021 /mnt/start_x.elf -rwxr-xr-x 1 root wheel 0 Apr 24 03:58:58 2022 /mnt/timeout -rwxr-xr-x 1 root wheel 582752 Apr 22 14:56:24 2022 /mnt/u-boot.bin -rwxr-xr-x 1 root wheel 582752 Apr 22 13:14:58 2022 = /mnt/u-boot.bin.2022.04.arm64 The above does not have FreeBSD present and has made the EFI material on the microsd card be not-found (via using the efi_disabled directory name instead). This leads U-Boot to find the EFI material on the USB media instead --where it has the normal path related names. Note: Mostly I use the most recent RPi* firmware that FreeBSD does not mishandle for the 3 configurations of RPi*'s that I have access to to test. I also use my patched U-Boot build because of an issue with the USB media that I use needing more time than normal for something. For any later RPi* dtb set that I've tried, FreeBSD crashes via use of a nullptr (plus a small offset, as I remember). It has been a while since I've checked any new dtb vintages. I also add timeout, needed or not. config.txt is my variant as well. (FreeBSD mishandles the dtb's by presuming that in the order it processes the dtb material that there will be no references before definitions, an order that dtb's are not required to follow. When FreeBSD processes a reference before it has seen the definition for what is referenced, it uses the nullptr that it has not replaced yet.) =3D=3D=3D Mark Millard marklmi at yahoo.com