Re: git: 1dec3639fd0c - main - sysutils/u-boot: Update to 2021.07

Emmanuel Vadot <[email protected]>
Newsgroups gmane.os.freebsd.devel.arm
Message-ID <[email protected]>
On Thu, 19 Aug 2021 18:39:37 -0400
Karl Denninger <[email protected]> wrote:

> Ok, something else funny is going on now..... and I'm not at all sure 
> what, or how to diagnose further.
> 
> I grabbed the last u-Boot, which 2021.04 (April 13th) and put that on 
> the disk, and restored the config.txt.
> 
> Now I get this:
> 
> U-Boot 2021.04 (Apr 13 2021 - 03:57:26 +0000)
> 
> DRAM:  948 MiB
> RPI 3 Model B (0xa22082)
> MMC:   mmc@7e300000: 0
> Loading Environment from FAT... In:    serial
> Out:   vidconsole
> Err:   vidconsole
> Net:   No ethernet found.
> starting USB...
> Bus usb@7e980000: USB DWC2
> scanning bus usb@7e980000 for devices... 3 USB Device(s) found
>         scanning usb for storage devices... 0 Storage Device(s) found
> Hit any key to stop autoboot:  0
> switch to partitions #0, OK
> mmc0 is current device
> Scanning mmc 0:1...
> libfdt fdt_check_header(): FDT_ERR_BADMAGIC
> Scanning disk [email protected]...
> ** Unrecognized filesystem type **  <<<<----- 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
> 
> Except that starts, and then..
> 
>  >> FreeBSD EFI boot block
>     Loader path: /boot/loader.efi
> 
>     Initializing modules: ZFS UFS
>     Load Path: /efi\boot\bootaa64.efi
>     Load Device: 
> /VenHw(e61d73b9-a384-4acc-aeab-82e828f3628b)/SD(2)/SD(0)/HD(1,MBR,0x76440bf1,0x3f,0x18fe7)
>     Probing 3 block devices...not supported
> not supported
> not supported
>   done
>      ZFS found no pools
>      UFS found no partitions
> Failed to load '/boot/loader.efi'
> panic: No bootable partitions found!
> ## Application failed, r = 1
> EFI LOAD FAILED: continuing...
> MMC Device 1 not found
> no mmc device at slot 1
> 
> Which implies I got the bootaa64.efi code loaded and then the EFI code 
> 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:
> 
> root@NewFS:/work/Crochet-work-ARM64 # mdconfig *.img
> md0
> root@NewFS:/work/Crochet-work-ARM64 # gpart show md0
> =>     63  5761655  md0  MBR  (2.7G)
>         63   102375    1  fat32lba  [active]  (50M)
>     102438  5659280    2  freebsd  (2.7G)
> 
> root@NewFS:/work/Crochet-work-ARM64 # gpart show md0s2
> =>      0  5659280  md0s2  BSD  (2.7G)
>          0  5120000      1  freebsd-ufs  (2.4G)
>    5120000    65536      4  freebsd-ufs  (32M)
>    5185536   473744      5  freebsd-ufs  (231M)
> 
> That ought to be good and on /dev/md0s2a I indeed have /boot/loader.efi
> 
> root@NewFS:/mnt # file boot/loader.efi
> boot/loader.efi: MS-DOS executable PE32+ executable (EFI application) 
> Aarch64, for MS Windows
> 
> 
> 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" <[email protected]> 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.img.xz 
> >>>>
> >>>> ==> OK (U-Boot 2021.04)
> >>>> FreeBSD-13.0-STABLE-arm64-aarch64-RPI-20210708-f6d448caf69-246212.img.xz 
> >>>>
> >>>> ==> Not OK. (U-Boot 2021.07)
> >>>>
> >>>> I am using U-Boot 2021.04 again because I still don't know how to boot
> >>>> from mmc device 2 automatically.
> >>> With the below patch my RPI 3 Model B (0xa02082) boots again:
> >>>
> >>> --- include/configs/rpi.h.orig  2021-07-18 15:37:55.743031000 +0200
> >>> +++ include/configs/rpi.h       2021-07-18 15:38:51.159286000 +0200
> >>> @@ -173,7 +173,8 @@
> >>>   #if CONFIG_IS_ENABLED(CMD_MMC)
> >>>          #define BOOT_TARGET_MMC(func) \
> >>>                  func(MMC, mmc, 0) \
> >>> -               func(MMC, mmc, 1)
> >>> +               func(MMC, mmc, 1) \
> >>> +               func(MMC, mmc, 2)
> >>>   #else
> >>>
> >>>
> >>> (sysutils/u-boot-rpi3 / U-Boot 2021.07)
> >>>
> >>   Can you submit that upstream ?
> >>   We've tried over the past years to have no local patches for u-boot.
> >>   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.
> >>
> >>   Thanks,
> >
> > Ok, so removing the overlay is easy -- I commented out the MMC overlay 
> > line and now u-boot starts but....
> >
> > U-Boot 2021.07 (Jul 10 2021 - 02:42:14 +0000)
> >
> > DRAM:  948 MiB
> > RPI 3 Model B (0xa22082)
> > MMC:   mmc@7e202000: 0, mmcnr@7e300000: 1
> > Loading Environment from FAT... Card did not respond to voltage 
> > select! : -110
> > In:    serial
> > Out:   vidconsole
> > Err:   vidconsole
> > Net:   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
> >        scanning usb for storage devices... 0 Storage Device(s) found
> > Hit any key to stop autoboot:  0
> > switch to partitions #0, OK
> > mmc0 is current device
> > Scanning mmc 0:1...
> > libfdt fdt_check_header(): FDT_ERR_BADMAGIC
> > Scanning disk [email protected]...
> > ** Unrecognized filesystem type **
> > Card did not respond to voltage select! : -110
> > Scanning disk [email protected]...
> > Disk [email protected] 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
> >    Loader path: /boot/loader.efi
> >
> >    Initializing modules: ZFS UFS
> >    Load Path: /efi\boot\bootaa64.efi
> >    Load Device: 
> > /VenHw(e61d73b9-a384-4acc-aeab-82e828f3628b)/SD(0)/SD(0)/HD(1,MBR,0x76440bf1,0x3f,0x18fe7)
> >    Probing 3 block devices...not supported
> > not supported
> > not supported
> >  done
> >     ZFS found no pools
> >     UFS found no partitions
> > Failed to load '/boot/loader.efi'
> > panic: No bootable partitions found!
> > ## Application failed, r = 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 
> > loader, but then it fails AFTER THAT.
> >
> > Current config.txt:
> >
> > arm_64bit=1
> > dtparam=audio=on,i2c_arm=on,spi=on
> > # dtoverlay=mmc
> > dtoverlay=pwm
> > dtoverlay=disable-bt
> > device_tree_address=0x4000
> > kernel=u-boot.bin
> >
> >
> -- 
> Karl Denninger
> [email protected] <mailto:[email protected]>
> /The Market Ticker/
> /[S/MIME encrypted email preferred]/


-- 
Emmanuel Vadot <[email protected]> <[email protected]>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.