Previously we were checking for an explicit ramfsfile= entry in config.txt,
but these days using auto_initramfs=1 is more common and not checked for.
Use device tree for check instead which should handle any scheme.
There is a mode where you can run rpi-update without a network,
if you have a local copy of the repo files. e.g.
SKIP_DOWNLOAD=1 SKIP_REPODELETE=1 FW_REPOLOCAL=/home/dom/.rpi-firmware rpi-update
That is currently not usable because of the git hash check. So fix it.
BRANCH currently applies to both firmware and bootloader but typically they won't have
branches of the same name (e.g there is no stable branch of bootloader).
So remove the option and encourage using parameters for the two branches
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>