Skip to content

Trouble making PARTITION_WALK work: "Firmware not found" #738

@dividuum

Description

@dividuum

Describe the bug

I'm currently looking into making PARTITION_WALK help boot a Pi4 system if autoboot.txt got messed up somehow. It seems I'm doing something wrong as I can't get the EEPROM to load the firmware files from an otherwise bootable partition.

Here's the output if autoboot.txt directly specifies boot_partition=3:

[all]
tryboot_a_b=1
boot_partition=3
[tryboot]
boot_partition=2

Image

The Pi boots correctly after loading start4.elf and fixup4.dat.

Now when I manually edit autoboot.txt to switch both partitions around, so it defaults to boot_partition=2, which points at an empty formatted FAT partition, the following failed boot happens:

Image

It looks like:

  • Tries partition 2, which immediately fails. As I understand it, this then triggers the PARTITION_WALK fallback and it scans all other partitions.
  • Tries partition 1 (the one with autoboot.txt in it) -> fails as expected
  • Tries partition 2 again -> fails a second time, as expected
  • Tries partition 3:
    • It loads config.txt and one of the included .txt files
    • Looking at the first screenshot above, the next step should be loading start4.elf, which doesn't happen. Instead the boot process fails.

One difference I noticed is that the fw: line shows different files. The working boot process shows fw: start4.elf fixup4.dat, while the non-working shows fw: start.elf fixup.dat.

According to the documentation, PARTITION_WALK will check each partition in turn (up to 8 and wrapping to 0) to see if it is bootable (contains start4.elf on a Pi4, or config.txt and a suitable device-tree on Pi 5 or newer).

Here's the files on the top-level directly of partition 3:

total 71825
-r--r-----    1 root     root         18693 Aug 14 08:38 COPYING.linux
-r--r-----    1 root     root          1594 Aug 14 08:38 LICENCE.broadcom
-rw-rw----    1 root     root           784 Aug 14 08:38 README.txt
-rw-rw----    1 root     root            41 Aug 14 08:38 VERSION.txt
-r--r-----    1 root     root           155 Aug 14 08:38 autorun.inf
-r--r-----    1 root     root         30660 Aug 14 08:38 bcm2708-rpi-b-plus.dtb
-r--r-----    1 root     root         30019 Aug 14 08:38 bcm2708-rpi-b-rev1.dtb
-r--r-----    1 root     root         30357 Aug 14 08:38 bcm2708-rpi-b.dtb
-r--r-----    1 root     root         29960 Aug 14 08:38 bcm2708-rpi-cm.dtb
-r--r-----    1 root     root         31837 Aug 14 08:38 bcm2708-rpi-zero-w.dtb
-r--r-----    1 root     root         29970 Aug 14 08:38 bcm2708-rpi-zero.dtb
-r--r-----    1 root     root         32354 Aug 14 08:38 bcm2709-rpi-2-b.dtb
-r--r-----    1 root     root         32129 Aug 14 08:38 bcm2709-rpi-cm2.dtb
-r--r-----    1 root     root         32503 Aug 14 08:38 bcm2710-rpi-2-b.dtb
-r--r-----    1 root     root         35330 Aug 14 08:38 bcm2710-rpi-3-b-plus.dtb
-r--r-----    1 root     root         34695 Aug 14 08:38 bcm2710-rpi-3-b.dtb
-r--r-----    1 root     root         33684 Aug 14 08:38 bcm2710-rpi-cm0.dtb
-r--r-----    1 root     root         32266 Aug 14 08:38 bcm2710-rpi-cm3.dtb
-r--r-----    1 root     root           319 Aug 14 08:38 bcm2710-rpi-kms.txt
-r--r-----    1 root     root         33672 Aug 14 08:38 bcm2710-rpi-zero-2-w.dtb
-r--r-----    1 root     root         33672 Aug 14 08:38 bcm2710-rpi-zero-2.dtb
-r--r-----    1 root     root         56247 Aug 14 08:38 bcm2711-rpi-4-b.dtb
-r--r-----    1 root     root         56251 Aug 14 08:38 bcm2711-rpi-400.dtb
-r--r-----    1 root     root         39913 Aug 14 08:38 bcm2711-rpi-cm4-io.dtb
-r--r-----    1 root     root         56768 Aug 14 08:38 bcm2711-rpi-cm4.dtb
-r--r-----    1 root     root         53510 Aug 14 08:38 bcm2711-rpi-cm4s.dtb
-r--r-----    1 root     root         78568 Aug 14 08:38 bcm2712-d-rpi-5-b.dtb
-r--r-----    1 root     root         78572 Aug 14 08:38 bcm2712-rpi-5-b.dtb
-r--r-----    1 root     root         78528 Aug 14 08:38 bcm2712-rpi-500.dtb
-r--r-----    1 root     root         79286 Aug 14 08:38 bcm2712-rpi-cm5-cm4io.dtb
-r--r-----    1 root     root         79352 Aug 14 08:38 bcm2712-rpi-cm5-cm5io.dtb
-r--r-----    1 root     root         79327 Aug 14 08:38 bcm2712-rpi-cm5l-cm4io.dtb
-r--r-----    1 root     root         79393 Aug 14 08:38 bcm2712-rpi-cm5l-cm5io.dtb
-r--r-----    1 root     root         78576 Aug 14 08:38 bcm2712d0-rpi-5-b.dtb
-r--r-----    1 root     root         52476 Aug 14 08:38 bootcode.bin
-r--r-----    1 root     root           176 Aug 14 08:38 cmdline.txt
-r--r-----    1 root     root             6 Aug 14 08:38 compat.lzma
-r--r-----    1 root     root             6 Aug 14 08:38 compat.sig
-r--r-----    1 root     root             6 Aug 14 08:38 compat.upd
-r--r-----    1 root     root             6 Aug 14 08:38 compat.ver
drwxrwx---    2 root     root           512 Aug 14 08:38 config
-r--r-----    1 root     root          4152 Aug 14 08:38 config.txt
-r--r-----    1 root     root          5459 Aug 14 08:38 fixup4.dat
-r--r-----    1 root     root         10295 Aug 14 08:38 fixup_x.dat
-r--r-----    1 root     root        295015 Aug 14 08:38 ibhosted.ico
-r--r-----    1 root     root            45 Aug 14 08:38 info.txt
-r--r-----    1 root     root      11498881 Aug 14 08:38 init.gz
-r--r-----    1 root     root       7387968 Aug 14 08:38 kernel.img
-r--r-----    1 root     root       7738504 Aug 14 08:38 kernel7.img
-r--r-----    1 root     root       9608253 Aug 14 08:38 kernel8.img
drwxrwx---    2 root     root          5120 Aug 14 08:38 overlays
-r--r-----    1 root     root          7249 Aug 14 08:38 release.sig
-r--r-----    1 root     root      29417472 Aug 14 08:38 stage2.img
-r--r-----    1 root     root       2266048 Aug 14 08:38 start4.elf
-r--r-----    1 root     root       3737320 Aug 14 08:38 start_x.elf
-r--r-----    1 root     root         99352 Aug 14 08:38 vl805.bin
-r--r-----    1 root     root            65 Aug 14 08:38 vl805.sig

Judging from the documentation alone, this should work as start4.elf does exist. I also added empty files start.elf, start4x.elf, fixup.dat and fixup4x.dat but still get the "Firmware not found" error. I'm clearly missing something.

Steps to reproduce the behaviour

Don't have an easy way yet.

Device (s)

Raspberry Pi 4 Mod. B

Bootloader configuration.

[all]
BOOT_UART=0
WAKE_ON_GPIO=1
POWER_OFF_ON_HALT=1
MAX_RESTARTS=200
BOOT_ORDER=0xf1
ENABLE_SELF_UPDATE=1
DISABLE_HDMI=0
NET_INSTALL_ENABLED=0
PARTITION_WALK=1

[partition=32]
PARTITION=0
HDMI_DELAY=0
NET_INSTALL_ENABLED=1
NET_INSTALL_KEYBOARD_WAIT=1200

System

# vcgencmd bootloader_version
2025/07/17 09:26:45
version 3c6288961a69b5cc682966c88f9a1aaa3ceb5fe0 (release)
timestamp 1752740805
update-time 1755087947
capabilities 0x0000007f

# vcgencmd version
Jul 17 2025 17:31:44 
Copyright (c) 2012 Broadcom
version a668b6e6edce3274de221324b93cb8741e4a7f7c (clean) (release) (start)

# uname -a
Linux info-beamer-60262259 6.12.41-v8+ #1897 SMP PREEMPT Fri Aug  1 12:20:46 BST 2025 aarch64 GNU/Linux

Bootloader logs

Don't have those yet, but I'll see if I can capture NETCONSOLE next.

USB boot

No response

NVMe boot

No response

Network (TFTP boot)

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions