Port-arm archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

HOWTO: USB boot on 8 GB RPi4 with no SD card



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):

1. Get the RPi4 update firmware.  https://www.raspberrypi.org/documentation/hardware/raspberrypi/booteeprom.md  For me this involved downloading & running RPi OS from an SD card, and executing a few commands:
sudo apt update
sudo apt full-upgrade
sudo reboot
sudo rpi-eeprom-update        this check if eeprom needs updating

If 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)

I've tried this with a USB stick, and also a 500GB Samsung drive:  https://www.amazon.com/gp/product/B073GZBT36/   This drive works without any off-board power supply, when using the 'standard' 5.1V / 3.5A RPi4 USB-C power brick.  I used this one https://www.canakit.com/raspberry-pi-4-power-supply.html

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.



Home | Main Index | Thread Index | Old Index