2712 recovery.bin 2026-09-25 refuses program_pubkey / program_jtag_lock when run from SD (BOOT ERROR 44) — worked with 2024-11-12

Open
#911 7 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
shell
Domain
backend

Research direction

The report points to the 2712 recovery.bin change noted as “Use ROM boot-mode flag to detect rpiboot mode,” and compares builds 2024-11-12 and 2026-09-25; it does not name source files or tests. Start by locating that change and tracing how recovery detects RPIBOOT mode and gates OTP programming. Done means confirming the behavior change and whether SD provisioning is intended; reproducing it requires hardware and risks locking a module.

Written by the indexing model from the issue text.

Description

Describe the bug
Describe the bug

We provision CM5 modules for secure boot from the SD card: on the first boot of the
production image, recovery.bin on the SD boot partition writes our customer-signed
pieeprom.upd and programs the public key hash and the VC JTAG lock into OTP
(program_pubkey=1, program_jtag_lock=1, recovery_reboot=1). The modules are
only connected by Ethernet on the production line; there is no USB connection.

With recovery.bin 2024-11-12 (96349fe) this has worked on all our CM5 Lite
modules so far, and the OTP rows are verified on finalized devices.

With recovery.bin 2026-09-25 (1accd665) and an EEPROM image built the same way
from pieeprom-2026-09-25.bin, the EEPROM is written but OTP is not, and
recovery ends with BOOT ERROR: code 44 (solid red HDMI). recovery.bin is not
renamed. The module now runs the new bootloader with SIGNED_BOOT=1, so an
unsigned OS no longer boots, while the customer key hash is still zero.

We have read #688 and the config.txt documentation (secure-boot OTP properties
"can only be programmed via RPIBOOT"), so we understand that SD provisioning may
never have been an intended path. The message
program_pubkey and program_jtag_lock config settings require rpiboot mode is
present in every 2712 recovery.bin since 2023-09-21, including the 2024-11-12
build that does program OTP for us from SD, so we assume the change is in how
rpiboot mode is detected — the 2025-10-17 note "recovery: Use ROM boot-mode flag
to detect rpiboot mode". We have not bisected on hardware (every successful run
locks a module).

Questions:

  1. Can you confirm that 2025-10-17 is the first 2712 recovery.bin that refuses
    OTP programming when it was loaded from SD, and that this is intended?
  2. Is lock-then-update supported: provision a module (via RPIBOOT), then move a
    locked device to a newer customer-signed bootloader from the running OS
    (rpi-eeprom-update / flashrom, or self-update with a signed pieeprom.upd)?
    Are there constraints we should plan for (MFG version check from 2026-09-23,
    ARB version in OTP from 2026-10-23)?
  3. On a module left in the state above (customer-signed 2026-09-25 bootloader with
    SIGNED_BOOT=1, key hash zero), is running RPIBOOT with
    secure-boot-recovery5 the right way to finish provisioning, or does the
    unsigned recovery.bin path need anything special first
Steps to reproduce the behaviour
  1. Fresh CM5 Lite: factory bootloader 2026-05-11 (66f33f7e), customer key hash
    all zero, VC JTAG unlocked.
  2. Build a customer-signed EEPROM image from firmware-2712/default/pieeprom-2026-09-25.bin
    with update-pieeprom.sh -f -k <private.pem> (usbboot secure-boot-recovery5
    tooling) and the EEPROM config shown below.
  3. SD card, FAT boot partition, containing:
    • recovery.bin — unmodified 2026-09-25, same sha256 as firmware-2712/default/recovery.bin
    • pieeprom.upd (the signed image from step 2), pieeprom.sig, pieeprom.signed_boot.bin
    • config.txt shown below
    • a customer-signed boot.img + boot.sig
  4. Insert the card and power on with UART attached.

Expected (what recovery.bin 2024-11-12 does with the same layout): EEPROM
updated, OTP key hash and JTAG lock programmed, recovery.bin renamed to
RECOVERY.000, reboot into the signed OS.

Actual: EEPROM updated, then
program_pubkey and program_jtag_lock config settings require rpiboot mode,
BOOT ERROR: code 44, red HDMI screen, OTP unchanged.

Device (s)

Raspberry Pi CM5 Lite

Bootloader configuration.

EEPROM config embedded in the signed image (rpi-eeprom-config pieeprom.upd):

[all]
BOOT_UART=1
POWER_OFF_ON_HALT=1

# Boot Order Codes, from https://www.raspberrypi.com/documentation/computers/raspberry-pi.html#BOOT_ORDER
# Try SD first (1), followed by, USB (RP1), NVMe PCIe, then network
BOOT_ORDER=0xf2641

# Disable self-update mode - to prevent automatic updates of unsigned bootloader images
ENABLE_SELF_UPDATE=0

# Select signed-boot mode in the EEPROM. This can be used to during development
# to test the signed boot image. Once secure boot is enabled via OTP this setting
# has no effect i.e. it is always 1.
SIGNED_BOOT=1

config.txt read by recovery.bin from the SD card (non-comment lines):

uart_2ndstage=1
program_pubkey=1
program_jtag_lock=1
recovery_reboot=1
System

The failure happens in recovery.bin, before any OS runs, so raspinfo and
vcgencmd are not available on the affected module. From the UART log:

  • Bootloader before the update: factory 2026-05-11 (66f33f7e)
  • recovery.bin: 2026-09-25 (1accd665), MFG_VER: 2, unmodified from firmware-2712/default
  • Bootloader written: pieeprom-2026-09-25.bin (1accd665), customer-signed with the config above
  • OS on the card (not reached): Raspberry Pi OS bookworm based, kernel 6.12.25+rpt-rpi-2712
Bootloader logs

UART, from the reboot into the SD card (serial number masked):

  1.67 RPi: RECOVERY release VERSION:1accd665 DATE: 2026/09/25 TIME: 15:59:09
  1.68 MFG_VER: 2
  1.68 BOOTMODE: 0x02 partition 0 build-ts BUILD_TIMESTAMP=1790351949 serial ******** boardrev c041a0 stc 1682423
  1.69 AON_RESET: 00000000 PM_RSTS 00001020
  1.69 POWER_OFF_ON_HALT: 0 WAIT_FOR_POWER_BUTTON 0 power-on-reset 0
  1.70 EEPROM ID 0xef4015
  1.70 SFDP v1.5 Param v1.5 Capacity 2048KB
  1.08 Unsupported boot order 4
  1.11 M.2 PCIe HAT not detected.
  1.71 BOOT_ORDER: 0xf1
  2.05 OCR c0ff8000 [476]
  2.06 SD: bus-width: 4 spec: 2 SCR: 0x0205848f 0x00000000
  2.08 MBR: 0x00000001, 1000000 type: 0x0c
  2.08 MBR: 0x000f4241,248997407 type: 0x83
  2.95 type: 16 lba: 1 'mkfs.fat' '  V       ^ ' clusters 62465 (16)
  2.10 rsc 16 fat-sectors 256 root dir cluster 1 sectors 32 entries 512
  2.10 FAT16 clusters 62465
  2.12 Read config.txt bytes     1467 hnd 0x59fa
  2.11 BMD "pieeprom.bin" not found
  2.12 pieeprom.sig
  2.12 hash: 11ea1bc7159513a7069264dcdaa0d42c02aec972fc6f122da11a0f1061e6ca2a
  2.12 ts: 1791557880
  2.14 MFG ver device 1 image 2
  2.14 Reading EEPROM: 2097152 bytes 0xc1160000
  5.18 2499ms
  5.85 Writing EEPROM
  [progress output trimmed]
 12.75 6589ms
 12.75 Verify BOOT EEPROM
 12.77 Reading EEPROM: 2097152 bytes 0xc1160000
 14.81 2499ms
 15.59 BOOT-EEPROM: UPDATED
 15.59 program_pubkey and program_jtag_lock config settings require rpiboot mode
 15.56 USB-OTG disconnect
 15.68 BOOT ERROR: code 44 - ''

Nothing further is logged after BOOT ERROR: code 44.

Bootloader banner of the same module on its previous boot (factory EEPROM, before
the update):

  4.11 RPi: BOOTLOADER release VERSION:66f33f7e DATE: 2026/05/11 TIME: 12:20:02
  3.38 Customer key hash 0000000000000000000000000000000000000000000000000000000000000000
  3.38 VC-JTAG unlocked
  4.46 Boot mode: SD (01) order f246
USB boot

No response

NVMe boot

No response

Network (TFTP boot)

No response

Dominant language
Shell
Stars
1.5k
Forks
246
Avg merge
9h 7m
Merged PRs (30d)
16

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from raspberrypi/rpi-eeprom

All issues in raspberrypi/rpi-eeprom

Similar issues

More Shell/Bash issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.