The SD card is a nasty reliability issue with the RPi. Now, it's possible to do away with the SD card entirely. Thanks to Paul Mather for doing this first.
Here's the recipe (it's much easier than this list makes it seem):
sudo apt update
sudo apt full-upgrade
sudo reboot
sudo rpi-eeprom-update
this check if eeprom needs updatingIf an update is available, you can install it using :
sudo rpi-eeprom-update -a
sudo
shutdown
3. gz -d to get arm64.img
4. dd if=arm64.img of=/dev/rsd1 bs=1m conv=sync (as described in the INSTALL document) Obviously, change the of= line to your situation.
5. mount the msdos partition: mount /dev/rsd1e /mnt
7. unzip these files into a directory and cd to that directory
8. cp -Rp * /mnt/
answer 'y' to overwrite the existing files with the same name.
Now, umount /mnt and plug the drive into your RPi4, apply power, and it will boot. (Paul reports that you only need /boot/EFI/BOOT/bootaa64.efi and the other netbsd images can be deleted)
Probably works for different size memory RPi4, but I didn't try them.
I didn't try to figure out if it's possible to update the RPi4 onboard EEPROM via NetBSD. Info from RPi site about the EEPROM:
The Raspberry Pi 4 has an SPI-attached EEPROM (4MBits/512KB), which contains code to boot up the system and replaces bootcode.bin previously found in the boot partition of the SD card. Note that if a bootcode.bin is present in the boot partition of the SD card in a Pi 4, it is ignored.
Why use an SPI EEPROM?
Raspberry Pi 4 bootup procedure and SDRAM setup is considerably more complicated than on the previous Raspberry Pi models, so there is more risk inherent in code that's permanently incorporated in the ROM of the SoC.
USB has moved to a PCIe bus, and the Gigabit Ethernet driver is completely different to previous models, so again, having it permanently fixed into the ROM of the SoC was not feasible.
A small SPI EEPROM allows bugs to be fixed and features to be added after launch, in the field.
The local modifiable state means that OTP bootmode settings will not be required for network or USB mass storage boot on the Raspberry Pi 4. There are no user-modifiable OTP bootmode bits on Pi 4.
I hope this is a fairly accurate write-up. If you can't get it to work, I can probably help.