diff --git a/debian/changelog b/debian/changelog index b00f216..8c8b3ff 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,21 @@ +rpi-eeprom (11.10-1) buster; urgency=medium + + [ Tim Gover ] + * make-release: Add a script for generating Raspberry Pi Imager releases + * Add recovery.bin to make-release + + [ peter.harper ] + * pieeprom-2021-03-04.bin - NVMe boot support - BETA + + [ Andrew Scheller ] + * Add make-beta-release as a wrapper around make-release + * Allow a custom firmware_status to be set via env-var + * Refactor the imager script to reduce duplication and remove reliance on symlinks + * Make make-release more flexible, and add make-imager-release as a wrapper script around it + * Typos + + -- Serge Schneider Fri, 12 Mar 2021 10:49:44 +0000 + rpi-eeprom (11.9-1) buster; urgency=medium [ Nicolas Saenz Julienne ] diff --git a/firmware/beta/pieeprom-2021-03-04.bin b/firmware/beta/pieeprom-2021-03-04.bin new file mode 100755 index 0000000..5456a04 Binary files /dev/null and b/firmware/beta/pieeprom-2021-03-04.bin differ diff --git a/firmware/beta/recovery.bin b/firmware/beta/recovery.bin old mode 100644 new mode 100755 index 8e30d95..28c08e9 Binary files a/firmware/beta/recovery.bin and b/firmware/beta/recovery.bin differ diff --git a/firmware/release-notes.md b/firmware/release-notes.md index f499666..a61fcbe 100644 --- a/firmware/release-notes.md +++ b/firmware/release-notes.md @@ -3,6 +3,20 @@ 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 +## 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) * Freezing for default/critical update. diff --git a/imager/README.txt b/imager/README.txt new file mode 100644 index 0000000..be55490 --- /dev/null +++ b/imager/README.txt @@ -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. diff --git a/imager/boot-conf-default.txt b/imager/boot-conf-default.txt new file mode 100644 index 0000000..ec09fc7 --- /dev/null +++ b/imager/boot-conf-default.txt @@ -0,0 +1,6 @@ +[all] +BOOT_UART=0 +WAKE_ON_GPIO=1 +ENABLE_SELF_UPDATE=1 +BOOT_ORDER=0xf41 + diff --git a/imager/boot-conf-network.txt b/imager/boot-conf-network.txt new file mode 100644 index 0000000..6ebc855 --- /dev/null +++ b/imager/boot-conf-network.txt @@ -0,0 +1,6 @@ +[all] +BOOT_UART=0 +WAKE_ON_GPIO=1 +ENABLE_SELF_UPDATE=1 +BOOT_ORDER=0xf21 + diff --git a/imager/boot-conf-sd.txt b/imager/boot-conf-sd.txt new file mode 100644 index 0000000..ec09fc7 --- /dev/null +++ b/imager/boot-conf-sd.txt @@ -0,0 +1,6 @@ +[all] +BOOT_UART=0 +WAKE_ON_GPIO=1 +ENABLE_SELF_UPDATE=1 +BOOT_ORDER=0xf41 + diff --git a/imager/boot-conf-usb.txt b/imager/boot-conf-usb.txt new file mode 100644 index 0000000..30abc04 --- /dev/null +++ b/imager/boot-conf-usb.txt @@ -0,0 +1,6 @@ +[all] +BOOT_UART=0 +WAKE_ON_GPIO=1 +ENABLE_SELF_UPDATE=1 +BOOT_ORDER=0xf14 + diff --git a/imager/make-beta-release b/imager/make-beta-release new file mode 100755 index 0000000..25c3e71 --- /dev/null +++ b/imager/make-beta-release @@ -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} + diff --git a/imager/make-imager-release b/imager/make-imager-release new file mode 100755 index 0000000..ffd4e7e --- /dev/null +++ b/imager/make-imager-release @@ -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 diff --git a/imager/make-release b/imager/make-release new file mode 100755 index 0000000..556d780 --- /dev/null +++ b/imager/make-release @@ -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 < + + 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