rpi-eeprom-update: Add the option to use flashrom for updates on Raspberry Pi 5

On Raspberry Pi 5 there are dedicated pins for the bootloader SPI
EEPROM. This makes it possible to do immediate updates via flashrom.

The "current" EEPROM config is the EEPROM config at boot rather
than what has just been written to the SPI flash because this is
consistent with current behaviour.

To use flashrom instead of recovery.bin for bootloader updates
set RPI_EEPROM_USE_FLASHROM=1 in /etc/defaults/rpi-eeprom-update

BCM2711
On CM4, Pi4, CM4-S, Pi400 config.txt must be modified to disable
the analog audio driver which shares the GPIO pins used by the
bootloader EEPROM.

dtparam=spi=on
dtoverlay=audremap
dtoverlay=spi-gpio40-45
This commit is contained in:
Tim Gover
2023-10-24 12:33:38 +01:00
parent aded0825e3
commit db154d4710
3 changed files with 135 additions and 16 deletions

View File

@@ -2,8 +2,10 @@
FIRMWARE_ROOT=/lib/firmware/raspberrypi/bootloader
FIRMWARE_RELEASE_STATUS="default"
FIRMWARE_BACKUP_DIR="/var/lib/raspberrypi/bootloader/backup"
USE_FLASHROM=0
EEPROM_CONFIG_HOOK=
# BOOTFS can be set here to override auto-detection in rpi-eeprom-update
#BOOTFS=/boot
# Use flashrom if available to update the bootloader without rebooting - Raspberry Pi 5
#RPI_EEPROM_USE_FLASHROM=1