The /opt tree is a build of the userland repo which is deprecated,
and is no longer provided by firmware/rpi-firmware repos.
Handle skipping these if they are missing.
When switching to an explicit branch only remove the pieeprom and
recovery.bin files. On Pi4 this preserves the VL805 firmware binaries.
It's unlikely that these will be updated so just preserve whatever
was there instead of implementing an update mechanism for VL805
binaries.
* Download the latest EEPROM release to the local
/lib/firmware/raspberrypi/bootloader directory
* Update the rpi-eeprom tools
* Remove the old eeprom_version check
* Check bootloader commits as well as firwmware commits
* SKIP_BOOTLOADER default to 1 for now until fully tested
* Update recovery.bin if the bootloader revision has changed.
rpi-update tries to avoid rendering a Pi non-bootable by detecting
when a custom kernel is being used. Since dtb filenames are not
qualified with the kernel name, overwriting the dtb files for a
custom kernel but leaving the custom kernel unchanged may stop the
Pi booting.
However, adding kernel=kernel8.img to config.txt is a way to select a
kernel with 4kB pages on a Pi 5. Treat kernel8.img and kernel_2712.img
as non-custom kernels, and also allow SKIP_KERNEL=0 to be used to
force the kernel to be updated.
Github pages the artifact results, by default only giving the latest
30, but can be increased to 100 per page. If your build has fallen
off that list, then tough luck.
Ideally we want to iterate through the pages as well by
adding &page=N, but that can come later.
https://github.com/raspberrypi/rpi-update/issues/21
We've seen reports of 64-bit distributions that rely on the absence of a 32-bit kernel
to get firmware to switch to 64-bit mode (rather that explicitly using arm_64bit=1),
and that assumption is broken when adding 32-bit kernels to the boot directory
Signed-off-by: Dom Cobley <popcornmix@gmail.com>
I run rpi-update within a chroot on my NFS server for my diskless
Raspberry Pis, /proc/cpuinfo isn't in the chroot. This patch handles
that more gracefully.
* always set user-agent for api.github.com requests
This makes the updater work in environments where user agent is disabled via `.curlrc` (or similar means), which would otherwise run into an `Invalid hash given` error.
Ref: https://developer.github.com/v3/#user-agent-required
* move `-A curl` to a variable
* Support FW_SUBDIR a.k.a. os_prefix
The FW_SUBDIR environment variable is equivalent to the os_prefix config
setting, except that it is required to be the name of a directory. By
default, rpi-update will initialise FW_SUBDIR from the os_prefix setting
used to boot the device. A different subdirectory can be updated by
specifying a value for FW_SUBDIR in the environment, e.g.
sudo FW_SUBDIR=safe rpi-update
To specify explicitly that no subdirectory is to be used, i.e. to force
installation into /boot, use FW_SUBDIR=/ .
* Allow user to skip updating VideoCore libraries
Users who are running non-raspbian distributions, especially on other architectures
like arm64, may already have videocore libraries and applications compiled for arm64.
These will get overwritten unless updating the VideoCore libraries is skipped.
This implements a SKIP_VCLIBS option to allow that step to be skipped, which may be
used alongside the SKIP_SDK option. This is also referred to in a suggestion for a
SKIP_USERLAND option here: https://github.com/Hexxeh/rpi-update/pull/221#issuecomment-243559009
Signed-off-by: Satadru Pramanik <satadru@umich.edu>
It's normally desirable to use the latest bootloader when testing the
latest firmware releases. rpi-eeprom-update is specific to Raspbian but
so rpi-update can't easily do the EEPROM update itself without
duplicating all the functionality. Instead, just indicate that the
bootloader is out of date unless FREEZE_VERSION has been specified.
N.B. The MIN_VERSION is set to the Sep-10 release which was
to stable today on Sep 18.