raspberrypi / usbboot

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

2711: Fix handling of serial numbers in single shot mode #63

Closed timg236 closed 4 years ago

timg236 commented 4 years ago

It's possible that SerialNumber=3 might be received twice due to differences in timing causing rpiboot to exit too early i.e. before the second stage has started.

Tweak the loop condition to handle this.

timg236 commented 4 years ago

@ghollingworth

ghollingworth commented 4 years ago

Looks fair, can't remember what state (iSerialNumber == 3) is, is this third stage booting?

timg236 commented 4 years ago

0x3 is the 2711 ROM, I think previous chips used be 0x0.

The second stage is 0x1.

ghollingworth commented 4 years ago

Ah right, yes...

Fair enough, I confirm it's good...