Jump to content

Recommended Posts

Posted

I’ve done some searching, but haven’t found a clear answer.

i have a rockpi-s with a built in eMMC that has a bootable armbian image.

When i insert a micro-SD card into the RP, and the card has a bootable image, it happily boots off of the card. Remove the card, and it boots off the eMMC. Perfect.

Now, how do I duplicate this same functionality with a usb key?

no key or sd = boot from eMMC

SD inserted = boot from SD

USB inserted = boot from USB

 

I’ve been able to get the RP to boot from the usb using armbian-install to set it up, but then if I remove the USB, it no longer boots from the eMMC.

<
  • Solution
Posted

AFIR, usb boot requires u-boot supporting a) usb initialization at boot time and loading kernel from USB in priority to other devices, though u-boot anyway should be on eMMC or SD (or spi flash when exists).

Priority of these is hardcoded in CPU's BootROM, which looks for loader (say u-boot, for simplicity), which in turn does all the job.

Setting up usb in armbian-install might only point u-boot to partition guid on usb rather than eMMC or SD (in armbianEnv.txt), but this is not the same as prioritizing USB over SD and eMMC.

To achieve USB load if USB flash is present, one needs to ensure that u-boot supports this. Further setup has nothing to do with armbian-install, just flashing image to USB is sufficient.

Although USB boot looks attractive, it actually requires enabling features, which slow down boot for several seconds and it will not help if u-boot at eMMC/SD/spi flash is damaged. So in fact it is just a toy

Posted

I see. The only reason I have to boot from µSD or USB is to update the eMMC, it's not a "regular thing", so if it's slow I don't mind.

As I said earlier, with just the eMMC and µSD, it works exactly the way I want, I was simply hoping to add USB to the mix as an alternative to µSD since that would be easier for end users.

If it can't work exactly the same as the way it works currently, then there's no point. (i.e. it doesn't matter if the eMMC is unbootable or even unformatted, the µSD will always boot first ATM). If the USB boot relies on the eMMC or µSD then it's not going to be useful in my case.

TY for the detailed explanation.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines