Re: FYI: upcoming 13.2-RELEASE vs. 8 GiByte RPi4B's based on U-Boot 2023.01 recently in use, given UEFI style booting

From: Mark Millard <marklmi_at_yahoo.com>
Date: Thu, 23 Mar 2023 00:21:34 UTC
On Mar 22, 2023, at 16:35, void <void@f-m.fm> wrote:

> On Wed, Mar 22, 2023 at 10:48:59AM -0700, Mark Millard wrote:
> 
>> It is not the RPi* firmware vintage that drives the
>> 8 GiByte related boot failure: it is just 2023.01 of
>> U-Boot.
>> 
>> So only the u-boot.bin needs to be replaced, nothing
>> else.
> 
> I wasn't aware of the detail, and not knowledgeable enough of the issue
> so my "remedy" was a simplistic "the stuff in this msdos partition
> worked, the other didn't" :D and thats why I replaced everything with
> the exception of efi/*
> 
> I transferred the files on the msdos partition of the running 13.1-p6
> system to the msdos partition of the main-n261544-cee09bda03c8 image,
> wrote the image to usb then booted to it, then ran bsdinstall to install
> it to external usb3 hd (zfs), tried to boot *that* and failed (it still wouldn't boot from the hd because the installer still doesn't populate the msdos partition of the hd with the full contents of the msdos bit of the install medium). So booted back to the usb key again, plugged in
> the hd after it fully booted, mounted the msdos partition of the hd onto
> /mnt and copied all of /boot/msdos/* to it *except* /boot/msdos/efi.
> Powered down, booted directly to the hd.
> 
> So now this rpi4 now has 13.1-p6 vintage msdos bits running main-n261544-cee09bda03c8.

The RPi* firmware FreeBSD uses dates back to 2021-03-05
when 1.20210303 was checked in. It has been a long
time since that update.

To my knowledge, each 13.1-RELEASE-p? still uses the
exact same RPi* firmware as 13.1-RELEASE : only FreeBSD
material is updated by -p? updates. So the U-Boot also
has not been been updated in any 13.1-RELEASE-p? as far
as I know. Similarly for armstub8-gic.bin and
armstub8.bin (which are distinct from RPi* firmware and
from u-Boot, despite how FreeBSD bundles them).

Snapshots and 13.2-??? are another matter for U-Boot.

> 
>> But there are RPi* firmware vintage issues around:
>> main [so: 14] and stable/13 have had the FreeBSD kernel
>> fixed to allow recent RPi* firmware to boot.
> 
> what was fixed in the kernel?

(I forgot to mention the recent reboot issue and its fix,
as well.)

Using main (which happended first):

The kernel crash for modern RPi* firmware (the basic
problem has existed since the beginning but was
exposed by .dtb file changes in more modern firmware):

Fri, 24 Feb 2023
    . . .
    • git: 9873b1716970 - main - bcm_dma: attach at an earlier bus pass Mitchell Horne 
    • git: 07ccf71451d7 - main - bcm_dma: don't dereference NULL softc Mitchell Horne

The reboot issue fix (only an issue for main [so: 14]):

Wed, 15 Mar 2023
    . . .
    • git: 8937bd37d07c - main - arm64: limit EFI excluded regions to physical memory types Mitchell Horne

>> But releng/13.2 and before do not have that fix and so
>> can not have RPi* firmware much more recent than is now
>> FreeBBSD-standard ( sysutils/rpi-firmware ). This likely
>> means that sysutils/rpi-firmware will be frozen until
>> releng/13.3 (so: about another year).
> 
> I try not to mess with the firmware if I can help it.
> 
>> Note: I do not use freebsd-update to upgrade systems. But
>> I've expect it to only do FreeBSD material, not RPi*
>> firmware or U-Boot, just like bsd-install does not deal
>> with any non-FreeBSD aspects of things.
> 
> that's what my expectation is too. The reason to use freebsd-update was
> to have a stable reference system.


===
Mark Millard
marklmi at yahoo.com