From nobody Thu Oct 28 01:14:51 2021 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 6B6301815825 for ; Thu, 28 Oct 2021 01:15:08 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic308-8.consmr.mail.gq1.yahoo.com (sonic308-8.consmr.mail.gq1.yahoo.com [98.137.68.32]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4Hfnfg1Xgjz4sRW for ; Thu, 28 Oct 2021 01:15:07 +0000 (UTC) (envelope-from marklmi@yahoo.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1635383700; bh=+qDuRfUCk/F42cYtB+3eFpaZilfWUmPmnBkxd2DUD/g=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From:Subject:Reply-To; b=goj07jthfZ1Ty4MVm4dGmSDgFAsN64MyUmkiDWShb+xfG/pFpXOMvEoehvAeRYG+fJUvrdFA/IvbGJUagARTikUbeCNpHh5oLg5VEVgecQ1tpWjfYzcovYcBA0nv1k6KkcGk9kHVvTkDAyPREWOuRrwjffpCh1o3JlwzqjYu9BrzyEQNZ+vSIsAB/s4qQNxatOm+6sw0ph+Sk5elcOdgeQv6iy85mJfTxShGpAiIAB5kdGfBSxHnhoPfV6EBk3WNloURupEO8Zs+JOzGK1TSDzSbnfBKDFwboiXfZxH21Rxu2QgM12LAY3R86zEGj2WQyzbZDgKame2aluQg/+NkVA== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1635383700; bh=KPzeENky0XAw4bGmnskvvv0/5WDaJOVTFh2h077dpFS=; h=X-Sonic-MF:Subject:From:Date:To:From:Subject; b=E8lLd+6ND5OAFwXx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BQGvwnZ9GmH8Nw8e73ZBX7pxxUCEKmJdVU_cJlXv3g6SXtciMNRO6Qf4tN9Xq..VY UdZSRBvc75vAkb.kNasnQUA_.uvPT5acIZb_HuxmwDqpqCEDlCG8IgB_tVK9S4__hF1mZs3uHh9n ZfTtu5UX1ACV.6HjSXB0uo1s4d.CEIQHdGnICo5NqvvJaAV8Mvx8yYE7_0VMX0t2UlG7QHSVxJnc BXcCbfFY_MIxS3ZplKhYu9.iNXaoFRjqtux8c47i2yZmGxh8NwwwPDCGCwSy1MKXB5JdG1wBlxl. uXpnPuuLXeko6SDW5_qRE4xC0IroWfKviNv0rf2AzzAsRleKcARetw_wt8fIAH1GxwyhgXYUITw5 XkiQ8LgmATKF0uBZsNBIe_ls_S5bswigxM7iIjsZbdt9JfBL9OC0K58qchPeC_oYLQZlXf4gukK_ 39J1HTnSaenIJ9Jqu7LJZlRDGBdjZfjQ65ur8E0aIcVrEKjyBIyPylQ4VNxeN1BKlPlAyyhhyLVE OAzy9U9hTiNuqbVTNvYuNWsA- X-Sonic-MF: Received: from sonic.gate.mail.ne1.yahoo.com by sonic308.consmr.mail.gq1.yahoo.com with HTTP; Thu, 28 Oct 2021 01:15:00 +0000 Received: by kubenode522.mail-prod1.omega.bf1.yahoo.com (VZM Hermes SMTP Server) with ESMTPA ID 28ea884eae256550c3de9bf1b69b6f35; Thu, 28 Oct 2021 01:14:54 +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 14.0 \(3654.120.0.1.13\)) Subject: Re: Troubles booting Pi2 from USB using bootcode.bin method In-Reply-To: <02806205-6685-41FD-B2D1-415C82FBCF92@yahoo.com> Date: Wed, 27 Oct 2021 18:14:51 -0700 Cc: Free BSD , freebsd-ports@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: References: <20211025034332.GA8398@www.zefox.net> <20211027162852.GA16010@www.zefox.net> <41C0A656-D898-4381-BB81-034D54CA04A0@yahoo.com> <02806205-6685-41FD-B2D1-415C82FBCF92@yahoo.com> To: bob prohaska X-Mailer: Apple Mail (2.3654.120.0.1.13) X-Rspamd-Queue-Id: 4Hfnfg1Xgjz4sRW X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=yahoo.com header.s=s2048 header.b=goj07jth; dmarc=pass (policy=reject) header.from=yahoo.com; spf=pass (mx1.freebsd.org: domain of marklmi@yahoo.com designates 98.137.68.32 as permitted sender) smtp.mailfrom=marklmi@yahoo.com X-Spamd-Result: default: False [-3.46 / 15.00]; RCVD_TLS_LAST(0.00)[]; ARC_NA(0.00)[]; R_DKIM_ALLOW(-0.20)[yahoo.com:s=s2048]; RWL_MAILSPIKE_POSSIBLE(0.00)[98.137.68.32:from]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; FREEMAIL_FROM(0.00)[yahoo.com]; MV_CASE(0.50)[]; MIME_GOOD(-0.10)[text/plain]; R_SPF_ALLOW(-0.20)[+ptr:yahoo.com]; NEURAL_HAM_LONG(-1.00)[-1.000]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[yahoo.com:+]; DMARC_POLICY_ALLOW(-0.50)[yahoo.com,reject]; RCVD_IN_DNSWL_NONE(0.00)[98.137.68.32:from]; NEURAL_HAM_SHORT(-0.96)[-0.964]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[yahoo.com]; ASN(0.00)[asn:36647, ipnet:98.137.64.0/20, country:US]; RCVD_COUNT_TWO(0.00)[2]; MID_RHS_MATCH_FROM(0.00)[]; DWL_DNSWL_NONE(0.00)[yahoo.com:dkim] Reply-To: marklmi@yahoo.com From: Mark Millard via freebsd-arm X-Original-From: Mark Millard X-ThisMailContainsUnwantedMimeParts: N On 2021-Oct-27, at 17:02, Mark Millard wrote: On 2021-Oct-27, at 15:37, Mark Millard wrote: > On 2021-Oct-27, at 10:39, Mark Millard wrote: >=20 >> On 2021-Oct-27, at 09:28, bob prohaska wrote: >>=20 >>> On Sun, Oct 24, 2021 at 08:43:32PM -0700, bob prohaska wrote: >>>> I've got an early Pi2B (not plus) that has been booting reliably >>>> from a USB2 disk connected via a USB3 hub using just bootcode.bin >>>> and timeout on the DOS partition of the microSD card. >>>>=20 >>> It turns out the USB3 disk boots normally _provided_ the old >>> USB2 disk remains connected. I didn't try that initially both >>> because I didn't need both disks and because the boot order=20 >>> couldn't be obviously controlled.=20 >>>=20 >>> It turns out the new disk is discovered first and boots as=20 >>> desired, so the system is busy building an up-to-date world >>> and kernel. There's room for a ports tree on this disk. >>>=20 >>> Does the ports version of u-boot include support for the >>> bootcode.bin-only mode of USB booting? >>=20 >> Before U-Boot is involved there are other files involved >> such as a start* file from the USB device. With appropriate >> config.txt content, and possibly other settings, the boot >> is likely rather explicit about its early activity. (But I >> do not currently have access to a RPi2B v1.1 or earlier to >> test the details on. In fact, the accessible only RPi*'s >> are RPi4B 8 GiByte ones.) >>=20 >> (I wondered if you meant RPi3B: To my knowledge there is >> no such thing as a RPi2B+ so the "plus" reference suggests >> an early RPi3B might have been what was involved.) >>=20 >>> Right now I'm using >>> the version of bootcode.bin offered at=20 >>> = https://www.raspberrypi.com/documentation/computers/raspberry-pi.html#spec= ial-bootcode-bin-only-boot-mode >>>=20 >>> Without having the USB2 disk connected the serial console hangs >>> with what looks like "cb" as the only output. It's unclear if >>> u-boot is starting at all. The red and green LEDs remain lit, >>> seemingly indefinitely.=20 >>>=20 >>=20 >=20 > Your specific path may be different, but what does a command > analogous to the below show for you for the problematical > context? >=20 > # strings /boot/efi/start.elf | grep "VC_BUILD_" > VC_BUILD_ID_USER: dom > VC_BUILD_ID_TIME: 12:12:09 > VC_BUILD_ID_VARIANT: start > VC_BUILD_ID_TIME: Feb 25 2021 > VC_BUILD_ID_BRANCH: bcm2711_2 > VC_BUILD_ID_HOSTNAME: buildbot > VC_BUILD_ID_PLATFORM: raspberrypi_linux > VC_BUILD_ID_VERSION: 564e5f9b852b23a330b1764bcf0b2d022a20afd0 (clean) >=20 > I'll note that there is: >=20 > QUOTE > bootcode.bin UART Enable >=20 > NOTE > For boards pre-Raspberry Pi 4, Model B. > For information on enabling the UART on the Pi4 bootloader, please see = this page. >=20 > It is possible to enable an early stage UART to debug booting issues = (useful with the above bootcode.bin only boot mode). To do this, make = sure you=E2=80=99ve got a recent version of the firmware (including = bootcode.bin). To check if UART is supported in your current firmware: >=20 > strings bootcode.bin | grep BOOT_UART >=20 > To enable UART from bootcode.bin use: >=20 > sed -i -e "s/BOOT_UART=3D0/BOOT_UART=3D1/" bootcode.bin That is a linux sed command for use on RaspiOS*'s and the like. In particular, for FreeBSD: -i extension Edit files in-place similarly to -I, but treat each file independently from other files. In particular, line = numbers in each file start at 1, the =E2=80=9C$=E2=80=9D address = matches the last line of the current file, and address ranges are limited to the = current file. (See Sed Addresses.) The net result is as though = each file were edited by a separate sed instance. In other words: the "extension" is not optional after -i if I understand right for FreeBSD. >=20 > Next, connect a suitable USB serial cable to your host computer (a = Raspberry Pi will work, although I find the easiest path is to use a USB = serial cable since it=E2=80=99ll work out the box without any pesky = config.txt settings). Use the standard pins 6, 8 and 10 (GND, GPIO14, = GPIO15) on a Pi or CM board. >=20 > Then use screen on linux or a Mac or putty on windows to connect to = the serial. >=20 > Setup your serial to receive at 115200-8-N-1, and then boot your Pi / = Compute module. You should get an immediate serial output from the = device as bootcode.bin runs. > END QUOTE >=20 > That text is from: >=20 > https://www.raspberrypi.com/documentation/computers/raspberry-pi.html >=20 For more debug information on the serial console, but somewhat later in the sequence than the output for BOOT_UART=3D1, config.txt can contain: enable_uart=3D1 uart_2ndstage=3D1 dtdebug=3D1 The debug output is before U-Boot starts but likely does indicate the = loading of u-boot.bin (as the kernel) and when in the sequence it is about to start code in u-boot.bin . (It may also report more at shutdown.) =3D=3D=3D Mark Millard marklmi at yahoo.com ( dsl-only.net went away in early 2018-Mar) =3D=3D=3D Mark Millard marklmi at yahoo.com ( dsl-only.net went away in early 2018-Mar)