Raspberry Pi 4 UEFI Firmware - efi partition information - trying to get zfs on root on usb working

Where can I find more information about the msdosboot efi partiton?

I am trying to get my Raspberry Pi 4 working with ZFS on Root on an external usb drive. What I have done that worked follows https://www.reddit.com/r/freebsd/comments/v4b5oj/freebsd_on_zfs_on_raspberry_pi/ and https://www.reddit.com/r/freebsd/comments/rzh6xh/comment/hrv68l2/ :

1. Get the FreeBSD-13.1-RELEASE-arm64-aarch64-RPI.img and burn it to a big sdcard (big enough to hold freebsd and copy of the image as well as whatever intermediate files are required... this process would prolly work from a regular system too, but hey, it works on the pi itself, too, given enough disk space)
2. Boot the pi
3. Get the FreeBSD-13.1-RELEASE-arm64-aarch64-RPI.img onto the booted freebsd fs
4. Insert the USB drive
3. Burn the image to the USB and resize the partitions to fill (run edited (da0, not da1) version of poster's dd.sh)
3. use mdconfig to create a memory device with the image
4. mount it
5. Blow away the USB ufs, create zfs - zroot, and populate it (run edited (zroot, not zpi) version of poster's zfs.sh)
6. Shutdown and remove the SD card
7. Boot the pi

It 'works' as in it boots up and can be used the same way the ufs version.

What is bothersome is the video. It comes up low res. After commenting out hdmi_safe=1 in config.txt (mount -t msdosfs /dev/da0p1 /mnt), it comes up high res, but the beastie menu is all ascii and ugly (window border is made of characters, etc).

In config:
Code:
[all]
arm_64bit=1
dtparam=audio=on,i2c_arm=on,spi=on
dtoverlay=mmc
dtoverlay=disable-bt
device_tree_address=0x4000
kernel=u-boot.bin

[pi4]
#hdmi_safe=1
armstub=armstub8-gic.bin

I'm not trying to use this as a desktop, so it's not critical. I am just thinking of using the system as a fossil server and so far as I can tell it works fine. If I can't figure out how to get the usual beastie menu, I'll prolly just leave it, but these kinds of things nag me :).

Oh, I'm sure the issue is related to my complete lack of knowledge around EFI/UEFI, overlays, stubs and whatnot, hence the leading question about where to find more information on what's going on there in freebsd.

Help!
 
https://ghostbsd-arm64.blogspot.com/2021/05/audit-your-boot-files-with-md5deep.html I made this post in February 2022
July 8, 2023 I updated in a comment the md5 checksum values for the boot files for Raspberry Pi 4B. Had to shorten the comment length and eliminated extra lines.

Boot files for a Raspberry Pi 4B, U-BOOT.BIN selects /boot/kernel/kernel file to load and execute
Important files are:
start4.elf
fixup4.dat
config.txt
u-boot.bin The new supplied u-boot.bin FreeBSD version 2023.01 is NOT working. Use the October 2021 version of u-boot.bin
-rwxr-xr-x 1 root wheel 568960 Oct 21 2021 u-boot.bin
-rwxr-xr-x 1 root wheel 602552 Jun 22 07:08 u-bootJune22_broken.bin
Jul 08, 2023, 16:02:48 md5deep -z -r * > ~/audit_bootfiles_raspi4b_july8.md5_hash

5888 3a92d74688db2222f8720662dc5902d0 /media/msdos/armstub8.bin
5888 165ec91ff1cd734909c6c1debb78e951 /media/msdos/armstub8-gic.bin
52456 bc175da040361a117dea6ca0d5459c12 /media/msdos/bootcode.bin
228800 6bae42b26707aa0e05f3d47bdafaab96 /media/msdos/start4.elf
8454 989ee4bfa4ba88b871c5a8d68790469e /media/msdos/fixup4x.dat
860628 2b457f7c83e736020313fd4feaf6a456 /media/msdos/EFI/BOOT/bootaa64.efi


Will try to update this information with July 6 2023 data from this snapshot .ISO image

6bae42b26707aa0e05f3d47bdafaab96 /media/msdos/start4.elf -rwxr-xr-x 1 root root 2228800 Mar 3 2021 start4.elf
92d0a068a2ab7039d663673d03482cc4 /media/msdos/fixup4.dat -rwxr-xr-x 1 root root 5448 Mar 3 2021 fixup4.dat
2b457f7c83e736020313fd4feaf6a456 /media/msdos/EFI/BOOT/bootaa64.efi -rwxr-xr-x 1 root root 860628 Jul 6 08:18 bootaa64.efi
71287bb1f4d4ceb9dc9cbf1efb0186a8 /media/msdos/u-boot.bin -rwxr-xr-x 1 root root 602552 Jul 6 04:27 u-boot.bin NOT sure if this version boots properly or is wrong installed

uname -a
FreeBSD generic 14.0-CURRENT FreeBSD 14.0-CURRENT #0 main-n263748-b95d2237af40: Thu Jun 22 11:10:5
0 UTC 2023 root@releng1.nyi.freebsd.org:/usr/obj/usr/src/arm64.aarch64/sys/GENERIC arm64

root@generic:/boot/efi # ls -l u-bo*
-rwxr-xr-x 1 root wheel 568960 Oct 21 2021 u-boot.bin
-rwxr-xr-x 1 root wheel 602552 Jun 22 07:08 u-bootJune22_broken.bin
root@generic:/boot/efi # md5 u-bo*
MD5 (u-boot.bin) = 4c2998a9bd108775ada821a56e6362a7
MD5 (u-bootJune22_broken.bin) = be6c1637a6c775fad754efa723eff516
root@generic:/boot/efi #


20ab45202003d40ef7b82a0d213745ca /media/msdos/config.txt -rwxr-xr-x 1 root root 177 Jul 6 04:46 config.txt
$ cat /media/msdos/config.txt
[all]
arm_64bit=1
dtparam=audio=on,i2c_arm=on,spi=on
dtoverlay=mmc
dtoverlay=disable-bt
device_tree_address=0x4000
kernel=u-boot.bin

[pi4]
hdmi_safe=1
armstub=armstub8-gic.bin
 

Attachments

  • config_newer.txt
    2.5 KB · Views: 76
  • Howto_obtain_checksums_of_arm64_boot_files.txt
    12.8 KB · Views: 63
Last edited:
Back
Top