Merge branch 'master' into debian/bullseye

This commit is contained in:
Serge Schneider
2021-11-15 15:59:11 +00:00
9 changed files with 114 additions and 34 deletions

View File

@@ -2,16 +2,15 @@
This repository contains the scripts and pre-compiled binaries used to create the `rpi-eeprom` package which is used to update the Raspberry Pi 4 bootloader and VLI USB controller EEPROMs. This repository contains the scripts and pre-compiled binaries used to create the `rpi-eeprom` package which is used to update the Raspberry Pi 4 bootloader and VLI USB controller EEPROMs.
# Support # Support
Please check the Raspberry Pi [general discussion forum](https://www.raspberrypi.org/forums/viewforum.php?f=63) if you have a support question. Please check the Raspberry Pi [general discussion forum](https://forums.raspberrypi.com/viewforum.php?f=63) if you have a support question.
# Reset to factory defaults # Reset to factory defaults
To reset the bootloader back to factory defaults use [Raspberry Pi Imager](https://www.raspberrypi.org/downloads/) to write an EEPROM update image to a spare SD card. Select `Misc utility images` under the `Operating System` tab. To reset the bootloader back to factory defaults use [Raspberry Pi Imager](https://www.raspberrypi.com/software/) to write an EEPROM update image to a spare SD card. Select `Misc utility images` under the `Operating System` tab.
# Bootloader documentation # Bootloader documentation
* [The boot folder](https://www.raspberrypi.org/documentation/configuration/boot_folder.md) * [Config.txt boot options](https://www.raspberrypi.com/documentation/computers/config_txt.html#boot-options)
* [Config.txt boot options](https://www.raspberrypi.org/documentation/configuration/config-txt/boot.md) * [Bootloader EEPROM](https://www.raspberrypi.com/documentation/computers/raspberry-pi.html#raspberry-pi-4-boot-eeprom)
* [Bootloader EEPROM](https://www.raspberrypi.org/documentation/hardware/raspberrypi/booteeprom.md) * [Bootloader configuration](https://www.raspberrypi.com/documentation/computers/raspberry-pi.html#raspberry-pi-4-bootloader-configuration)
* [Bootloader configuration](https://www.raspberrypi.org/documentation/hardware/raspberrypi/bcm2711_bootloader_config.md) * [Updating the Compute Module 4 bootloader](https://www.raspberrypi.com/documentation/computers/compute-module.html#cm4bootloader)
* [Updating the Compute Module 4 bootloader](https://www.raspberrypi.org/documentation/hardware/computemodule/cm-emmc-flashing.md#cm4bootloader)
* [Release notes](firmware/release-notes.md) * [Release notes](firmware/release-notes.md)
* [Releases](releases.md) * [Releases](releases.md)

Binary file not shown.

Binary file not shown.

View File

@@ -1,7 +1,16 @@
# Raspberry Pi4 bootloader EEPROM release notes # Raspberry Pi4 bootloader EEPROM release notes
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.com/documentation/computers/raspberry-pi.html#raspberry-pi-4-bootloader-configuration
## 2021-10-27 - Secure boot improvements - BETA
* Improve the error logging if a file is too large and truncated.
* Increase the maximum size of the ramdisk to 96MB.
* Preliminary changes to expose the boot-mode used to load the ramdisk via device-tree.
N.B. Secure boot is only recommended for industrial customers and is currently
a beta release. This can only be enabled via RPIBOOT
https://github.com/raspberrypi/usbboot/blob/master/Readme.md
## 2021-10-05 - Update for latest Broadcom SDRAM settings - BETA ## 2021-10-05 - Update for latest Broadcom SDRAM settings - BETA
* Minor update for latest SDRAM tuning settings. * Minor update for latest SDRAM tuning settings.

View File

@@ -1,28 +1,42 @@
Raspberry Pi 4 EEPROM bootloader rescue image Raspberry Pi 4 EEPROM bootloader rescue image
********************************************* *********************************************
The Raspberry Pi 4 has a small EEPROM used to store the bootloader. The Raspberry Pi 4 contains a small EEPROM used to store the bootloader.
This rescue image reverts the bootloader EEPROM to factory default settings. 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 This rescue image also updates the USB 3 controller (VL805) firmware to the
version (138a1) with better full-speed Isochronous endpoint support. latest version, 138a1, which has better full-speed isochronous endpoint
support.
To re-flash the EEPROM(s) Raspberry Pi 4 board revisions 1.1 and 1.2 contain a separate EEPROM
which contains firmware for the USB 3 controller (VL805): on newer revisions
the USB controller firmware is stored in the bootloader EEPROM along with
the bootloader.
1. Unzip the contents of this zip file to a blank FAT formatted SD-CARD The easiest method for creating EEPROM rescue images, and formatting SD
2. Power off the Raspberry Pi cards, is to use Raspberry Pi Imager from https://raspberrypi.com/software.
3. Insert the SD-CARD Raspberry Pi Imager provides a GUI for downloading the latest version of
4. Power on Raspberry Pi this rescue image and flashing it to a spare SD card.
5. Wait at least 10 seconds
This easiest method for creating and formatting the SD-CARD is to use the Alternatively, copy the contents of this zip file to a blank
Raspberry Pi Imager from https://raspberrypi.org/downloads FAT formatted SD card. The FAT partition must be < 32 GB.
If successful, the green LED light will blink rapidly (forever), otherwise To update the EEPROM:
an error pattern will be displayed.
If a HDMI display is attached then the screen will display green for success 1. Power off the Raspberry Pi
or red if a failure occurs. 2. Insert the bootloader update SD card
3. Power on the Raspberry Pi
4. Wait at least 10 seconds
N.B. This image is not a bootloader it simply replaces the on-board bootloader. If successful, the green LED on the Raspberry Pi will blink rapidly forever.
An unsuccessful update of the EEPROM is indicated by a different blinking
pattern corresponding to the specific error.
If an HDMI display is attached, then the screen will display green for
success or red if a failure occurs.
Once the EEPROM is updated, the SD card can be removed. In order to make
the entire capacity of the SD card available again, you must then reformat
the SD card using Raspberry Pi Imager by selecting the 'format card as
FAT32' option.

62
imager/make-recovery-images Executable file
View File

@@ -0,0 +1,62 @@
#!/bin/sh
set -e
die() {
echo "$@" >&2
exit 1
}
cleanup() {
if [ -d "${TMP_DIR}" ]; then
rm -rf "${TMP_DIR}"
fi
}
trap cleanup EXIT
[ "$(id -u)" = "0" ] || die "$(basename $0) must be run as root"
[ -n "${SUDO_UID}" ] || die "SUDO_UID not defined"
[ -n "${SUDO_GID}" ] || die "SUDO_GID not defined"
for src in release/*.zip; do
src=$(basename "${src}")
img=$(echo "${src}" | sed 's/\.zip/.img/')
TMP_DIR=$(mktemp -d)
(
cp "release/${src}" "${TMP_DIR}"
mkdir "${TMP_DIR}/files"
cd "${TMP_DIR}/files"
unzip "../${src}"
cd "${TMP_DIR}"
dd if=/dev/zero bs=1M count=258 of=temp.img
/sbin/sfdisk temp.img <<EOF
label: dos
label-id: 0x0a7b5ac5
device: temp.img
unit: sectors
./test.img1 : start= 2048, size= 524288, type=c
EOF
file temp.img
kpartx -lv temp.img | head -n1 | awk '{print $1}'
LOOP="/dev/mapper/$(kpartx -lv temp.img | head -n1 | awk '{print $1}')"
kpartx -av temp.img
/sbin/mkfs.fat -F 32 -s 1 "${LOOP}"
mkdir fs
mount "${LOOP}" fs
cp -v files/* fs
sync
umount fs
kpartx -dv temp.img
)
mkdir -p images
chown "${SUDO_UID}:${SUDO_GID}" images
mv "${TMP_DIR}/temp.img" "images/${img}"
file "images/${img}"
cd images
zip "${src}" "${img}"
cd ..
rm "images/${img}"
chown "${SUDO_UID}:${SUDO_GID}" "images/${src}"
done

View File

@@ -1,7 +1,6 @@
# Raspberry Pi 4B, 400 and CM4 bootloader EEPROM releases # Raspberry Pi 4B, 400 and CM4 bootloader EEPROM releases
This page provides links to the production and development release images for the bootloader EEPROM on BCM2711-based Raspberry Pi computers. Normally, the This page provides links to the production and development release images for the bootloader EEPROM on BCM2711-based Raspberry Pi computers. Normally, the
bootloader is automatically updated after an APT update via the [rpi-eeprom-update](https://www.raspberrypi.org/documentation/hardware/raspberrypi/booteeprom.md) bootloader is automatically updated after an APT update via the [rpi-eeprom-update](https://www.raspberrypi.com/documentation/computers/raspberry-pi.html#automatic-updates) utility.
utility.
## Release notes ## Release notes
Release notes are available [here](https://github.com/raspberrypi/rpi-eeprom/blob/master/firmware/release-notes.md). Release notes are available [here](https://github.com/raspberrypi/rpi-eeprom/blob/master/firmware/release-notes.md).
@@ -10,8 +9,8 @@ Release notes are available [here](https://github.com/raspberrypi/rpi-eeprom/blo
The default production EEPROM image release is [2020-09-03](https://github.com/raspberrypi/rpi-eeprom/releases/tag/v2020.09.03-138a1) and can be installed via the [Raspberry Pi Imager](https://www.raspberrypi.org/downloads/). The default production EEPROM image release is [2020-09-03](https://github.com/raspberrypi/rpi-eeprom/releases/tag/v2020.09.03-138a1) and can be installed via the [Raspberry Pi Imager](https://www.raspberrypi.org/downloads/).
## USB MSD boot ## USB MSD boot
Please see the [USB mass storage boot](https://www.raspberrypi.org/documentation/hardware/raspberrypi/bootmodes/msd.md) guide. Please see the [USB mass storage boot](https://www.raspberrypi.com/documentation/computers/raspberry-pi.html#usb-mass-storage-boot) guide.
For support or hardware interoperability discussions please use the Raspberry Pi [general discussion](https://www.raspberrypi.org/forums/viewforum.php?f=63) forum. For support or hardware interoperability discussions please use the Raspberry Pi [general discussion](https://forums.raspberrypi.com/viewforum.php?f=63) forum.
## Old EEPROM images ## Old EEPROM images
Old bootloader images are periodically removed from the APT package to reduce the disk space, but are still available via Github [here](https://github.com/raspberrypi/rpi-eeprom/tree/master/firmware/old). Old bootloader images are periodically removed from the APT package to reduce the disk space, but are still available via Github [here](https://github.com/raspberrypi/rpi-eeprom/tree/master/firmware/old).

View File

@@ -1,4 +1,4 @@
#!/usr/bin/env python #!/usr/bin/env python3
""" """
rpi-eeprom-config rpi-eeprom-config

View File

@@ -490,7 +490,7 @@ To flash the new image:
The syntax is the same as config.txt See online documentation for the list of parameters. The syntax is the same as config.txt See online documentation for the list of parameters.
The official documentation for the Raspberry Pi bootloader EEPROM is available at The official documentation for the Raspberry Pi bootloader EEPROM is available at
https://www.raspberrypi.org/documentation/hardware/raspberrypi/booteeprom.md https://www.raspberrypi.com/documentation/computers/raspberry-pi.html#raspberry-pi-4-boot-eeprom
Compute Module 4 (CM4): Compute Module 4 (CM4):
@@ -500,10 +500,7 @@ cause the system to fail to boot so automatic updates are disabled. We also
recommend write-protecting the SPI EPPROM after flashing it using usbboot. recommend write-protecting the SPI EPPROM after flashing it using usbboot.
CM4 bootloader and EEPROM update instructions: CM4 bootloader and EEPROM update instructions:
https://www.raspberrypi.org/documentation/hardware/raspberrypi/bcm2711_bootloader_config.md https://www.raspberrypi.com/documentation/computers/compute-module.html#compute-module-4-bootloader
usbboot instructions for flashing CM4 EMMC and bootloader EEPROM:
https://www.raspberrypi.org/documentation/hardware/computemodule/cm-emmc-flashing.md
The CM4 ROM does not support running recovery.bin from the EMMC on CM4 so this service The CM4 ROM does not support running recovery.bin from the EMMC on CM4 so this service
is disabled by default. SELF_UPDATE from USB or Network boot is supported but this is disabled by default. SELF_UPDATE from USB or Network boot is supported but this