diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index a90ccd2..54263d2 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -80,7 +80,7 @@ body: attributes: label: Bootloader logs description: | - If the problem can't be diagnosed from the bootloader HDMI diagnostics screen then we'll normally need to see more detailed logs to diagnose the problem. The bootloader and GPU firmware can be configured to enable log output to the UART pins `14` and `15` on the [40-pin GPIO header](https://www.raspberrypi.com/documentation/computers/os.html#gpio-and-the-40-pin-header) + If the problem can't be diagnosed from the bootloader HDMI diagnostics screen then we'll normally need to see more detailed logs to diagnose the problem. The bootloader and GPU firmware can be configured to enable log output to the UART (GPIOs `14` and `15`, pins `8` and `10` on the [40-pin GPIO header](https://www.raspberrypi.com/documentation/computers/os.html#gpio-and-the-40-pin-header, or on the Debug header on a Pi 5) * To enable UART logging from the bootloader specify [BOOT_UART=1](https://www.raspberrypi.com/documentation/computers/raspberry-pi.html#BOOT_UART) in the EEPROM config * To enable UART logging from the `start.elf` GPU firmware stage add [uart_2ndstage=1](https://www.raspberrypi.com/documentation/computers/config_txt.html#uart_2ndstage) to `config.txt`. * If you are familiar with using Wireshark then it's also possible to use [NETCONSOLE](https://www.raspberrypi.com/documentation/computers/raspberry-pi.html#NETCONSOLE) write logs to UDP packets. diff --git a/firmware-2712/latest/pieeprom-2024-12-15.bin b/firmware-2712/latest/pieeprom-2024-12-15.bin new file mode 100644 index 0000000..a431aab Binary files /dev/null and b/firmware-2712/latest/pieeprom-2024-12-15.bin differ diff --git a/firmware-2712/latest/recovery.bin b/firmware-2712/latest/recovery.bin index 9fe3746..5a8eb59 100644 Binary files a/firmware-2712/latest/recovery.bin and b/firmware-2712/latest/recovery.bin differ diff --git a/firmware-2712/release-notes.md b/firmware-2712/release-notes.md index 4fb75ff..6743718 100644 --- a/firmware-2712/release-notes.md +++ b/firmware-2712/release-notes.md @@ -1,5 +1,12 @@ # Raspberry Pi5 bootloader EEPROM release notes +## 2024-12-15: Add net install to boot menu (latest) + +* Add net install to boot menu + Press N (or shift). +* enable_uart: Require enable_uart=1 to enable RP1 UART console + See: https://github.com/raspberrypi/rpi-eeprom/issues/643 + ## 2024-12-07: Enable banklow (and so NUMA) by default (latest) * Enable banklow (and so NUMA) by default diff --git a/rpi-eeprom-config b/rpi-eeprom-config index 3acffb4..6cda290 100755 --- a/rpi-eeprom-config +++ b/rpi-eeprom-config @@ -111,7 +111,7 @@ def exit_error(msg): sys.stderr.write("ERROR: %s\n" % msg) sys.exit(1) -def shell_cmd(args, timeout=5, echo=False): +def shell_cmd(args, timeout=10, echo=False): """ Executes a shell command waits for completion returning STDOUT. If an error occurs then exit and output the subprocess stdout, stderr messages @@ -171,8 +171,6 @@ def apply_update(config, eeprom=None, config_src=None): sys.stdout.write("Updating bootloader EEPROM\n image: %s\nconfig_src: %s\nconfig: %s\n%s\n%s\n%s\n" % (eeprom_image, config_src, config, '#' * 80, config_str, '#' * 80)) - sys.stdout.write("\n*** To cancel this update run 'sudo rpi-eeprom-update -r' ***\n\n") - # Ignore APT package checksums so that this doesn't fail when used # with EEPROMs with configs delivered outside of APT. # The checksums are really just a safety check for automatic updates. @@ -180,7 +178,7 @@ def apply_update(config, eeprom=None, config_src=None): # If flashrom is used then the command will not return until the EEPROM # has been updated so use a larger timeout. - shell_cmd(args, timeout=60, echo=True) + shell_cmd(args, timeout=180, echo=True) def edit_config(eeprom=None): """ diff --git a/rpi-eeprom-update b/rpi-eeprom-update index 0172c93..d6dab0b 100755 --- a/rpi-eeprom-update +++ b/rpi-eeprom-update @@ -189,6 +189,32 @@ prepareImage() fi } +runFlashrom() +{ + attempts=5 + freq=16000 + + # If flashrom fails then retry at a lower speed. + while [ ${attempts} -gt 0 ]; do + echo "flashrom -p linux_spi:dev=${SPIDEV},spispeed=${freq} -w ${BOOTFS}/pieeprom.upd" + if flashrom -p linux_spi:dev=${SPIDEV},spispeed=${freq} -w "${BOOTFS}/pieeprom.upd" >> "${FLASHROM_LOG}"; then + echo "Verifying update" + if flashrom -p linux_spi:dev=${SPIDEV},spispeed=${freq} -v "${BOOTFS}/pieeprom.upd" >> "${FLASHROM_LOG}"; then + echo "VERIFY: SUCCESS" + return 0 + else + echo "VERIFY: FAIL" + fi + fi + freq=8000 + attempts=$((attempts - 1)) + if [ ${attempts} -gt 0 ]; then + echo "Failed to update bootloader using flashrom. Retrying." + fi + done + return 1 +} + applyRecoveryUpdate() { [ -n "${BOOTLOADER_UPDATE_IMAGE}" ] || [ -n "${VL805_UPDATE_IMAGE}" ] || die "No update images specified" @@ -266,8 +292,7 @@ applyRecoveryUpdate() echo "a bootloader rescue SD card image which restores the default bootloader image." echo FLASHROM_LOG="$(mktemp)" - echo "flashrom -p linux_spi:dev=${SPIDEV},spispeed=16000 -w ${BOOTFS}/pieeprom.upd" - if flashrom -p linux_spi:dev=${SPIDEV},spispeed=16000 -w "${BOOTFS}/pieeprom.upd" > "${FLASHROM_LOG}"; then + if runFlashrom; then # Success - remove update files from the boot partition removePreviousUpdates echo "UPDATE SUCCESSFUL" @@ -877,6 +902,11 @@ checkVersion() if [ "${ACTION_UPDATE_BOOTLOADER}" = 1 ] || [ "${ACTION_UPDATE_VL805}" = 1 ]; then echo "*** UPDATE AVAILABLE ***" + echo "" + echo "Run \"sudo rpi-eeprom-update -a\" to install this update now." + echo + echo "To configure the bootloader update policy run \"sudo ${RPI_EEPROM_UPDATE_CONFIG_TOOL}\"" + echo "" printVersions write_status_info "EXIT_UPDATE_REQUIRED" exit ${EXIT_UPDATE_REQUIRED}