Add the -l option to return the latest bootloader EEPROM image. This
will be used by rpi-eeprom-config to provide a more convenient mechanism
for quick config changes.
This command pipeline:
printf '00000000000000000000000000000000' | od -An -t x1 | tr -d ' '
produces this output:
30303030303030303030303030303030
*
Add a `-v` to od and a `\n` to the tr arg like so:
printf '00000000000000000000000000000000' | od -v -An -t x1 | tr -d ' \n'
to instead produce this output:
3030303030303030303030303030303030303030303030303030303030303030
Although it's unlikely that the revision value would generate multiple
lines or contain duplicate lines, it's better to be safe than sorry
especially since the changes to do so do not introduce any extra overhead
and use only POSIX-specified options/arguments.
It's also possible this code fragment could be copied and pasted elsewhere
to provide a "hexdump" of something that might be expected to generate
multiple lines and which may potentially contain duplicates. By fixing
the code here any breakage caused by such copying and pasting is avoided.
Signed-off-by: Kyle J. McKay <mackyle@gmail.com>
Normally BOOTFS is a local FAT partition but with NFS it's possible
that the NFS mount of /boot is not setup to have the equivalent
permissions as /boot. Set the .upd,.sig files to be readable by
all users to to avoid the case where the file is visible to root on the
Pi but is not readable by the TFTP daemon on the server.
Originally, rpi-eeprom-update was only for critically important
security or hardware compatibility requirements. Change the
text of rpi-eeprom-update to indicate that an update is available
rather than being required.
N.B. The systemd service runs with the -a flag which automatically
applies available updates because most users just use the release
folder which is only updated for major/critical updates.
Use `-lt` rather than `\<` so that, for example, this:
[ 2 -lt 17 ]
is true (whereas with `\<` in place of `-lt` it's false).
Also change an `=` comparison to `-eq` to be technically correct.
Helped-by: Tim Gover <tim.gover@raspberrypi.org>
Helped-by: MilhouseVH <milhouseVH.github@nmacleod.com>
Signed-off-by: Kyle J. McKay <mackyle@gmail.com>
Newer board revisions do not have a dedicated VL805 EEPROM. Instead,
the VL805 firmware is loaded from the bootloader EEPROM.
Update the version check to ignore standalone VL805 update files
on boards without a dedicated VL805 EEPROM.
If no .elf files are found in the boot partition then raise a warning
instead of an error. This normally indicates a system configuration
error but allow the usage of this tool in non-standard setups.
The beta release with supports network boot is now stable enough
for most configurations. This is now frozen except for major bugs
in order to allow more experimental features to be released as
beta.
The vl805 utility is not available for aarch64 and is deprecated
because it's only required for USE_FLASHROM.
Remove the dependency check so that it can be removed from the package.
The USE_FLASHROM code will be removed at a later date once the
self-update mechanism in the bootloader EEPROM is released.
Add the option for board-revision specific bootloaders firmware. This
allows critical firmware updates to be applied to specific board
revisions first before these are promoted to the generic firmware
directories.
Update the find operation to follow symlinks so that EEPROM images
in the board revision specific subdirectories can be links to the
generic images.
Document the EEPROM_CONFIG_HOOK option and move the existing
USE_FLASHROM env var to the new section.
The other more obscure path options can be documented in other commits
On a 64-bit beta kernel a hang in vcgencmd otp_dump was observed
blocking rpi-eeprom-update and apt. Since there is another method
for obtaining the board Revision that should never block use that instead.
Check for these commands and issue an error indicating how to fix this
on Debian. These are all installed by default on Raspbian but this
script might be re-used in other-systems e.g. custom busybox builds.
If the rpi-eeprom-images checksums file is available then validate
the checksums before applying the update.
Add a -i option to ignore checksums, this should only be required for
developers or people who have cloned the rpi-eeprom Github and installed
new files which are not available in the apt package.
Running 'sudo rpi-eeprom-update' will remove update files from the
boot partition. Since the user may run this command to check if
an update is required it will have the surprising side effect of
removing the pending update applied by the systemd service which
runs 'rpi-eeprom-update -a' at startup.
Move the cleanup code so that it only runs if a manual or automatic
update was requested.
Add an explicit option (-r) to just remove the previous update files.
bootloader versions and exit codes are integers so default to
zero in the JSON output
Fix missing $ prefix in arguments to write_status_info causing
EXIT_SUCCESS to be passes as a string instead of the value of
${EXIT_SUCCESS}
Fix missing commas in JSON output
* Option to restrict automatic updates to bootloader and/or vl805
* Change the machine mode output variables
* recovery.bin: Rebuild from Gitlab
* Rename CURRENT_TS and LATEST_TS in machine output
* New beta recovery.bin which can update the VLI EEPROM before
start.elf is loaded. This is the recommended and default method
because no USB devices will be in use at this stage.
* Extend the USE_FLASHROM configuration to use the vl805 tool
to program the VL805 directly.
* Generate SHA256 checksums in .sig files for the bootloader and
and VL805 images. This is required by the new recovery.bin to
guard against corrupted files being flashed to the EEPROM(s).
* Various variable renames to distinguish between the bootloader
and the VL805 images.
Select the recovery.bin to use according to FIRMWARE_RELEASE_STATUS
in order to allow a beta test version of recovery.bin to be provided
without risking breaking the stable version of recovery.bin
The concept of a safe mode recovery.bin bootloader was dropped in favour
of a recovery.bin which renames itself after updating the EEPROM. Remove
the old comments.