Interesting changes since the last automatic update:
* Enable network install
* Enable over-clocking frequencies > 3GHz
See: ttps://github.com/raspberrypi/firmware/issues/1876
* Adjust SDRAM refresh rate according to temperature and address a performance
gap between 4GB and 8GB parts in benchmarks.
See: https://github.com/raspberrypi/firmware/issues/1854
* Support custom CA certs with HTTPS boot
* Move non Kernel ARM stages back to 512KB
https://github.com/raspberrypi/firmware/issues/1868
* Assorted HAT+ and NVMe interop improvements.
* Fix TRYBOOT if secure-boot is enabled.
* Preliminary support for D0 and CM5.
Enforcing package checksum validation makes it difficult to install
new EEPROM binaries via rpi-update causing extra churn of APT releases.
Drop this check by default because random corruption of these files
either via software or users never actually happens.
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
The Pi5 EEPROM is larger and can take longer to update which
slightly increases the change of failure if the board power is
disconnected across an update. Re-enable recovery.bin for SD
updates for now.
BCM2711 and BCM2712 require different EEPROM firmware and
consequently the binaries have been moved to chip specific
firmware directories.
firmware-2711 / firmware-2712
Remove the beta release folder and replace with a symlink to the
'latest' release.
Including beta firmware in the APT release causes unecessary churn
and occasionally causes an issue where a user might end up on an
old and unsupported beta release.
Instead, beta releases are will be feature specific and installed
manually via 'rpi-eeprom-config --edit beta-firmware.bin'
i.e. beta releases will be out-of-package custom firmware releases
downloaded from github. The functionality will be merged into
a new latest/stable release or abandoned.
N.B. The old beta releases have been archived to 'old' but are no
longer included in APT.
Debian's raspi-firmware package assumes the boot partition is mounted as
/boot/firmware/ rather than /boot/. This commit adds support for either
approach by default.
latest and default are links to directories, so follow them.
Before:
/usr/bin/rpi-eeprom-update
BOOTLOADER: up to date
CURRENT: Wed Jan 11 17:40:52 UTC 2023 (1673458852)
LATEST: Thu Jan 1 00:00:00 UTC 1970 (0)
RELEASE: critical (/lib/firmware/raspberrypi/bootloader/critical)
After:
/usr/bin/rpi-eeprom-update
BOOTLOADER: up to date
CURRENT: Wed Jan 11 17:40:52 UTC 2023 (1673458852)
LATEST: Wed Jan 11 17:40:52 UTC 2023 (1673458852)
RELEASE: critical (/lib/firmware/raspberrypi/bootloader/critical)
Signed-off-by: Ivan T. Ivanov <iivanov@suse.de>
The busybox implementation of find does not detect recursive nested
symlinks, this results in it finding multiple instances of of_node
matching -samefile, the result of which then fails the -e path test.
The of_node symlink we're tyring to find should match the path
/sys/bus/nvmem/devices/*/of_node so just limit the find depth to 3 as
there's no point searching deeper than that.
Signed-off-by: Allan Xavier <mr.a.xavier@googlemail.com>
Self-update is preferred to using recovery.bin because it avoids modifiy the
boot partition in order to rename recovery.bin after use. Since the 2711 ROM
does not support network or USB MSD loading of recovery.bin self-update has to
be used with other boot modes anyway.
If RPI_EEPROM_SELF_UPDATE=1 then avoid installing recovery.bin so long as the
current bootloader version supports self-update from SD/MMC and that doesn't
look as though SELF_UPDATE has been disable in the EEPROM config.
At present, the update script exits cleanly in the case it finds itself
run on Pi hardware prior to the 4/CM4/400, but if installed on non-Pi
hardware exits with various slightly cryptic errors (missing vcgencmd
and some subsequent math errors from trying to bit-shift the empty
BOARD_INFO variable).
This patch adds a similar exit to the non-Pi 4 case, with a slightly
more useful message.
Display a warning if the bootloader version is downgraded. This can
happen when swapping boot-media and the bootloader configuration is
changed from an OS with an old version of the rpi-eeprom package.
Remove the duplicated "update pending" and "to cancel update" messages.
Add a new flag '-s' which init scripts should specify to indicate that
the bootloader is running silently to do an automatic update. If '-s'
is specified and the 'default' release is specified then the bootloader
is only updated if it is older than the minimum version number specified
within this script.
This allows the default release to be updated to support new hardware
without forcing updates for existing users. However, if the
configuration is updated then the latest release should be used.
E.g. If network boot is selected via raspi-config or the Raspberry Pi
Imager then it's desirable to get the latest production release to
benefit from any bug fixes. However, a bootloader updated to support
new hardware (e.g. CM4) should not require Pi4B users to to upgrade
their bootloader.
The min-version is set to pieeprom-2020-09-03.
The 'strings' utility is installed by binutils whereas 'tr' belongs with
coreutils. Minimal systems will only contain the latter, due to binutils'
size (20-50 MB). So, convert all uses of 'strings' to 'tr' so as to
avoid the package dependency.
The second 'tr' usage converts non-ASCII characters into newlines so as
to isolate the "BUILD_TIMESTAMP=1234567890" statement (similar to what
'strings' does). There is no need for this in the first one: non-ASCII
characters are simply discarded as DT aliases have a fixed one line
format.
Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
Move to to the old directory now that it's no longer referenced by rpi-eeprom-update.
Add a dependency check for 'lspci' which is normally provided by
pciutils or busybox and remove the failover to the vl805 helper.
Tweak the failure messages for missing dependencies to be slightly less
OS specific.
The muxing of the SPI EEPROM and analog audio pins makes flashrom
usage unreliable and having two flashing mechanisms adds unnecessary
complexity to this script.
The bootloader supports EEPROM updates from USB-MSD, Network
and rpiboot there is no real need to support flashrom within this
utility. Therefore, the option to use flashrom can be removed from this
script.
Some users might forcibly install this on a board that isn't an rpi4.
Exit early, and explain why the program can't be run.
Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>