Re: Update boot partition on a Pi - necessary? How?

From: Ronald Klop <ronald-lists_at_klop.ws>
Date: Thu, 04 Jul 2024 11:48:50 UTC
Van: Ronald Klop <ronald-lists@klop.ws>
Datum: donderdag, 4 juli 2024 13:36
Aan: "Patrick M. Hausen" <pmh@hausen.com>
CC: FreeBSD ARM List <freebsd-arm@freebsd.org>
Onderwerp: Re: Update boot partition on a Pi - necessary? How?
> 
>  
> Van: "Patrick M. Hausen" <pmh@hausen.com>
> Datum: donderdag, 4 juli 2024 09:02
> Aan: FreeBSD ARM List <freebsd-arm@freebsd.org>
> Onderwerp: Update boot partition on a Pi - necessary? How?
>> 
>> Hi all,
>> 
>> my first release upgrade on the Pi platform - 14.0 --> 14.1.
>> Smooth as usual. Special thanks to ronald@ for the
>> smsc(4) improvements.
>> 
>> Now I wonder how to do what I regularly do on amd64,
>> namely update either the legacy boot partition or the
>> EFI boot loader?
>> 
>> What *are* all these files on that FAT partition, anyway?
>> Is there any documentation on this?
>> 
>> Thanks for pointers.
>> 
>> Kind regards,
>> Patrick
>>  
>> 
>> 
>> 
> 
> 
> Hi,
> 
> Thanks :-)
> 
> The files in the FAT partition are a combination of
> https://www.freshports.org/sysutils/rpi-firmware/
> and
> https://www.freshports.org/sysutils/u-boot-rpi4/
> 
> But we also have https://www.freshports.org/sysutils/u-boot-rpi-arm64/ and I don't know what the difference is.
> 
> You can install the rpi-firmware and u-boot-rpi4 ports/pkgs and copy the content to the FAT partition. Unfortunately I don't know an automated way to do this and if it will overwrite config files.
> 
> Another solution:
> 
> What I usually do is
> - download the https://download.freebsd.org/releases/arm64/aarch64/ISO-IMAGES/14.1/FreeBSD-14.1-RELEASE-arm64-aarch64-RPI.img.xz release file
> - mount it using mdconfig
> - backup and empty the current FAT partition
> - copy the content of the FAT partition from the mounted img
> - diff the config files with my backup.
> At least than I know I have all the files which were also in the release and hopefully tested by some people.
> 
> A mdconfig+mount example can be found here: https://wiki.freebsd.org/arm/Raspberry%20Pi#Boot_Loader_Issues although they copy files into the image instead of the other way around.
> 
> Regards,
> Ronald.
>  

BTW. If you are familiar with some scripting.

The release image is build from this: /usr/src/release/release.sh and the boot files for RPI-4 come from the arm64/RPI.conf file in that directory.
Apparently the release does use the u-boot-rpi-arm64 pkg instead of u-boot-rpi4.

Others have much more hands-on experience with these script as I do. But I think, if you can read scripts this is the best documentation on what files are in the FAT partition.

Regards,
Ronald.