Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Loading Fastboot failed, timed out. #97

Open
AndriiNeivanov opened this issue Dec 17, 2024 · 11 comments
Open

Loading Fastboot failed, timed out. #97

AndriiNeivanov opened this issue Dec 17, 2024 · 11 comments

Comments

@AndriiNeivanov
Copy link

AndriiNeivanov commented Dec 17, 2024

Provisioning failed with Loading Fastboot failed, timed out. message.

Steps to reproduce:
Make provisioning as described in official documentation, RPI 5 should make provisioning of CM 4.

Logs:
provisioner.log
keywriter.log
triage.log
progress.log

After failure not able to use rpiboot:

$ sudo ./rpiboot 
[sudo] password for pc: 
RPIBOOT: build-date Dec 17 2024 version 20240422~085300 62f37dae
If the device fails to connect then please see https://rpltd.co/rpiboot for debugging tips.
Waiting for BCM2835/6/7/2711/2712...
Loading embedded: bootcode4.bin
Sending bootcode.bin
Successful read 4 bytes 
Waiting for BCM2835/6/7/2711/2712...
Loading embedded: bootcode4.bin
Second stage boot server
Cannot open file boot.sig
Cannot open file boot.sig
Cannot open file boot.sig
Cannot open file boot.sig
Cannot open file boot.sig
@tdewey-rpi
Copy link
Collaborator

Thanks for the report, @AndriiNeivanov

Inspecting the logs, it appears that you've written the key successfully - which explains future rpiboot strangeness if you don't also sign those components.

What is unexpected, however, is Fastboot timing out.

With the device in such a state, are you able to get the result from fastboot devices? Note that this output will contain a serial number - which I strongly recommend you obfuscate (replace it with X's or similar).

@AndriiNeivanov
Copy link
Author

Probably it was a power loss issue. It looks like CM 4 has power loss during provisioning.
So, I moved forward and hang on Starting Resizing OS images stage in provisioning.log:
provisioner.log
keywriter.log
progress.log
triage.log

Only red led is glowing.

Monitor lost the device:
Screenshot from 2024-12-17 15-13-40

With the device in such a state, are you able to get the result from fastboot devices? Note that this output will contain a serial number - which I strongly recommend you obfuscate (replace it with X's or similar).

It looks like fastboot works well now:

$ fastboot devices
xxxxxxxxxxxxxxxx	fastbootd

@tdewey-rpi
Copy link
Collaborator

Thanks for the update, @AndriiNeivanov.

One thing you can try is 'forgetting' the device entirely.

Delete the entire log set for that device:

rm -rf /var/log/rpi-sb-provisioner/xxxxxxx/

And then re-plugging the power of the compute module IO board.

@AndriiNeivanov
Copy link
Author

AndriiNeivanov commented Dec 18, 2024

One thing you can try is 'forgetting' the device entirely.
Delete the entire log set for that device:
rm -rf /var/log/rpi-sb-provisioner/xxxxxxx/
And then re-plugging the power of the compute module IO board.

I deleted and tried again, and had failure in provisioner.log:
Loading Fastboot failed, timed out.
progress.log
provisioner.log
keywriter.log
triage.log

Also the monitor.sh had failure.

Both leds red and green are glowing.

Data from the display via HDMI:

Boot mode: RPIBOOT (03) order f
secure-boot
Loading boot.img ...
read failed: boot.img -1

@tdewey-rpi
Copy link
Collaborator

Thanks for confirming @AndriiNeivanov

@roliver-rpi will you have chance to look at this?

@roliver-rpi
Copy link
Contributor

@timg236 , are you familiar with this RPIBOOT failure mode? Unfortunately, any error returned by the 'rpiboot' executable has been dropped as rpi-sb-provisioner.sh only checks for a timeout error when loading the fastboot gadget.

@oliora
Copy link

oliora commented Dec 19, 2024

I've got the same issue and stuck now.
Maybe important is that I had to change SOURCE_EEPROM_IMAGE to "/lib/firmware/raspberrypi/bootloader-2712/latest/pieeprom-2024-12-07.bin" because the original eeprom file does not exist.

@oliora
Copy link

oliora commented Dec 19, 2024

Have restarted the process and now I'm getting a keywriter error

Writing key and EEPROM configuration to the device
Writing failed, timed out.

@AndriiNeivanov
Copy link
Author

AndriiNeivanov commented Dec 20, 2024

I've got the same issue and stuck now. Maybe important is that I had to change SOURCE_EEPROM_IMAGE to "/lib/firmware/raspberrypi/bootloader-2712/latest/pieeprom-2024-12-07.bin" because the original eeprom file does not exist.

The same on my RPI 5 (prov server) for CM 4 (prov client).

$ ls -la bootloader-2712/latest 
total 8304
drwxr-xr-x 2 root root    4096 Dec 19 14:59 .
drwxr-xr-x 4 root root    4096 Dec 19 14:59 ..
-rw-r--r-- 1 root root 2097152 Dec 16 11:13 pieeprom-2024-11-12.bin
-rw-r--r-- 1 root root 2097152 Dec 16 11:13 pieeprom-2024-11-27.bin
-rw-r--r-- 1 root root 2097152 Dec 16 11:13 pieeprom-2024-12-07.bin
-rw-r--r-- 1 root root 2097152 Dec 16 11:13 pieeprom-2024-12-15.bin
-rw-r--r-- 1 root root  102804 Dec 16 11:13 recovery.bin

$ ls -la bootloader-2711/latest 
total 6348
drwxr-xr-x 2 root root   4096 Dec 19 14:59 .
drwxr-xr-x 4 root root   4096 Dec 19 14:59 ..
-rw-r--r-- 1 root root 524288 Dec 16 11:13 pieeprom-2023-01-11.bin
-rw-r--r-- 1 root root 524288 Dec 16 11:13 pieeprom-2023-05-11.bin
-rw-r--r-- 1 root root 524288 Dec 16 11:13 pieeprom-2024-01-18.bin
-rw-r--r-- 1 root root 524288 Dec 16 11:13 pieeprom-2024-01-22.bin
-rw-r--r-- 1 root root 524288 Dec 16 11:13 pieeprom-2024-04-15.bin
-rw-r--r-- 1 root root 524288 Dec 16 11:13 pieeprom-2024-04-17.bin
-rw-r--r-- 1 root root 524288 Dec 16 11:13 pieeprom-2024-05-17.bin
-rw-r--r-- 1 root root 524288 Dec 16 11:13 pieeprom-2024-07-30.bin
-rw-r--r-- 1 root root 524288 Dec 16 11:13 pieeprom-2024-09-05.bin
-rw-r--r-- 1 root root 524288 Dec 16 11:13 pieeprom-2024-10-10.bin
-rw-r--r-- 1 root root 524288 Dec 16 11:13 pieeprom-2024-10-21.bin
-rw-r--r-- 1 root root 524288 Dec 16 11:13 pieeprom-2024-12-07.bin
-rw-r--r-- 1 root root  97604 Dec 16 11:13 recovery.bin
-rw-r--r-- 1 root root  99352 Dec 16 11:13 vl805-000138c0.bin

I fixed path on latest binaries and it resolved the problem. From now on my CM 4 has success boot.

@roliver-rpi, @tdewey-rpi, please add the patch below to main branch and to the Raspberry Pi APT repositories.

$ git diff main..dev/eeprom-image-fix 
diff --git a/service/rpi-sb-provisioner.sh b/service/rpi-sb-provisioner.sh
index de31d8d..f6a6f5e 100755
--- a/service/rpi-sb-provisioner.sh
+++ b/service/rpi-sb-provisioner.sh
@@ -370,12 +370,12 @@ BOOTCODE_BINARY_IMAGE=
 BOOTCODE_FLASHING_NAME=
 case ${RPI_DEVICE_FAMILY} in
     4)
-        SOURCE_EEPROM_IMAGE="/lib/firmware/raspberrypi/bootloader-2711/latest/pieeprom-2024-09-05.bin"
+        SOURCE_EEPROM_IMAGE="/lib/firmware/raspberrypi/bootloader-2711/latest/pieeprom-2024-12-07.bin"
         BOOTCODE_BINARY_IMAGE="/lib/firmware/raspberrypi/bootloader-2711/latest/recovery.bin"
         BOOTCODE_FLASHING_NAME="${FLASHING_DIR}/bootcode4.bin"
         ;;
     5)
-        SOURCE_EEPROM_IMAGE="/lib/firmware/raspberrypi/bootloader-2712/latest/pieeprom-2024-09-23.bin"
+        SOURCE_EEPROM_IMAGE="/lib/firmware/raspberrypi/bootloader-2712/latest/pieeprom-2024-12-15.bin"
         BOOTCODE_BINARY_IMAGE="/lib/firmware/raspberrypi/bootloader-2712/latest/recovery.bin"
         BOOTCODE_FLASHING_NAME="${FLASHING_DIR}/bootcode5.bin"
         ;;

@roliver-rpi
Copy link
Contributor

The SOURCE_EEPROM_IMAGE certainly needs updating for CM5 as the original file no longer exists as @oliora points out.

I'm still not sure why you've been facing issues on CM4 @AndriiNeivanov as bootloader-2711/latest/pieeprom-2024-09-05.bin is still available; I've been able to provision a CM4 using rpi-sb-provisioner 1.3.1 installed from the apt repository without issue.

@AndriiNeivanov
Copy link
Author

AndriiNeivanov commented Dec 20, 2024

It looks like my CM 4 does not work with pieeprom-2024-09-05.bin, but work well with pieeprom-2024-12-07.bin.
P.S.: My bad. My git diff above was not correct, so I fixed it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants