mirror of
https://github.com/raspberrypi/rpi-eeprom.git
synced 2026-01-21 06:13:33 +08:00
Move to to the old directory now that it's no longer referenced by rpi-eeprom-update. Add a dependency check for 'lspci' which is normally provided by pciutils or busybox and remove the failover to the vl805 helper. Tweak the failure messages for missing dependencies to be slightly less OS specific.
32 lines
775 B
Bash
Executable File
32 lines
775 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
|
|
rm -f /usr/bin/vl805
|
|
|
|
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
|