Merge branch 'master' into debian/buster

This commit is contained in:
Serge Schneider
2021-03-12 10:49:43 +00:00
11 changed files with 174 additions and 0 deletions

Binary file not shown.

BIN
firmware/beta/recovery.bin Normal file → Executable file

Binary file not shown.

View File

@@ -3,6 +3,20 @@
USB MSD boot also requires the firmware from Raspberry Pi OS 2020-08-20 or newer. USB MSD boot also requires the firmware from Raspberry Pi OS 2020-08-20 or newer.
https://www.raspberrypi.org/documentation/hardware/raspberrypi/bcm2711_bootloader_config.md https://www.raspberrypi.org/documentation/hardware/raspberrypi/bcm2711_bootloader_config.md
## 2021-03-04 - NVMe boot support - BETA
* Adds support for NVMe to the bootloader with a new NVMe boot mode "6"
NVMe currently only works for controller 0 on namespace 1 with a page size of 4096 bytes
and block size of 512 bytes
* The default boot order has been updated to F641 for cm4 ONLY, so NVMe boot is
attempted after SD and USB
To use the new NVMe add "6" to the BOOT_ORDER.
This requires the latest rpi-update firmware to work or else you will see a compatibility
error on boot. You also need the latest kernel from rpi-update to load rootfs from NVMe
see https://github.com/Hexxeh/rpi-firmware/commit/48570ba954a318feee348d4e642ebd2b58d9dd97
and https://github.com/Hexxeh/rpi-firmware/commit/e150906874ff8b9fb6271971fa4238997369f790
## 2021-02-22 - Promote 2021-02-16 to stable - STABLE (LATEST) ## 2021-02-22 - Promote 2021-02-16 to stable - STABLE (LATEST)
* Freezing for default/critical update. * Freezing for default/critical update.

28
imager/README.txt Normal file
View File

@@ -0,0 +1,28 @@
Raspberry Pi 4 EEPROM bootloader rescue image
*********************************************
The Raspberry Pi 4 has a small EEPROM used to store the bootloader.
This rescue image reverts the bootloader EEPROM to factory default settings.
This rescue image also updates the USB 3.0 (VL805) firmware to the latest
version (138a1) with better full-speed Isochronous endpoint support.
To re-flash the EEPROM(s)
1. Unzip the contents of this zip file to a blank FAT formatted SD-CARD
2. Power off the Raspberry Pi
3. Insert the SD-CARD
4. Power on Raspberry Pi
5. Wait at least 10 seconds
This easiest method for creating and formatting the SD-CARD is to use the
Raspberry Pi Imager from https://raspberrypi.org/downloads
If successful, the green LED light will blink rapidly (forever), otherwise
an error pattern will be displayed.
If a HDMI display is attached then the screen will display green for success
or red if a failure occurs.
N.B. This image is not a bootloader it simply replaces the on-board bootloader.

View File

@@ -0,0 +1,6 @@
[all]
BOOT_UART=0
WAKE_ON_GPIO=1
ENABLE_SELF_UPDATE=1
BOOT_ORDER=0xf41

View File

@@ -0,0 +1,6 @@
[all]
BOOT_UART=0
WAKE_ON_GPIO=1
ENABLE_SELF_UPDATE=1
BOOT_ORDER=0xf21

6
imager/boot-conf-sd.txt Normal file
View File

@@ -0,0 +1,6 @@
[all]
BOOT_UART=0
WAKE_ON_GPIO=1
ENABLE_SELF_UPDATE=1
BOOT_ORDER=0xf41

6
imager/boot-conf-usb.txt Normal file
View File

@@ -0,0 +1,6 @@
[all]
BOOT_UART=0
WAKE_ON_GPIO=1
ENABLE_SELF_UPDATE=1
BOOT_ORDER=0xf14

13
imager/make-beta-release Executable file
View File

@@ -0,0 +1,13 @@
#!/bin/sh
set -e
script_dir=$(cd "$(dirname "$0")" && pwd)
firmware_status=${firmware_status:-"beta"}
firmware_dir=${script_dir}/../firmware/${firmware_status}
pieeprom_version=$(basename $(ls ${firmware_dir}/pieeprom-*.bin | sort -V | tail -1) .bin | cut -d- -f2-5)
vl805_version=$(basename $(ls ${firmware_dir}/vl805-*.bin | sort -V | tail -1) .bin | cut -d- -f2)
${script_dir}/make-release ${firmware_status} ${pieeprom_version} ${vl805_version} "${script_dir}" ${firmware_status}_release rpi-boot-eeprom-recovery-${firmware_status}

7
imager/make-imager-release Executable file
View File

@@ -0,0 +1,7 @@
#!/bin/sh
set -e
script_dir=$(cd "$(dirname "$0")" && pwd)
${script_dir}/make-release critical 2020-09-03 000138a1 "${script_dir}" release rpi-boot-eeprom-recovery

88
imager/make-release Executable file
View File

@@ -0,0 +1,88 @@
#!/bin/sh
# Generates three variants of the rpi-eeprom-recovery.zip file for
# SD, USB and NETWORK priority matching the raspi-config options,
# plus a default (same as SD)
set -e
script_dir=$(cd "$(dirname "$0")" && pwd)
tmp_dir=""
die() {
echo "$@" >&2
exit 1
}
cleanup() {
if [ -d "${tmp_dir}" ]; then
rm -rf "${tmp_dir}"
fi
tmp_dir=""
}
gen_release() {
config="${1}"
out="${2}"
[ -f "${config}" ] || die "File not found \"${config}\""
(
tmp_dir="$(mktemp -d --tmpdir tmp.rpi-eeprom.XXXXXXXXXX)"
cd "${tmp_dir}"
cp "${script_dir}/README.txt" .
cp "${firmware_dir}/recovery.bin" .
cp "${firmware_dir}/vl805-${vl805_version}.bin" vl805.bin
sha256sum vl805.bin | awk '{print $1}' > vl805.sig
"${script_dir}/../rpi-eeprom-config" \
--config "${config}" --out pieeprom.bin \
"${firmware_dir}/pieeprom-${pieeprom_version}.bin" || die "Failed to create updated EEPROM config with \"${config}\""
sha256sum pieeprom.bin | awk '{print $1}' > pieeprom.sig
echo "Creating ${out}"
zip "${out}" *
cleanup
)
}
usage() {
cat <<EOF
make-release <firmware_status> <pieeprom_version> <vl805_version> <config_dir> <output_dir> <output_basename>
Example: make-release critical 2020-09-03 000138a1 . release rpi-boot-eeprom-recovery
EOF
exit
}
trap cleanup EXIT
firmware_status="${1}"
pieeprom_version="${2}"
vl805_version="${3}"
config_dir="${4}"
output_dir="${5}"
output_basename="${6}"
[ -n "${firmware_status}" ] || usage
[ -n "${pieeprom_version}" ] || usage
[ -n "${vl805_version}" ] || usage
[ -n "${config_dir}" ] || usage
[ -n "${output_dir}" ] || usage
[ -n "${output_basename}" ] || usage
firmware_dir=${script_dir}/../firmware/${firmware_status}
[ -d "${firmware_dir}" ] || (echo "${firmware_dir} doesn't exist" && exit 1)
[ -f "${firmware_dir}/pieeprom-${pieeprom_version}.bin" ] || (echo "${firmware_status}/pieeprom-${pieeprom_version}.bin doesn't exist" && exit 1)
[ -f "${firmware_dir}/vl805-${vl805_version}.bin" ] || (echo "${firmware_status}/vl805-${vl805_version}.bin doesn't exist" && exit 1)
[ -d "${config_dir}" ] || (echo "${config_dir} doesn't exist" && exit 1)
tag="${pieeprom_version}-vl805-${vl805_version}"
# use realpath to ensure paths are absolute
config_dir=$(realpath "${config_dir}")
output_dir=$(realpath "${output_dir}")
rm -rf "${output_dir}"
mkdir "${output_dir}"
# Build the different boot priority flavours
gen_release "${config_dir}/boot-conf-default.txt" "${output_dir}/${output_basename}-${tag}.zip"
for variant in sd usb network; do
gen_release "${config_dir}/boot-conf-${variant}.txt" "${output_dir}/${output_basename}-${tag}-${variant}.zip"
done