diff --git a/firmware/beta/pieeprom-2022-05-20.bin b/firmware/beta/pieeprom-2022-05-20.bin new file mode 100644 index 0000000..bb3a113 Binary files /dev/null and b/firmware/beta/pieeprom-2022-05-20.bin differ diff --git a/firmware/beta/pieeprom-2022-07-14.bin b/firmware/beta/pieeprom-2022-07-14.bin new file mode 100755 index 0000000..3a8eec3 Binary files /dev/null and b/firmware/beta/pieeprom-2022-07-14.bin differ diff --git a/firmware/beta/recovery.bin b/firmware/beta/recovery.bin index eae987a..3cfaa1c 100644 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 2c44620..ec9ba2c 100644 --- a/firmware/release-notes.md +++ b/firmware/release-notes.md @@ -1,5 +1,14 @@ # Raspberry Pi4 bootloader EEPROM release notes +## 2022-07-14 - Add pieeprom-2022-07-14 - BETA + * Enable long-filenames & sub-directories for start_file & fixup_file. + Use Unix path separators with a maximum path of 255 characters. + Relative paths (. or ..) are not supported. + +## 2022-05-20 - Add pieeprom-2022-05-20 - BETA + * Reduce boot-time when network install is disabled NET_INSTALL_ENABLED=0. + * Switch to the newer SDIO HC and increase SPI clock speed. + ## 2022-04-27 - Promote pieeprom-2022-04-26 to the DEFAULT release * Enable Network Install in the default bootloader release. * This release is signed with the secure-boot key and supports diff --git a/imager/make-imager-release b/imager/make-imager-release index dd19d4a..515cc96 100755 --- a/imager/make-imager-release +++ b/imager/make-imager-release @@ -4,4 +4,4 @@ set -e script_dir=$(cd "$(dirname "$0")" && pwd) -${script_dir}/make-release critical 2022-01-25 000138a1 "${script_dir}" release rpi-boot-eeprom-recovery +${script_dir}/make-release critical 2022-04-26 000138a1 "${script_dir}" release rpi-boot-eeprom-recovery diff --git a/imager/make-recovery-images b/imager/make-recovery-images index 731253e..a53c27f 100755 --- a/imager/make-recovery-images +++ b/imager/make-recovery-images @@ -47,7 +47,10 @@ EOF mount "${LOOP}" fs cp -v files/* fs sync + sleep 5 umount fs + # Delay before calling kpartx otherwise it's sometimes possible to get orphaned loopback devices + sleep 5 kpartx -dv temp.img ) mkdir -p images @@ -60,3 +63,4 @@ EOF rm "images/${img}" chown "${SUDO_UID}:${SUDO_GID}" "images/${src}" done +echo "Wrote images for rpi-imager to $(pwd)/images/${src}" diff --git a/rpi-eeprom-update b/rpi-eeprom-update index 7b92a5e..91e2254 100755 --- a/rpi-eeprom-update +++ b/rpi-eeprom-update @@ -33,6 +33,17 @@ BOOTFS=${BOOTFS:-/boot} CM4_ENABLE_RPI_EEPROM_UPDATE=${CM4_ENABLE_RPI_EEPROM_UPDATE:-0} RPI_EEPROM_UPDATE_CONFIG_TOOL="${RPI_EEPROM_UPDATE_CONFIG_TOOL:-raspi-config}" +# Self-update is preferred to using recovery.bin because it avoids modifiy the +# boot partition in order to rename recovery.bin after use. Since the 2711 ROM +# does not support network or USB MSD loading of recovery.bin self-update has to +# be used with other boot modes anyway. + +# If RPI_EEPROM_SELF_UPDATE=1 then avoid installing recovery.bin so long as the +# current bootloader version supports self-update from SD/MMC and that doesn't +# look as though SELF_UPDATE has been disable in the EEPROM config or config.txt. +RPI_EEPROM_SELF_UPDATE="${RPI_EEPROM_SELF_UPDATE:-0}" +RPI_EEPROM_SELF_UPDATE_MIN_VER=1650968668 + # Automatic, critical updates are not applied unless the current bootloader version # is older than pieeprom-2020-09-03 BOOTLOADER_AUTO_UPDATE_MIN_VERSION="${BOOTLOADER_AUTO_UPDATE_MIN_VERSION:-1599135103}" @@ -215,8 +226,28 @@ applyRecoveryUpdate() || die "Failed to set permissions on eeprom update files" fi - cp -f "${RECOVERY_BIN}" "${BOOTFS}/recovery.bin" \ - || die "Failed to copy ${RECOVERY_BIN} to ${BOOTFS}" + if getBootloaderConfig | grep -q ENABLE_SELF_UPDATE=0; then + # Self update has been disabled in the EEPROM config so recovery.bin + # must be used to clear this. + RPI_EEPROM_SELF_UPDATE=0 + fi + + # Setting bootlaoder_update=0 was really intended for use with network-boot with shared + # config.txt files. However, if it looks as though self-update has been disabled then + # assume recovery.bin is required. + config_txt="${BOOTFS}/config.txt" + if [ -f "${config_txt}" ]; then + if grep -q "bootloader_update=0" "${config_txt}"; then + RPI_EEPROM_SELF_UPDATE=0 + fi + fi + + [ "${BOOTLOADER_CURRENT_VERSION}" -ge "${RPI_EEPROM_SELF_UPDATE_MIN_VER}" ] || RPI_EEPROM_SELF_UPDATE=0 + + if [ "${RPI_EEPROM_SELF_UPDATE}" != "1" ]; then + echo "Using recovery.bin for EEPROM update" + cp -f "${RECOVERY_BIN}" "${BOOTFS}/recovery.bin" || die "Failed to copy ${RECOVERY_BIN} to ${BOOTFS}" + fi echo "" echo "EEPROM updates pending. Please reboot to apply the update." diff --git a/tools/vl805 b/tools/vl805 new file mode 100755 index 0000000..585f318 Binary files /dev/null and b/tools/vl805 differ