-
Notifications
You must be signed in to change notification settings - Fork 206
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
[CM4-S] BCM-USB-MSD boot mode fails to boot, with no feedback #588
Comments
@nbuchwitz Is this something you've encountered? |
I will have a look, but probably not before next week. |
RevPi Connect S has a LAN9514 hub/ethernet phy and downstream a LAN912 hub/ethernet phy. The front ports are connected to the LAN9514 on downstream 1&2. @pelwell, any changes regarding device enumeration between both firmware versions? |
Looking at the release history (https://github.com/raspberrypi/rpi-eeprom/commits/master/) and the 2024-04-17 release note (c0a207f#diff-4bb6018cbd55737981d3920b5a74c870f352cd3c56f4065cc24901e0c580a049R3), the only change that looks like it might be relevant is:
We'll have to dig into what the practical differences might have been. |
Lets let me first build a test setup and see if I can verify the report. I also have a serial console attached and can check if there might be any clues in the log. Might save you some time in the dirt. |
Can confirm that the screen stays black with 72caf667. Serial console as following:
I also noticed that the relay (on GPIO1) in the device switches after some additional seconds. The next older release e608a69d boots without any issue:
|
This could be due to a timing change in the bootloader, which might be hard to pinpoint. The advice for now is to stay on |
The difference between these versions is essentially pre/post Pi5 fork/merge. Whilst the XHCI, MSD/SCSI and file-system code is almost identical there will be differences in timing which can upset some drives. I've just booted a CM4-S with an SD card in a one of these U-Green SD card readers to verify that the BCM2711 XHCI driver is still functional Revision : a03150 The failure point after the INQUIRY command might suggest that the USB drive isn't ready and then never becomes ready because it was asked too early. As @pelwell says upgrading beyond the last stable release doesn't add much more functionality except for some unification of secure-boot code so it might be best to stick with that for the moment. If it is as I suspect timing related differences at power on this invariably breaks some drives / fixes others so a quick fix is unlikely unless someone spots another issue e.g. a protocol bug that's slipped through. |
@pelwell, @timg236 : Thank you, and understood. It's no trouble for us to use the older release for our project, particularly since we need to flash the bootloader with the new boot order before deployment anyway. @timg236: I did try various combinations of Regarding breaking some/fixing others, all of the following boot on the old firmware but fail on the new firmware:
The only combination that I've tried that worked was that same SanDisk 32GB Micro-SD in the Micro-SD slot of the StarTech adapter. |
Thanks for the information. To rule out one more thing please could you see if 2024/05/17 is any better? |
@timg236: confirmed, the problem still occurs with pieeprom-2024-05-17.bin |
Did also some tests with After that I ran a comparison of good and bad firmware with
On the working firmware, the order is different, and the HUB reaches state 9 before the MSD. I guess the states references to the internal state machine? What does happend before / in stage 9? |
The firmware on this issue may help but can't rule out other issues |
Thanks, seems to do the trick:
Edit: Also working with the updated version:
|
…vments (latest) * Resolve USB boot regression in 2024-04-17 relase on CM4S See raspberrypi#588 * Improve compatibility for booting from some USB SD card readers raspberrypi#527
Describe the bug
I am using a Revolution Pi Connect S, which is based on CM4-S. I have flashed a bootloader config to enable BCM-USB-MSD boot. With bootloader versions up to
pieeprom-2024-04-15.bin
the PI boots normally from various USB drives.However, starting with
pieeprom-2024-04-17.bin
, the Pi cannot boot from a USB MSD at power-on. When this happens, there is no video output at all, the disk access light on the USB drive goes out, and eventually LED A3 turns on solid red on the front of the RevPi Connect S enclosure (unfortunately I'm unsure to which pins this might be wired.)I have found that if the USB drive is not connected at power-on and instead inserted after video output shows that USB boot is being attempted, the system will boot. But if the USB drive is connected at power-on, the system hangs as described above.
Strangely, there is one configuration of USB device that I have on hand that appears to work, which is a micro SD card in the microSD slot of a multi-card SD to USB adapter. Putting the same card in a full-size SD sleeve in the other slot of the adapter doesn't work. All flash/thumb/pen drives and SSDs do not work.
Steps to reproduce the behaviour
To reproduce the failure condition:
pieeprom-2024-04-17.bin
or newer.To reproduce the working edge case:
pieeprom-2024-04-17.bin
or newer.Device (s)
Raspberry Pi CM4-S
Bootloader configuration.
System
Problematic bootloader:
pieeprom-2024-04-17.bin
and newerLast working bootloader:
pieeprom-2024-04-15.bin
Bootloader logs
The Revolution Pi Connect S does not appear to have a UART connection that is set up correctly to output boot information, unless I am using it incorrectly. Boot details are output over the HDMI connection during a successful boot, but when this problem occurs there is no HDMI output.
USB boot
Various USB flash/pen/thumb drives and one SSD all failed. A full-size SD card in two different SD to USB adapters failed.
The only configuration that works on the newer bootloader versions is a 32 GB SanDisk microSD card in the microSD slot of an SD-USB adapter. If I put the card in a passive microSD-SD sleeve, and then put that in the full-size SD slot of the SD-USB adapter, the problem occurs.
Link to working uSD to USB adapter: https://www.digikey.com/en/products/detail/startech-com/SDMSDRWU3AC/21398884
Link to working SD card: https://www.digikey.com/en/products/detail/raspberry-pi/SC0251L/15212334
NVMe boot
n/a
Network (TFTP boot)
n/a
The text was updated successfully, but these errors were encountered: