raspberrypi / usbboot

Raspberry Pi USB booting code, moved from tools repository
Apache License 2.0
878 stars 221 forks source link

`recovery` does not work with pieeprom.bin #214

Closed foxt closed 2 months ago

foxt commented 2 months ago

Describe the bug

When using the recovery folder to try and change the EEPROM on a Pi 4 (not CM4), it fails.

Steps to reproduce the behaviour

Connect a Pi4 configured to use rpiboot to your computer.

Attempt to run rpiboot -d . in the recovery folder. Notice how nothing happens.

As a work around, I renamed pieeprom.bin to pieeprom.upd, and upon running the same command again, the Pi applied the EEPROM update and rebooted.

Device(s)

Other

Compute Module IO board.

Raspberry Pi 4 Model B - 4GB

RPIBOOT logs

RPIBOOT: build-date Apr 15 2024 version 20221215~105525 ff9da750
Loading: ./bootcode4.bin
Waiting for BCM2835/6/7/2711/2712...
Loading: ./bootcode4.bin
Second stage boot server
Loading: ./config.txt
File read: config.txt
Cannot open file vl805.sig
Loading: ./pieeprom.sig
File read: pieeprom.sig
Cannot open file pieeprom.upd
Cannot open file recover4.elf
Cannot open file fixup4rc.dat
Cannot open file recovery.elf
Cannot open file fixup_rc.dat
Loading embedded: start4.elf
File read: start4.elf
Cannot open file fixup4.dat
Second stage boot server done

Kernel logs

No response

Device UART logs


SIG vl805.sig 0000000000000000000000000000000000000000000000000000000000000000 0
Bad signature vl805.sig
SIG pieeprom.sig d4d4a184a1bd7a60b25bc4cf528b0ef432b379a154d18d17174074970537189b 1713208019
Bad signature pieeprom.upd
Read recover4.elf bytes        0 hnd 0x0
Read fixup4rc.dat bytes        0 hnd 0x0
Invalid ELF header: 'recover4.elf'
Read recovery.elf bytes        0 hnd 0x0
Read fixup_rc.dat bytes        0 hnd 0x0
Invalid ELF header: 'recovery.elf'
Read start4.elf bytes   301628 hnd 0x0
Read fixup4.dat bytes        0 hnd 0x0
0x00c03112 0x00000000 0x00000fff
MEM GPU: 76 ARM: 948 TOTAL: 1024
Starting start4.elf @ 0xc1000200 partition -1
XHCI-STOP
xHC ver: 256 HCS: 05000420 fc000031 00e70004 HCC: 002841eb
USBSTS 18
+
timg236 commented 2 months ago

That’s the same flow as the normal bootloader so this is working as expected. NB booting start.elf etc as individual files is not recommended. It’s best to use the boot.img approach