Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 20 Aug 2021 09:42:57 +0200
From:      Emmanuel Vadot <manu@bidouilliste.com>
To:        Karl Denninger <karl@denninger.net>
Cc:        freebsd-arm@freebsd.org
Subject:   Re: git: 1dec3639fd0c - main - sysutils/u-boot: Update to 2021.07
Message-ID:  <20210820094257.503ef8ad4ff07399f24916bd@bidouilliste.com>
In-Reply-To: <7b2159e3-d21e-5518-4f5b-9e293c4c1f30@denninger.net>
References:  <202107071618.167GIvXd048504@gitrepo.freebsd.org> <874kd3390q.wl-herbert@gojira.at> <87o8b8n1rf.wl-herbert@gojira.at> <87mtqsn0we.wl-herbert@gojira.at> <20210712115010.a405a8f5e313ec75142fa544@bidouilliste.com> <YOwrKzaucSIo67Wd@mail.bsd4all.net> <87k0lnybp4.wl-herbert@gojira.at> <20210819212311.e880b3e4f0667da3afab5f93@bidouilliste.com> <a181ffcc-c161-457a-8c8b-39ecc355f654@denninger.net> <7b2159e3-d21e-5518-4f5b-9e293c4c1f30@denninger.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 19 Aug 2021 18:39:37 -0400
Karl Denninger <karl@denninger.net> wrote:

> Ok, something else funny is going on now..... and I'm not at all sure=20
> what, or how to diagnose further.
>=20
> I grabbed the last u-Boot, which 2021.04 (April 13th) and put that on=20
> the disk, and restored the config.txt.
>=20
> Now I get this:
>=20
> U-Boot 2021.04 (Apr 13 2021 - 03:57:26 +0000)
>=20
> DRAM:=A0 948 MiB
> RPI 3 Model B (0xa22082)
> MMC:=A0=A0 mmc@7e300000: 0
> Loading Environment from FAT... In:=A0=A0=A0 serial
> Out:=A0=A0 vidconsole
> Err:=A0=A0 vidconsole
> Net:=A0=A0 No ethernet found.
> starting USB...
> Bus usb@7e980000: USB DWC2
> scanning bus usb@7e980000 for devices... 3 USB Device(s) found
>  =A0=A0=A0=A0=A0=A0 scanning usb for storage devices... 0 Storage Device(=
s) found
> Hit any key to stop autoboot:=A0 0
> switch to partitions #0, OK
> mmc0 is current device
> Scanning mmc 0:1...
> libfdt fdt_check_header(): FDT_ERR_BADMAGIC
> Scanning disk mmc@7e300000.blk...
> ** Unrecognized filesystem type **=A0 <<<<----- Huh?
> Found 3 disks
> No EFI system partition
> BootOrder not defined
> EFI boot manager: Cannot load any image
> Found EFI removable media binary efi/boot/bootaa64.efi
> 97448 bytes read in 35 ms (2.7 MiB/s)
> libfdt fdt_check_header(): FDT_ERR_BADMAGIC
> Booting /efi\boot\bootaa64.efi
>=20
> Except that starts, and then..
>=20
>  >> FreeBSD EFI boot block
>  =A0=A0 Loader path: /boot/loader.efi
>=20
>  =A0=A0 Initializing modules: ZFS UFS
>  =A0=A0 Load Path: /efi\boot\bootaa64.efi
>  =A0=A0 Load Device:=20
> /VenHw(e61d73b9-a384-4acc-aeab-82e828f3628b)/SD(2)/SD(0)/HD(1,MBR,0x76440=
bf1,0x3f,0x18fe7)
>  =A0=A0 Probing 3 block devices...not supported
> not supported
> not supported
>  =A0done
>  =A0=A0=A0 ZFS found no pools
>  =A0=A0=A0 UFS found no partitions
> Failed to load '/boot/loader.efi'
> panic: No bootable partitions found!
> ## Application failed, r =3D 1
> EFI LOAD FAILED: continuing...
> MMC Device 1 not found
> no mmc device at slot 1
>=20
> Which implies I got the bootaa64.efi code loaded and then the EFI code=20
> blew up looking for a bootable filesystem.

 It looks like you're using boot1.efi as /esp/efi/boot/bootaa64.efi, do
not do that, use loader.efi directly.

> The filesystem on the disk built by Crochet is:
>=20
> root@NewFS:/work/Crochet-work-ARM64 # mdconfig *.img
> md0
> root@NewFS:/work/Crochet-work-ARM64 # gpart show md0
> =3D>=A0=A0=A0=A0 63=A0 5761655=A0 md0=A0 MBR=A0 (2.7G)
>  =A0=A0=A0=A0=A0=A0 63=A0=A0 102375=A0=A0=A0 1=A0 fat32lba=A0 [active]=A0=
 (50M)
>  =A0=A0 102438=A0 5659280=A0=A0=A0 2=A0 freebsd=A0 (2.7G)
>=20
> root@NewFS:/work/Crochet-work-ARM64 # gpart show md0s2
> =3D>=A0=A0=A0=A0=A0 0=A0 5659280=A0 md0s2=A0 BSD=A0 (2.7G)
>  =A0=A0=A0=A0=A0=A0=A0 0=A0 5120000=A0=A0=A0=A0=A0 1=A0 freebsd-ufs=A0 (2=
.4G)
>  =A0 5120000=A0=A0=A0 65536=A0=A0=A0=A0=A0 4=A0 freebsd-ufs=A0 (32M)
>  =A0 5185536=A0=A0 473744=A0=A0=A0=A0=A0 5=A0 freebsd-ufs=A0 (231M)
>=20
> That ought to be good and on /dev/md0s2a I indeed have /boot/loader.efi
>=20
> root@NewFS:/mnt # file boot/loader.efi
> boot/loader.efi: MS-DOS executable PE32+ executable (EFI application)=20
> Aarch64, for MS Windows
>=20
>=20
> On 8/19/2021 15:29, Karl Denninger wrote:
> > On 8/19/2021 15:23, Emmanuel Vadot wrote:
> >> On Sun, 18 Jul 2021 15:48:55 +0200
> >> "Herbert J. Skuhra" <herbert@gojira.at> wrote:
> >>
> >>> On Mon, 12 Jul 2021 13:44:43 +0200, "Herbert J. Skuhra" wrote:
> >>>
> >>>> This happens even with the official builds!
> >>>>
> >>>> FreeBSD-13.0-STABLE-arm64-aarch64-RPI-20210701-6aee7855180-246143.im=
g.xz=20
> >>>>
> >>>> =3D=3D> OK (U-Boot 2021.04)
> >>>> FreeBSD-13.0-STABLE-arm64-aarch64-RPI-20210708-f6d448caf69-246212.im=
g.xz=20
> >>>>
> >>>> =3D=3D> Not OK. (U-Boot 2021.07)
> >>>>
> >>>> I am using U-Boot 2021.04 again because I still don't know how to bo=
ot
> >>>> from mmc device 2 automatically.
> >>> With the below patch my RPI 3 Model B (0xa02082) boots again:
> >>>
> >>> --- include/configs/rpi.h.orig=A0 2021-07-18 15:37:55.743031000 +0200
> >>> +++ include/configs/rpi.h=A0=A0=A0=A0=A0=A0 2021-07-18 15:38:51.15928=
6000 +0200
> >>> @@ -173,7 +173,8 @@
> >>> =A0 #if CONFIG_IS_ENABLED(CMD_MMC)
> >>> =A0=A0=A0=A0=A0=A0=A0=A0 #define BOOT_TARGET_MMC(func) \
> >>> =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 func(MMC, mmc, 0) \
> >>> -=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 func(MMC, mmc, 1)
> >>> +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 func(MMC, mmc, 1) \
> >>> +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 func(MMC, mmc, 2)
> >>> =A0 #else
> >>>
> >>>
> >>> (sysutils/u-boot-rpi3 / U-Boot 2021.07)
> >>>
> >> =A0 Can you submit that upstream ?
> >> =A0 We've tried over the past years to have no local patches for u-boo=
t.
> >> =A0 Also can you try removing the overlays loaded by the firmware (in
> >> config.txt), I think that the mmc overlays might renumber the mmc
> >> device and upstream u-boot might not be happy about this.
> >>
> >> =A0 Thanks,
> >
> > Ok, so removing the overlay is easy -- I commented out the MMC overlay=
=20
> > line and now u-boot starts but....
> >
> > U-Boot 2021.07 (Jul 10 2021 - 02:42:14 +0000)
> >
> > DRAM:=A0 948 MiB
> > RPI 3 Model B (0xa22082)
> > MMC:=A0=A0 mmc@7e202000: 0, mmcnr@7e300000: 1
> > Loading Environment from FAT... Card did not respond to voltage=20
> > select! : -110
> > In:=A0=A0=A0 serial
> > Out:=A0=A0 vidconsole
> > Err:=A0=A0 vidconsole
> > Net:=A0=A0 No ethernet found.
> > starting USB...
> > Bus usb@7e980000: usb dr_mode not found
> > USB DWC2
> > scanning bus usb@7e980000 for devices... 3 USB Device(s) found
> > =A0=A0=A0=A0=A0=A0 scanning usb for storage devices... 0 Storage Device=
(s) found
> > Hit any key to stop autoboot:=A0 0
> > switch to partitions #0, OK
> > mmc0 is current device
> > Scanning mmc 0:1...
> > libfdt fdt_check_header(): FDT_ERR_BADMAGIC
> > Scanning disk mmc@7e202000.blk...
> > ** Unrecognized filesystem type **
> > Card did not respond to voltage select! : -110
> > Scanning disk mmcnr@7e300000.blk...
> > Disk mmcnr@7e300000.blk not ready
> > Found 3 disks
> > No EFI system partition
> > BootOrder not defined
> > EFI boot manager: Cannot load any image
> > Found EFI removable media binary efi/boot/bootaa64.efi
> > 97448 bytes read in 8 ms (11.6 MiB/s)
> > libfdt fdt_check_header(): FDT_ERR_BADMAGIC
> > Booting /efi\boot\bootaa64.efi
> >
> >
> > and then.
> >
> > >> FreeBSD EFI boot block
> > =A0=A0 Loader path: /boot/loader.efi
> >
> > =A0=A0 Initializing modules: ZFS UFS
> > =A0=A0 Load Path: /efi\boot\bootaa64.efi
> > =A0=A0 Load Device:=20
> > /VenHw(e61d73b9-a384-4acc-aeab-82e828f3628b)/SD(0)/SD(0)/HD(1,MBR,0x764=
40bf1,0x3f,0x18fe7)
> > =A0=A0 Probing 3 block devices...not supported
> > not supported
> > not supported
> > =A0done
> > =A0=A0=A0 ZFS found no pools
> > =A0=A0=A0 UFS found no partitions
> > Failed to load '/boot/loader.efi'
> > panic: No bootable partitions found!
> > ## Application failed, r =3D 1
> > EFI LOAD FAILED: continuing...
> > Card did not respond to voltage select! : -110
> >
> > Device 0: unknown device
> > Waiting for Ethernet connection... unable to connect.
> > missing environment variable: pxeuuid
> > missing environment variable: bootfile
> > Retrieving file: pxelinux.cfg/01-b8-27-eb-17-6d-54
> > Waiting for Ethernet connection... unable to connect.
> > missing environment variable: bootfile
> > Retrieving file: pxelinux.cfg/00000000
> > Waiting for Ethernet connection... unable to connect.
> > missing environment variable: bootfile
> > Retrieving file: pxelinux.cfg/0000000
> >
> > So it looks like removing the overlay changes it in that I now get the=
=20
> > loader, but then it fails AFTER THAT.
> >
> > Current config.txt:
> >
> > arm_64bit=3D1
> > dtparam=3Daudio=3Don,i2c_arm=3Don,spi=3Don
> > # dtoverlay=3Dmmc
> > dtoverlay=3Dpwm
> > dtoverlay=3Ddisable-bt
> > device_tree_address=3D0x4000
> > kernel=3Du-boot.bin
> >
> >
> --=20
> Karl Denninger
> karl@denninger.net <mailto:karl@denninger.net>
> /The Market Ticker/
> /[S/MIME encrypted email preferred]/


--=20
Emmanuel Vadot <manu@bidouilliste.com> <manu@FreeBSD.org>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20210820094257.503ef8ad4ff07399f24916bd>