Files
rpi-eeprom/test/install
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

32 lines
795 B
Bash
Executable File

#!/bin/sh
# Convenience script for updating the rpi-eeprom updater via a git
# clone instead of apt install.
# For test & debug only.
set -e
script_dir="$(cd "$(dirname "$0")" && pwd)"
die() {
echo "$@" >&2
exit 1
}
FIRMWARE_DIR="${script_dir}/../firmware"
CONFIG="/etc/default/rpi-eeprom-update"
[ "$(id -u)" = "0" ] || die "$0 Must be run as root - try 'sudo $0 [-b]'"
cp -rfv "${FIRMWARE_DIR}"/* /lib/firmware/raspberrypi/bootloader
cp -fv "${script_dir}/../rpi-eeprom-config" /usr/bin
cp -fv "${script_dir}/../rpi-eeprom-update" /usr/bin
cp -fv "${script_dir}/../vl805" /usr/bin
cp -fv "${script_dir}/../rpi-eeprom-update-default" /etc/default/rpi-eeprom-update
if [ "$1" = "-b" ]; then
sed -i -e 's/^FIRMWARE_RELEASE_STATUS=.*/FIRMWARE_RELEASE_STATUS=beta/' "${CONFIG}"
fi