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

Forcing USB device mode boot even when there is a full firmware on the SD card. #914

Closed
ali1234 opened this issue Dec 13, 2017 · 5 comments

Comments

@ali1234
Copy link

ali1234 commented Dec 13, 2017

This is part question, part feature request.

Suppose I have a RPi Zero with a blank SD card, and I load the MSD firmware over USB with rpiboot or usbbootgui. Now I write my firmware on to the USB storage device and reboot. It should now boot my firmware from the SD card.

But supposing I write a bad firmware and the device goes in to a boot loop. Is it possible to force a boot from USB without removing the SD card? So that I can once again boot the MSD firmware from rpiboot and write a different firmware on to the SD card?

The N900 had a boot option called "boot_wait" for this purpose. It would specify number of seconds to wait for a USB connection before continuing normal boot. Would it be possible to have something like this in config.txt? (If it does not already exist.)

@ghollingworth
Copy link
Contributor

Unfortunately not, once the bootrom finds a bootcode.bin on the SD card it will boot from it. This is why we specifically have to interrupt the CMD line from the eMMC to the processor when you want to boot from USB on the compute module (otherwise it'd be impossible to get out of this situation)

@ali1234
Copy link
Author

ali1234 commented Dec 15, 2017

Wow. I'm glad I'm not trying to build a real product based on this.

@JamesH65
Copy link
Contributor

Because sarcasm works so well when wanting help.

@ali1234
Copy link
Author

ali1234 commented Dec 15, 2017

Help has already been refused. Also that wasn't sarcasm. I really am glad I am not trying to build a real product with this. It would be a nightmare to find out that you need a physical switch to prevent bricking after you manufactured boards.

@pelwell
Copy link
Contributor

pelwell commented Dec 15, 2017

First of all, this paragraph makes no sense:

Suppose I have a RPi Zero with a blank SD card, and I load the MSD firmware over USB with rpiboot or usbbootgui. Now I write my firmware on to the USB storage device and reboot. It should now boot my firmware from the SD card.

Secondly, "refused" implies a lack of will, when in fact it is a lack of possibility - the bootrom is immutable, and it does what it does.

Thirdly, if you were serious about building a field-updateable product then you would partition the SD card (assuming you aren't using an EMMC which is more suited to the job - Pi Zero was never intended to form part of products, that's what CM is for) and create a nominally read-only partition containing U-boot or some other loader - NOOBS even - and put the OS/application in a separate partition.

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