From nobody Wed Jun 02 09:01:13 2021 X-Original-To: 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 B6752EA9A4B for ; Wed, 2 Jun 2021 09:01:17 +0000 (UTC) (envelope-from manu@bidouilliste.com) Received: from mx.blih.net (mx.blih.net [212.83.155.74]) (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 "mx.blih.net", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Fw30r1Xs4z4ftw for ; Wed, 2 Jun 2021 09:01:15 +0000 (UTC) (envelope-from manu@bidouilliste.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bidouilliste.com; s=mx; t=1622624473; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=GKdwDDEwWUDP78tMlIH34OcYXkb+Shc/NOzFzdKYA8I=; b=d3pPAO/nhfYBKx1pKXZ65SXu9A0ocoF13TzQfVANSsSEkMHZ1fje4T7BChLk8xjGSG8pX+ xmHFnSVfgnVhXhtSidaoUS58LRYl5kR38ivty1aVNZzDiZ5patTTFPwCPGx9VTZfpdlJ5L QvFG6IgGhegoGfZtlXetwvlhvJ1DZTU= Received: from skull.home.blih.net (lfbn-idf2-1-644-4.w86-247.abo.wanadoo.fr [86.247.100.4]) by mx.blih.net (OpenSMTPD) with ESMTPSA id 0f992fd8 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Wed, 2 Jun 2021 09:01:13 +0000 (UTC) Date: Wed, 2 Jun 2021 11:01:13 +0200 From: Emmanuel Vadot To: marklmi@yahoo.com Cc: Mark Millard via arm Subject: Re: /usr/local/share/u-boot/u-boot-orangepi-plus-2e/README out of date ; orangepi-plus-2e and RPi2 v1.1 get "Kernel args: (null)" Message-Id: <20210602110113.a92bf9beb5cd9f736934e62b@bidouilliste.com> In-Reply-To: <30B373C0-4C73-4F3A-BDA6-E4CDC55E80C9@yahoo.com> References: <40298C05-5F50-4437-B15B-7A02EA070EAE.ref@yahoo.com> <40298C05-5F50-4437-B15B-7A02EA070EAE@yahoo.com> <20210513111517.86336633bae9568d8599f229@bidouilliste.com> <20210513124050.47714a83f876d67a80e28080@bidouilliste.com> <3C04FB55-4A26-48C8-833F-E4AC84DC4F78@yahoo.com> <99906599-273E-4216-A41E-DE642F33E392@yahoo.com> <0482F239-B137-42F5-8802-8883D08D5868@yahoo.com> <5F226A9B-852D-4E72-9896-0509E56D3318@yahoo.com> <30B373C0-4C73-4F3A-BDA6-E4CDC55E80C9@yahoo.com> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.33; amd64-portbld-freebsd14.0) 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=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Rspamd-Queue-Id: 4Fw30r1Xs4z4ftw X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=pass header.d=bidouilliste.com header.s=mx header.b=d3pPAO/n; dmarc=pass (policy=none) header.from=bidouilliste.com; spf=pass (mx1.freebsd.org: domain of manu@bidouilliste.com designates 212.83.155.74 as permitted sender) smtp.mailfrom=manu@bidouilliste.com X-Spamd-Result: default: False [-1.66 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; TO_DN_SOME(0.00)[]; MV_CASE(0.50)[]; R_SPF_ALLOW(-0.20)[+mx]; DKIM_TRACE(0.00)[bidouilliste.com:+]; RCPT_COUNT_TWO(0.00)[2]; DMARC_POLICY_ALLOW(-0.50)[bidouilliste.com,none]; FREEMAIL_TO(0.00)[yahoo.com]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RBL_DBL_DONT_QUERY_IPS(0.00)[212.83.155.74:from]; ASN(0.00)[asn:12876, ipnet:212.83.128.0/19, country:FR]; MID_RHS_MATCH_FROM(0.00)[]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; R_DKIM_ALLOW(-0.20)[bidouilliste.com:s=mx]; FREEFALL_USER(0.00)[manu]; FROM_HAS_DN(0.00)[]; NEURAL_SPAM_SHORT(0.84)[0.841]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[text/plain]; SPAMHAUS_ZRD(0.00)[212.83.155.74:from:127.0.2.255]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[]; MAILMAN_DEST(0.00)[arm] X-ThisMailContainsUnwantedMimeParts: N On Sun, 30 May 2021 22:32:38 -0700 Mark Millard via arm wrote: > On 2021-May-30, at 22:27, Mark Millard wrote: >=20 > > On 2021-May-24, at 20:10, Mark Millard wrote: > >=20 > >> On 2021-May-24, at 15:53, Mark Millard wrote: > >>=20 > >>> On 2021-May-13, at 12:03, Mark Millard wrote: > >>>=20 > >>>>>>> . . . > >>>=20 > >>> I do not know if the FreeBSD kernel has been depending > >>> on some U-Boot initialization for root-on-USB and the > >>> two no longer match or what. > >>>=20 > >>> But I've used a release/13.0.0.0 microsd card based > >>> boot to get older U-Boot materials (Quarterly as it > >>> turns out). Installing such got me back to having a > >>> root-on-USB boot of the OPi+2e (other than the > >>> mircosd card having the older U-Boot (2020.10 as it > >>> turns out). Of course there is also the matching > >>> boot.scr involved --but it also is on the USB SSD. > >>> (Similarly reverted RPi2 U-Boot, other than needing > >>> to switch boot.scr to match.) > >>>=20 > >>> After booting with the reverted U-Boot related > >>> material: > >>>=20 > >>> # mount -onoatime -tmsdosfs /dev/mmcsd1s1 /mnt > >>> # mount -onoatime /dev/mmcsd1s2a /media > >>>=20 > >>> # ls -Tla /mnt/ > >>> total 20 > >>> drwxr-xr-x 1 root wheel 16384 Dec 31 16:00:00 1979 . > >>> drwxr-xr-x 25 root wheel 512 Dec 31 16:00:40 2009 .. > >>>=20 > >>> # ls -Tla /media/ > >>> total 60 > >>> drwxr-xr-x 2 root wheel 512 May 24 15:43:19 2021 . > >>> drwxr-xr-x 25 root wheel 512 Dec 31 16:00:40 2009 .. > >>> -rwxr-xr-x 1 root wheel 52456 Apr 24 19:48:36 2021 bootcode.bin > >>>=20 > >>> The media is also set up for booting an RPi2 via > >>> root-in-USB ( other than bootcode.bin ). > >>>=20 > >>> If FreeBSD and the more modern U-Boot were well matched > >>> for USB support, I'd expect that this sort of thing would > >>> work (no boot.scr needed). > >>>=20 > >>> For reference: > >>>=20 > >>> # ~/fbsd-based-on-what-freebsd-main.sh=20 > >>> FreeBSD OPiP2E_RPi2v11 14.0-CURRENT FreeBSD 14.0-CURRENT mm-src-n2454= 45-def0058cc690 GENERIC-NODBG arm armv7 1400005 1400005 > >>> def0058cc690 (HEAD -> mm-src) mm-src snapshot for mm's patched build = in git context. > >>> merge-base: 7381bbee29df959e88ec59866cf2878263e7f3b2 > >>> merge-base: CommitDate: 2021-03-12 20:29:42 +0000 > >>> 7381bbee29df (freebsd/main, freebsd/HEAD, pure-src, main) cam: Run al= l XPT_ASYNC ccbs in a dedicated thread > >>> n245444 (--first-parent --count for merge-base) > >>=20 > >> Looks like 2021.04 (even before 2021.04_1) also has the > >> problem for root-on-USB handling. > >>=20 > >> I managed to find a 2021-Apr-09 u-boot-orangepi-plus-2e > >> directory copy that was 2021.04 (and its boot.scr) but > >> before the UEFI change. When I tried it for the > >> root-on-USB context I still got the hangup after "Kernel > >> args: (null)" in: > >>=20 > >> . . . > >> Hit [Enter] to boot immediately, or any other key for command prompt. > >> Booting [/boot/kernel/kernel]... =20 > >> Using DTB provided by EFI at 0x47eea000. > >> Kernel entry at 0xb2e00200... > >> Kernel args: (null) > >>=20 > >>=20 > >> So it does not appear to be the UEFI change so much as > >> 2021.04 in general for which the FreeBSD kernel and > >> the U-Boot are apparently(?) mismatched for root-on-USB. > >>=20 > >>=20 > >> Reverting again to 2020.10 U-Boot got back the root-on-USB > >> status. For this the boot looks like: > >>=20 > >> . . . > >> Hit [Enter] to boot immediately, or any other key for command prompt. > >> Booting [/boot/kernel/kernel]... =20 > >> Using DTB provided by EFI at 0x47ef5000. > >> Kernel entry at 0xb2e00200... > >> Kernel args: (null) > >> ---<>--- > >> KDB: debugger backends: ddb > >> KDB: current backend: ddb > >> Copyright (c) 1992-2021 The FreeBSD Project. > >> Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 19= 94 > >> The Regents of the University of California. All rights reserved. > >> FreeBSD is a registered trademark of The FreeBSD Foundation. > >> FreeBSD 14.0-CURRENT mm-src-n245445-def0058cc690 GENERIC-NODBG arm > >> FreeBSD clang version 11.0.1 (git@github.com:llvm/llvm-project.git llv= morg-11.0.1-0-g43ff75f2c3fe) > >> . . . > >>=20 > >=20 > > Well, I got a surprise in exploring: removing boot.scr > > and ubldr.bin did not prevent booting. (Noticed by the > > accident of ending up with one of them missing that I > > only later noticed.) So I recorded a boot and: > >=20 > > . . . > > U-Boot SPL 2020.10 (Apr 19 2021 - 18:04:31 +0000) > > DRAM: 2048 MiB > > Trying to boot from MMC1 > >=20 > >=20 > > U-Boot 2020.10 (Apr 19 2021 - 18:04:31 +0000) Allwinner Technology > >=20 > > CPU: Allwinner H3 (SUN8I 1680) > > Model: Xunlong Orange Pi Plus 2E > > DRAM: 2 GiB > > . . . > > Device 0: Vendor: OWC Rev: 0 Prod: Envoy Pro mini =20 > > Type: Hard Disk > > Capacity: 228936.5 MB =3D 223.5 GB (468862128 x 512) > > ... is now current device > > Scanning usb 0:4... > > 30675 bytes read in 3 ms (9.8 MiB/s) > > Found EFI removable media binary efi/boot/bootarm.efi > > . . . > > Booting /efi\boot\bootarm.efi > > Consoles: EFI console =20 > >=20 > >=20 > > |=08/=08-=08\=08|=08/=08-=08\=08|=08/=08-=08\=08|=08/=08-=08\=08|=08/= =08-=08\=08|=08/=08-=08\=08|=08/=08-=08\=08 Reading loader env vars from= /efi/freebsd/loader.env > >=20 > >=20 > > Setting currdev to disk2p4: > >=20 > >=20 > > |=08/=08-=08\=08|=08/=08FreeBSD/arm EFI loader, Revision 1.1 > > . . . > >=20 > > So I've likely been been booting via UEFI for > > some time via 2020.10 (or even before?), just > > without noticing at the time. > >=20 > > The other implication is likely that what disabled > > root-on-USB for my context was not the boot.scr > > removal material but some (possibly proper) subset > > of other material changed (extracted from > > ports' main 0d6e5081eb00 commit cgit display): >=20 > Nope: I forgot that I've tried 2021.04 from before > the UEFI changes referenced, and also had the > problem for that context. 2021.04 cannot work on armv7, caches weren't cleared. > Still it is interesting that I'm getting a UEFI > boot context from 2020.10 . The only thing I can suggest is git bisect on u-boot repo and see if you have any result. > > . . . > >=20 >=20 >=20 > =3D=3D=3D > Mark Millard > marklmi at yahoo.com > ( dsl-only.net went > away in early 2018-Mar) >=20 >=20 --=20 Emmanuel Vadot