Merge branch 'master' into debian/bookworm

This commit is contained in:
Serge Schneider
2024-12-18 09:03:30 +00:00
6 changed files with 42 additions and 7 deletions

View File

@@ -80,7 +80,7 @@ body:
attributes: attributes:
label: Bootloader logs label: Bootloader logs
description: | 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 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`. * 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. * 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.

Binary file not shown.

Binary file not shown.

View File

@@ -1,5 +1,12 @@
# Raspberry Pi5 bootloader EEPROM release notes # 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) ## 2024-12-07: Enable banklow (and so NUMA) by default (latest)
* Enable banklow (and so NUMA) by default * Enable banklow (and so NUMA) by default

View File

@@ -111,7 +111,7 @@ def exit_error(msg):
sys.stderr.write("ERROR: %s\n" % msg) sys.stderr.write("ERROR: %s\n" % msg)
sys.exit(1) 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 Executes a shell command waits for completion returning STDOUT. If an
error occurs then exit and output the subprocess stdout, stderr messages 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" % 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)) (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 # Ignore APT package checksums so that this doesn't fail when used
# with EEPROMs with configs delivered outside of APT. # with EEPROMs with configs delivered outside of APT.
# The checksums are really just a safety check for automatic updates. # 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 # If flashrom is used then the command will not return until the EEPROM
# has been updated so use a larger timeout. # 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): def edit_config(eeprom=None):
""" """

View File

@@ -189,6 +189,32 @@ prepareImage()
fi 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() applyRecoveryUpdate()
{ {
[ -n "${BOOTLOADER_UPDATE_IMAGE}" ] || [ -n "${VL805_UPDATE_IMAGE}" ] || die "No update images specified" [ -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 "a bootloader rescue SD card image which restores the default bootloader image."
echo echo
FLASHROM_LOG="$(mktemp)" FLASHROM_LOG="$(mktemp)"
echo "flashrom -p linux_spi:dev=${SPIDEV},spispeed=16000 -w ${BOOTFS}/pieeprom.upd" if runFlashrom; then
if flashrom -p linux_spi:dev=${SPIDEV},spispeed=16000 -w "${BOOTFS}/pieeprom.upd" > "${FLASHROM_LOG}"; then
# Success - remove update files from the boot partition # Success - remove update files from the boot partition
removePreviousUpdates removePreviousUpdates
echo "UPDATE SUCCESSFUL" echo "UPDATE SUCCESSFUL"
@@ -877,6 +902,11 @@ checkVersion()
if [ "${ACTION_UPDATE_BOOTLOADER}" = 1 ] || [ "${ACTION_UPDATE_VL805}" = 1 ]; then if [ "${ACTION_UPDATE_BOOTLOADER}" = 1 ] || [ "${ACTION_UPDATE_VL805}" = 1 ]; then
echo "*** UPDATE AVAILABLE ***" 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 printVersions
write_status_info "EXIT_UPDATE_REQUIRED" write_status_info "EXIT_UPDATE_REQUIRED"
exit ${EXIT_UPDATE_REQUIRED} exit ${EXIT_UPDATE_REQUIRED}