raspberrypi / usbboot

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

MSD stopped being exposed #16

Closed kubiko closed 7 years ago

kubiko commented 7 years ago

This has been working for me, but at some point CM3 goes to state where MSD is no more exposed on secondary USB port. As matter of fact there seems to be no USB device exposed at all. usbboot does not show any obvious error and second stage bootloader is loaded to the device successfully. lsusb on host computer does not show anything connected on USB though once second stage bootloader is loaded. I have now two CM3 in this state. Filesystem on CM3 itself seems to be still fine, as normal boot still works, however I can't get it anymore to MSD mode. I can't really say how to get CM3 to this state either, as all I was doing was debugging u-boot boot Any thoughts? Or may be adding boot artefacts which would have option to reset emmc on CM3?

ghollingworth commented 7 years ago

Is this using the official CMIO carrier board? It's possible that the eMMC is not being detected because the EMMC_DISABLE_N signal is not being correctly pulled high by the msd.elf code.

It may be the same issue as we're seeing on the Pi Zero where there is a bug in the bootcode.bin which in some cases doesn't terminate the communication correctly and as such gets stuck waiting for the boot. Does the LED change state at all during this process?

It might be worth trying the usb_reset fix detailed elsewhere here since that would have a similar response to the one you're seeing

Gordon

kubiko commented 7 years ago

yes this is using official Compute module 3 I/O carrier board. Board starts with red + green LED on when I connect power, then green LED goes off somewhere after sending bootcode.bin. Green LED does not come back anymore. I'm using u-boot on boot partition, if that helps to narrow ir. I thought that u-boot might have corrupted drive but erasing first few blocks on emmc did not help (only broke u-boot:) ) I just tested usb_reset merged 2 days ago and no joy, still same. No MSD is exposed.

ghollingworth commented 7 years ago

Now you've erased the first couple of sectors can you try moving J4 from EN to DIS. This will mean that the eMMC will be enabled at boot time but there's no MBR so it will fail the boot and drop back to USB boot... Does this make any difference?

Gordon

On Mon, Apr 24, 2017 at 11:04 AM Ondrej notifications@github.com wrote:

yes this is using official Compute module 3 I/O carrier board. Board starts with red + green LED on when I connect power, then green LED goes off somewhere after sending bootcode.bin. Green LED does not come back anymore. I'm using u-boot on boot partition, if that helps to narrow ir. I thought that u-boot might have corrupted drive but erasing first few blocks on emmc did not help (only broke u-boot:) ) I just tested usb_reset merged 2 days ago and no joy, still same. No MSD is exposed.

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_raspberrypi_usbboot_issues_16-23issuecomment-2D296603178&d=DwMFaQ&c=DpyQ_ftY536pf7wCBQXXU58xADDRY77THQzJu1OmzOo&r=EpeUfwJ53nQC2xcdRnrSM8FN2O0tyGujIYibNTEXRbE&m=3GPFxQhBBb5ryIZIyKsBwM87VyAiVOgI2ay7gjRFgxU&s=pU5tlCgduq8qak3ftr8frW3BMd5XCV3qTj7K3OCEIJk&e=, or mute the thread https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_notifications_unsubscribe-2Dauth_AB9CHLC9bGAClWdK0-5F7hlhovuBWTI84tks5rzHOQgaJpZM4NCXil&d=DwMFaQ&c=DpyQ_ftY536pf7wCBQXXU58xADDRY77THQzJu1OmzOo&r=EpeUfwJ53nQC2xcdRnrSM8FN2O0tyGujIYibNTEXRbE&m=3GPFxQhBBb5ryIZIyKsBwM87VyAiVOgI2ay7gjRFgxU&s=ist9Grfm-L1PTAcDFKDbfD9P0wCRXVvw68E44duGpps&e= .

--

Director of Software Engineering, Raspberry Pi (Trading) Limited t: +44 (0) 1223 322633 m: +44 (0) 7450 946289 e: gordon@raspberrypi.org w: www.raspberrypi.org

kubiko commented 7 years ago

not much change. I have actually two broken CM3, one on which I have erased few first sectors. When I've moved J4 to DIS, CM3 with erased sectors now defaults to USB boot, but still no MSD once 'usbboot' completes. other one will boot to u-boot, regardless, I guess that's expected as I moved J4….

ghollingworth commented 7 years ago

I have updated the code to fix this problem... Please reopen if problems are still found.

ghollingworth commented 7 years ago

Leave it at EN...

Check a couple of things:

1) Are you running rpiboot on a Pi, a PC or Mac? 2) Are you definite that you rebuilt rpiboot and are using sudo ./rpiboot to make sure it picks up the new one? 3) What is the output on the command line when you run it 4) What does dmesg look like?

Gordon

On Mon, Apr 24, 2017 at 11:59 AM Ondrej notifications@github.com wrote:

not much change. I have actually two broken CM3, one on which I have erased few first sectors. When I've moved J4 to DIS, CM3 with erased sectors now defaults to USB boot, but still no MSD once 'usbboot' completes. other one will boot to u-boot, regardless, I guess that's expected as I moved J4….

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/raspberrypi/usbboot/issues/16#issuecomment-296619425, or mute the thread https://github.com/notifications/unsubscribe-auth/AB9CHHb9T1xyBR_ct0cMHD1oJwMGpYueks5rzICfgaJpZM4NCXil .

--

Director of Software Engineering, Raspberry Pi (Trading) Limited t: +44 (0) 1223 322633 m: +44 (0) 7450 946289 e: gordon@raspberrypi.org w: www.raspberrypi.org