From aea39c45601a115adb837f69680d84a1ddd814bd Mon Sep 17 00:00:00 2001 From: Nicolai Buchwitz Date: Sun, 15 Feb 2026 14:16:14 +0100 Subject: [PATCH 1/2] rpi-eeprom-update: add CM4S (board_type 21) support Extend the CM4 EEPROM update guard to also cover CM4S. CM4S additionally requires dtparam=enable_eeprom=on under [cm4s] in config.txt to enable access to the onboard bootloader EEPROM. Signed-off-by: Nicolai Buchwitz --- rpi-eeprom-update | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/rpi-eeprom-update b/rpi-eeprom-update index 4087ce6f..2c82beac 100755 --- a/rpi-eeprom-update +++ b/rpi-eeprom-update @@ -458,9 +458,9 @@ checkDependencies() { BOARD_TYPE=$(((0x$BOARD_INFO >> 4) & 0xff)) BOARD_REVISION=$((0x$BOARD_INFO & 0xf)) - if [ ${BOARD_TYPE} -eq 20 ] && [ "${CM4_ENABLE_RPI_EEPROM_UPDATE}" != '1' ]; then - # For CM4, USB device boot is the recommended method for EEPROM updates. - echo "rpi-eeprom-update is not enabled by default on CM4." + if ([ ${BOARD_TYPE} -eq 20 ] || [ ${BOARD_TYPE} -eq 21 ]) && [ "${CM4_ENABLE_RPI_EEPROM_UPDATE}" != '1' ]; then + # For CM4/CM4S, USB device boot is the recommended method for EEPROM updates. + echo "rpi-eeprom-update is not enabled by default on CM4(S)." echo "The recommended method for flashing the EEPROM is rpiboot." echo "See: https://github.com/raspberrypi/usbboot/blob/master/Readme.md" echo "Run with -h for more information." @@ -469,12 +469,17 @@ checkDependencies() { echo "Add these the following entries to /etc/default/rpi-eeprom-update" echo "RPI_EEPROM_USE_FLASHROM=1" echo "CM4_ENABLE_RPI_EEPROM_UPDATE=1" - echo + echo echo "and these entries to config.txt and reboot" - echo "[cm4]" - echo "dtparam=spi=on" - echo "dtoverlay=audremap" - echo "dtoverlay=spi-gpio40-45" + if [ ${BOARD_TYPE} -eq 21 ]; then + echo "[cm4s]" + echo "dtparam=enable_eeprom=on" + else + echo "[cm4]" + fi + echo "dtparam=spi=on" + echo "dtoverlay=audremap" + echo "dtoverlay=spi-gpio40-45" echo exit ${EXIT_SUCCESS} fi From b4ffa0d17e7051260a2c683aac616044ed32c4f7 Mon Sep 17 00:00:00 2001 From: Tim Gover <990920+timg236@users.noreply.github.com> Date: Wed, 18 Feb 2026 10:03:42 +0000 Subject: [PATCH 2/2] help: copy-edit Co-authored-by: Andrew Scheller --- rpi-eeprom-update | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rpi-eeprom-update b/rpi-eeprom-update index 2c82beac..cbb5f48e 100755 --- a/rpi-eeprom-update +++ b/rpi-eeprom-update @@ -466,7 +466,7 @@ checkDependencies() { echo "Run with -h for more information." echo echo "To enable flashrom programming of the EEPROM" - echo "Add these the following entries to /etc/default/rpi-eeprom-update" + echo "Add the following entries to /etc/default/rpi-eeprom-update" echo "RPI_EEPROM_USE_FLASHROM=1" echo "CM4_ENABLE_RPI_EEPROM_UPDATE=1" echo