Commit Graph

91 Commits

Author SHA1 Message Date
MilhouseVH
40d608daaa include vl805 eeprom presence in machine output 2020-05-29 01:48:20 +01:00
Tim Gover
fd2ea72b26 rpi-eeprom-update: Update VL805 version check for boards without VL805 EEPROM
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.
2020-05-28 08:19:30 +01:00
Tim Gover
7c181f40f2 rpi-eeprom-update: Update help for FIRMWARE_RELEASE_STATUS 2020-05-26 15:01:28 +01:00
Tim Gover
5fb23cfcb8 rpi-eeprom-update: Mark USE_FLASHROM as deprecated. 2020-05-26 10:25:40 +01:00
Tim Gover
21bd52daa0 rpi-eeprom-update: Change BOOTFS .elf check to a warning
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.
2020-05-25 11:32:51 +01:00
andrum99
bbffc1a9fc rpi-eeprom-update: mention Pi4 only, remove references to SD card 2020-05-12 14:36:48 +01:00
Ryan Finnie
22ce0605e4 Allow for run from local git checkout
- Set firmware directory to script dir/firmware as last resort
- Bypass IGNORE_DPKG_CHECKSUMS when in local mode
2020-03-06 09:06:51 -08:00
Tim Gover
c77267e84b Print the firmware image directory in the version status message 2020-02-28 15:01:41 +00:00
Tim Gover
3be67ad8a8 firmware: Promote the latest beta firmware to stable
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.
2020-02-27 14:51:53 +00:00
Tim Gover
fed1ca62a5 rpi-eeprom-update: Remove dependency on vl805
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.
2020-02-27 14:00:27 +00:00
Tim Gover
da14a843a7 rpi-eeprom-update: Add support for board-revision specific images.
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.
2020-01-10 15:11:27 +00:00
Tim Gover
e9290b3bfc Merge pull request #67 from timg236/vl805_match_ver
rpi-eeprom-update: Improve version selection for VL805
2020-01-08 09:53:01 +00:00
Andrew Scheller
d92d4e1a94 Fix typo
As spotted in the now-closed #65
2019-12-17 19:50:46 +00:00
Tim Gover
1a0070fe30 rpi-eeprom-update: Improve version selection for VL805
Deprecate the vl805.latest file and compare version numbers. This
ensures that the rpi-eeprom-update will never downgrade the VL805.
2019-12-12 19:06:18 +00:00
Tim Gover
0855227532 rpi-eeprom-update: Add hook/flashrom help and fix section formatting
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
2019-12-11 11:17:35 +00:00
Tim Gover
560f001e99 rpi-eeprom-update: Add support for config txt processing hooks 2019-12-10 12:23:08 +00:00
Tim Gover
390b4b85e1 vcgencmd: Use cpuinfo instead of otp_dump
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.
2019-11-29 15:21:58 +00:00
MilhouseVH
e204b1f4eb use lspci if available instead of vl805. Avoid calling vl805 twice. 2019-11-09 03:46:23 +00:00
josef radinger
6895418ffe fix typo 2019-10-29 15:16:43 +01:00
Tim Gover
5c9a0cf40d rpi-eeprom-update: Check for vcmailbox, vcgencmd, dtparam, dtoverlay
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.
2019-10-24 15:08:12 +01:00
Tim Gover
95ba7b50eb Tweak update status for BOOTLOADER, VL805
Make up-to-date message specific to bootloader or vl805 and indicate if
the tool was not run as root.
2019-10-24 12:57:01 +01:00
Tim Gover
e559d075ff rpi-eeprom-update: Verify DPKG checksums if available
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.
2019-10-23 13:49:12 +01:00
Tim Gover
e024ab5373 rpi-eeprom-update: Don't remove update files if run with no arguments
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.
2019-10-23 11:59:07 +01:00
MilhouseVH
b8b7082abf handle undefined machine output consistently 2019-10-22 20:56:28 +01:00
MilhouseVH
269f5605f1 revert machine output exit code to string 2019-10-22 20:55:27 +01:00
Tim Gover
431e70e891 Standarize on UPDATE_VERSION - use command -v
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
2019-10-22 12:28:03 +01:00
Tim Gover
ac70cb24fa Add rpi-eeprom-update -A option
* 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
2019-10-22 12:28:03 +01:00
Tim Gover
d354bbe700 Add support for updating the USB (VL805) EEPROM
* 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.
2019-10-22 12:27:58 +01:00
Tim Gover
d8f713c20d recovery: Make recovery.bin specific to the release status
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
2019-10-10 10:52:38 +01:00
Tim Gover
f8a8cf11bf rpi-eeprom-update: Remove comments about safe mode
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.
2019-10-07 08:49:24 +01:00
andrum99
f70b6745d1 usage: critical -> applicable 2019-09-10 21:41:00 +01:00
andrum99
06ff41d5af add colons to usage 2019-09-10 18:46:13 +01:00
andrum99
016c50258b fix call to getUpdateVersion 2019-09-10 18:44:15 +01:00
andrum99
bf0c89afa1 fix comment 2019-09-10 18:42:44 +01:00
andrum99
79a58d7469 getLatestCriticalUpdate -> getUpdateVersion
Function does not necessarily check for latest version. Also, it does not actually get the update, just the version, so rename function to 'getUpdateVersion' to match 'getCurrentVersion'. Similarly with 2 variable names.
2019-09-10 18:41:15 +01:00
andrum99
fadab8e830 fix quotation mark 2019-09-10 18:28:17 +01:00
andrum99
8af3f6fd68 rpi-eeprom-update: minor fixes to usage 2019-09-10 18:22:08 +01:00
Tim Gover
b19d7b379d rpi-eeprom-update: -h should not require vcgencmd
More the checkDependencies call to after the options parsing so that
-h can be run for help2man.
2019-09-10 14:14:24 +01:00
Tim Gover
47f985542d rpi-eeprom-update: Fix CPU detection and improve documentation
* Use vcgencmd otp_dump to get the board-revision because the format
  is predictable.
* Change the -f completion message to indicate that the update is
  scheduled rather than complete.
* Add some notes to help about the update mechanism.
2019-09-09 10:12:32 +01:00
andrum99
41831ec319 rpi-eeprom-update: fix typos in usage 2019-09-03 10:23:31 +01:00
Tim Gover
8bf77cece1 Initial revision
Import the files used for the first beta release.
2019-09-02 11:46:15 +01:00