Re: RPI4 panic on boot with -current

From: Mark Millard <marklmi_at_yahoo.com>
Date: Sat, 09 Apr 2022 20:59:10 UTC
On 2022-Apr-9, at 08:44, bob prohaska <fbsd@www.zefox.net> wrote:

> On Fri, Apr 08, 2022 at 07:46:57PM -0700, Mark Millard wrote:
>> On 2022-Apr-8, at 18:53, bob prohaska <fbsd@www.zefox.net> wrote:
>> 
>>> Might this be related to "RPi4B's got a PMIC replacement,..." reported 4/3 ?
>> 
>> No: See the later note about the RPi4B Revision.
>> 
>>> A Pi4 (mechanical disk only, no microsd) trying to boot a fresh build of 
>>> -current reports:
>>> 
>>> Resetting system ... 
>>> 
>>> U-Boot 2020.10 (Mar 04 2021 - 04:32:31 +0000)
>> 
>> This is an old U-Boot compared to sysutils/u-boot-* .
>> There may well be good reasons for using it, for all
>> I know.
>> 
> 
> Only the most universal reasons: Inertia and ignorance 8-)
> 
> There are many versions of u-boot for rpi boards, some of 
> which are rather ambiguously named; u-boot-rpi-arm64 versus
> u-boot-rp4 is a good example.

u-boot-rpi-arm64 handles various RPi4B's, RPi3*'s, and, if I
remember right, RPi2B v1.2's. This is what snapshots and
BETA and PRERELEASE and RELEASE builds use these days.

The older ports are more specific, as I understand:

u-boot-rpi4 does not handle RPi3*'s or RPi2B v1.2's.
u-boot-rpi3 does not handle RPi4B's.

So the usable-contexts do overlap. Technically. there is no
unique answer to which to use.

> It appears the pkg-descr files
> have been updated since I last looked, but the descriptions
> overlap and it's not obvious how to choose among them. Man
> pages seem passe, is there some other guidance? 
> 
> Even if one knows which to select and build from ports the
> make install command doesn't really install; the admin still
> has to know what files to copy where.

With good reason for where: the msdosfs file system is not part
of FreeBSD's file systems (UFS or ZFS) and there is no standard
mount point for the msdosfs in FreeBSD's file system.

The admin may well be able to set up scripts that match how they
have things configured.

> Your instructions for 
> the task have been noted and saved, but even then it's very
> easy to make mistakes that are hard to recover from.

I suspect that you are referring to more than u-boot.bin above,
i.e., not just U-Boot.

Keeping a copy around of the last known-usable msdosfs content
before updating it is appropriate. The copy should be someplace
that can be used to replace any problematic update to the
msdosfs content.

> Does pkg handle u-boot and firmware updates more automatically?

No, with good reason for where: the msdosfs file system is not part
of FreeBSD's file systems (UFS or ZFS) and there is no standard
mount point for the msdosfs in FreeBSD's file system.

The admin may well be able to set up scripts that match how they
have things configured.

> Alternatively, is it feasible to update u-boot and firmware with
> an "installboot" target, either from the port directory or /usr/src?

No, with good reason for where: the msdosfs file system is not part
of FreeBSD's file systems (UFS or ZFS) and there is no standard
mount point for the msdosfs in FreeBSD's file system.

The admin may well be able to set up scripts that match how they
have things configured.

===
Mark Millard
marklmi at yahoo.com