booting only from USB - in future - (USB-on-the-go)


47 posts   Page 1 of 2   1, 2
by piclassroomproject » Wed Apr 22, 2015 1:58 pm
As i am planning to develop an educational system deploying in "offline" regions, it would be nice to start the WHOLE booting process from USB.HDD, so µSD-card would not be necessary any longer. (USB-on-the-go)

Today 1st booting step seems to be hardcoded in SoC Broadcom Chip. I don't really understood why this is should be a "must be" all the time...?

Dear "Mr. Raspberry", are there any considerations for future products to change this in my desired way?

Thank You

regards
from Berlin
:?:
Last edited by piclassroomproject on Wed Apr 22, 2015 3:17 pm, edited 1 time in total.
http://piclassroomproject.blogspot.com
User avatar
Posts: 13
Joined: Sat Apr 11, 2015 11:43 am
Location: Berlin, Germany
by JimmyN » Wed Apr 22, 2015 2:06 pm
You always need the SD card as the RPi doesn't have a BIOS like a typical PC. All "BIOS" information is contained on the SD card so it has to be there in order to boot the system. The OS can be on a USB and boot from there but it has to read the "BIOS" information from the SD card first.
Posts: 1109
Joined: Wed Mar 18, 2015 7:05 pm
Location: Virginia, USA
by mikerr » Wed Apr 22, 2015 2:16 pm
The model A can boot from USB:

https://www.raspberrypi.org/forums/view ... 98&t=74098

Although it's not that useful - it appears as a mass storage device to the host PC , or model B

Of course you can have 99% on USB by moving the root filesystem to USB
https://www.raspberrypi.org/forums/view ... 59#p351659
then only some firmware remains on SD
Last edited by mikerr on Wed Apr 22, 2015 2:17 pm, edited 1 time in total.
Android app - Raspi Card Imager - download and image SD cards - No PC required !
User avatar
Posts: 2403
Joined: Thu Jan 12, 2012 12:46 pm
Location: Up north , UK
by Joe Schmoe » Wed Apr 22, 2015 2:16 pm
As with all such things, it'd be nice to know *why* the OP wants this.

Anyway, both of the following are true:

  1. It's not going to change. It is the way it is.
  2. There's no reason for it to change. There is no reason why you can't just leave the SD card plugged in. Think of it as a permanent part of the board, just like the capacitors and resistors.
And some folks need to stop being fanboys and see the forest behind the trees.

(One of the best lines I've seen on this board lately)
Posts: 4277
Joined: Sun Jan 15, 2012 1:11 pm
by piclassroomproject » Wed Apr 22, 2015 2:42 pm
@Joe: I do not and will never agree to people like you who take the "status quo" for granted. I do not accept your answer. Your post is only for posting reasons, as it seems to me. The only thing you are able is to say "red is red, because it is red". That is philosophical nonsense and does not lead us further long. Confirming the status quo "as is" could never be a sufficient explanation of the "why" - as announced and promised by yourself in your entry statement! Think of Galileo... :twisted:

My question is directed to "Mr. Raspberry" further long.. :!:
http://piclassroomproject.blogspot.com
User avatar
Posts: 13
Joined: Sat Apr 11, 2015 11:43 am
Location: Berlin, Germany
by DougieLawson » Wed Apr 22, 2015 2:50 pm
Now I'm going to have to find a wonky/non-standard USB-A to USB-A cable and see whether this works on an A+.
Microprocessor, Raspberry Pi & Arduino Hacker
Mainframe database troubleshooter
MQTT Evangelist
Twitter: @DougieLawson

Since 2012: 1B*5, 2B*2, B+, A+, Zero*2, 3B*3

Please post ALL technical questions on the forum. Do not send private messages.
User avatar
Posts: 27904
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
by fruitoftheloom » Wed Apr 22, 2015 2:55 pm
piclassroomproject wrote:As i am planning to develop an educational system deploying in "offline" regions, it would be nice to start the WHOLE booting process from USB.HDD, so µSD-card would not be necessary any longer.

Today 1st booting step seems to be hardcoded in SoC Broadcom Chip. I don't really understood why this is should be a "must be" all the time...?

Dear "Mr. Raspberry", are there any considerations for future products to change this in my desired way?

Thank You

regards
from Berlin
:?:

Old posts but still relevant
https://www.raspberrypi.org/forums/view ... 63&t=15696

https://www.raspberrypi.org/forums/view ... 6&start=25
.
Ex Computer Repair & Service Technician.
RPi 3B, HP Envy 4500 Wireless Printer, Google Chromecast, Android Smart Phone, HD 1080p TV and 3/4G Mobile Internet make ideal companions.
Posts: 13748
Joined: Tue Mar 25, 2014 12:40 pm
Location: Bognor Regis UK
by piclassroomproject » Wed Apr 22, 2015 3:16 pm
yes, thank you.

My question was not to reflect the status quo. but asking "Mr Raspberry" if he will change the game. As far as I know he is a Broadcom employee, allowed spending some( :lol: ) time in Raspberry Pi (3?) development....

regards from
Berlin
:arrow:
http://piclassroomproject.blogspot.com
User avatar
Posts: 13
Joined: Sat Apr 11, 2015 11:43 am
Location: Berlin, Germany
by fruitoftheloom » Wed Apr 22, 2015 3:37 pm
piclassroomproject wrote:yes, thank you.

My question was not to reflect the status quo. but asking "Mr Raspberry" if he will change the game. As far as I know he is a Broadcom employee, allowed spending some( :lol: ) time in Raspberry Pi (3?) development....

regards from
Berlin
:arrow:

Over the last 3 years it would appear that the USB OTG implementation is feasible if the code was available to write a driver stack, but that would need Broadcom to release Proprietary Code AFAIAA

Eben Christopher Upton is a Technical Director and ASIC architect for Broadcom. He is also a founder and former trustee of the Raspberry Pi Foundation, and now CEO of the Raspberry PI trading company. He is also responsible for the overall software and hardware architecture of the Raspberry Pi device.
.
Ex Computer Repair & Service Technician.
RPi 3B, HP Envy 4500 Wireless Printer, Google Chromecast, Android Smart Phone, HD 1080p TV and 3/4G Mobile Internet make ideal companions.
Posts: 13748
Joined: Tue Mar 25, 2014 12:40 pm
Location: Bognor Regis UK
by BMS Doug » Wed Apr 22, 2015 3:41 pm
piclassroomproject wrote:yes, thank you.

My question was not to reflect the status quo. but asking "Mr Raspberry" if he will change the game. As far as I know he is a Broadcom employee, allowed spending some( :lol: ) time in Raspberry Pi (3?) development....

regards from
Berlin
:arrow:


If you are attempting to ask a specific individual it would be better to use their actual name, addressing queries to forums with a name based on the product seems futile.

You are requesting that time and effort be spent developing a solution to a problem that doesn't really exist (except in your mind). The required code to redirect the boot to a different drive will take up very little space, requiring a very cheap microSD card (you only need about 64 MB) so each card will cost about £1, bulk purchase would probably be able to get a better price).
Why should the Foundation spend money to solve an edge case issue that has an easy and cheap workaround?
Doug.
Building Management Systems Engineer.
Posts: 3749
Joined: Thu Mar 27, 2014 2:42 pm
Location: London, UK
by Joe Schmoe » Wed Apr 22, 2015 3:49 pm
My question is directed to "Mr. Raspberry" further long.. :!:


First, who is this "Mr. Raspberry"? Anyone I know???

Anyway, your post raises an interesting philosophical question (and appropriate here, since you raised the issue of philosophy). That is, is something still that something if it is completely changed and is now largely different from what it used to be? Or, to put it another way, "is it still accurate to refer to it as an X if it has morphed into something completely different (a Y)?" Needless to say, I think the answer to these question is "No.", but there are some real world examples of companies that think otherwise. Two examples of this are the Toyota Corolla and Microsoft Windows. In the former case, Toyota has used the Corolla label over the years for very different types of cars. Since the word doesn't mean anything, they are, of course, free to use it as they see fit, but it is confusing and annoying for the consumer. Similarly, Microsoft calling their "Windows 10 Iot for the Pi" Windows is silly, since it has nothing in common with what the consumer generally associates with the term "Windows" (namely, being compatible with their existing base of x86 Windows software and having a pretty GUI - Windows 10 Iot has neither of these). The point is that Windows is not (or should not, in this author's opinion) simply be a synonym for "OS produced by Microsoft" - it should actually mean something.

Now, what does all of this have to do with this thread? Well, it is not impossible that at some future date, the Raspberry Pi Foundation (or whatever they end up calling themselves in that future time) may produce a computer that does not require an SD card to boot, but that board will not be (in this author's opinion) a Raspberry Pi. It will be something else.

By definition, the RPi is an SBC that boots from an SD card. Just as "Windows" is a PC OS that respects your existing base of x86 software and gives you a nice, pretty, user-friendly GUI.

A few other comments:

  1. You didn't answer my question about "Why you want to do this" or why you can't just treat the SD card as being equivalent to one of the capacitors on the board. Note, incidentally, that if you do this, you don't need a very big SD card - it can be only 100 megs or thereabouts. So, essentially it becomes a zero-cost item.
  2. To all the others who suggested using a Model A and booting from USB, note that this doesn't fit the OP's requirements, since he mentioned it running "offline". As I understand it, the "Model A booting from USB" thing requires another PC as the host - i.e., it won't work with a USB hard disk. Correct me if I am wrong...
And some folks need to stop being fanboys and see the forest behind the trees.

(One of the best lines I've seen on this board lately)
Posts: 4277
Joined: Sun Jan 15, 2012 1:11 pm
by jamesh » Wed Apr 22, 2015 3:59 pm
I doubt anything will change in the near to medium future - IIRC its built in to the chip that the boot works like it does. Even if it were not, the engineering effort for this one use case would not be cost effective. So don't expect any change in the boot system and SD card use.

The Compute module has eMMC memory built in, instead of the SD card, but it still needs to boot from that rather than direct from USB. I think. But it would remove the need for an SD card since the flash is built in.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Please direct all questions to the forum, I do not do support via PM.
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 17116
Joined: Sat Jul 30, 2011 7:41 pm
by piclassroomproject » Wed Apr 22, 2015 4:03 pm
i strong deny, taking part in rabulistic discussions.
thank you all for your arguments; yes you are the most brightest heads here. there will be no doubt. my deepest respect to all of them, but only to them, esp. jo.schmo. - as a teacher i would give him the advice to read AND UNDERSTAND my postings, instead of logorrhoic statements. are you retired...? :lol:
sorry because of my bad english. not used enough
that's 4 enough now. :!:
Last edited by piclassroomproject on Wed Apr 22, 2015 4:10 pm, edited 2 times in total.
http://piclassroomproject.blogspot.com
User avatar
Posts: 13
Joined: Sat Apr 11, 2015 11:43 am
Location: Berlin, Germany
by jamesh » Wed Apr 22, 2015 4:08 pm
OK, I'm going to start trimming posts unless people calm down. Please keep on topic and answer the question (although I cannot see any other answer being applicable than my previous post)
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Please direct all questions to the forum, I do not do support via PM.
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 17116
Joined: Sat Jul 30, 2011 7:41 pm
by DougieLawson » Wed Apr 22, 2015 4:59 pm
Do we think that the OP is concerned about SDCard corruption (which is an old and cured bug).

It's trivial to get the root fs moved to a USB device (my B+ runs like that). It's equally trivial to get the root fs running as a read-only filesystem with volatile data either in a ramfs, on a network share or on a mounted USB device.
Microprocessor, Raspberry Pi & Arduino Hacker
Mainframe database troubleshooter
MQTT Evangelist
Twitter: @DougieLawson

Since 2012: 1B*5, 2B*2, B+, A+, Zero*2, 3B*3

Please post ALL technical questions on the forum. Do not send private messages.
User avatar
Posts: 27904
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
by W. H. Heydt » Wed Apr 22, 2015 5:16 pm
Actually....there is an alternative way to boot: use a Compute Module and boot from the on-board flash memory.

While I don't have experience with a very wide variety of SoCs, all of the ones that I have done anything with boot from *something* other than a USB (or SATA in one case) device. The Pi boots from an SD card, or--in the case of the CM--from on-board flash, Cubieboards boot from SD cards or from on-board flash, Odroid-C1 can boot from an SD card or an eMMC module.

Note the pattern...all of these SoCs have barely enough initial code to find and start loading from only one type of storage, whether it is a removable card or some other form of flash memory on, if I am not mistaken, the same or a closely related bus.

Asking that an ARM-based SoC boot directly from a USB or SATA (in the case of Cubieboards and related devices) is asking that the SoCs undergo a significant redesign. This is completely impractical on an economic basis. Note also that--as I understand it--the other major devices that use related SoCs--phones and tablets--also boot from flash memory, which implies that *no* company is making such SoCs with any other way of booting. (ARM SoCs for servers are probably different, but they aren't the sort of SoC one is going to use on a very low cost SBC.)

So while being able to boot from "external" (read as "non-SD/flash") media is probably a desirable characteristic, it falls into the "ain't gonna happen" category. The best you can do is to boot from a minimal SD card or on-board flash and put the Linux root onto your chosen device. With that setup, you could have a standard SD card (think, spares) that could be installed in any Pi with USB sticks or HDDs individualized for each Pi.
Posts: 6711
Joined: Fri Mar 09, 2012 7:36 pm
Location: Vallejo, CA (US)
by piclassroomproject » Wed Apr 22, 2015 6:47 pm
no, i resist.
This is completely impractical on an economic basis. Note also that--as I understand it--the other major devices that use related SoCs--phones and tablets--also boot from flash memory, which implies that *no* company is making such SoCs with any other way of booting.

who will say, that in the next design my wish will be heared by "Mr.Raspberry" (this is a rhetorical adress only) himself and be implemented, as he is sitting in the design office.

never ever say "no" :idea:
esp, those loggorhoic 3000 postings posters
http://piclassroomproject.blogspot.com
User avatar
Posts: 13
Joined: Sat Apr 11, 2015 11:43 am
Location: Berlin, Germany
by Jednorozec » Wed Apr 22, 2015 6:55 pm
I think that they'll be giving Pis away in cereal boxes before you get your wish.
The most important leg of a three legged stool is the one that's missing.
It's called thinking. Why don't you try it sometime?
User avatar
Posts: 713
Joined: Sun Nov 24, 2013 2:17 pm
Location: Deposit, NY
by bertwert » Wed Apr 22, 2015 7:03 pm
Jednorozec wrote:I think that they'll be giving Pis away in cereal boxes before you get your wish.

I like that idea!
Jumbo Raisin Bran - $30 'Free Raspberry Pi'
Please correct me if I am wrong ;-)

Please post your code with these tags:
[code]Your Code Goes Here[/code]

BERTWERT
User avatar
Posts: 585
Joined: Tue Aug 13, 2013 8:15 pm
Location: Golden, BC, Canada
by mahjongg » Wed Apr 22, 2015 7:20 pm
actually, but this is an educated guess, as I don't know exactly how the SD-card is addressed during booting, but IF it happens to use the simple SPI mode (which all SD-Cards support, as a baseline communications mode), then there could be a way to provide a PI with an extended boot mechanism. Its an idea which I have mentioned before to moderators and staffers but which was never picked up.

IF the GPU uses the SPI (single-bit serial) protocol, then it may be possible to add some digital multiplex logic, so that after a reset the PI boots through SPI not from the SD-Card but from a standard SPI EEPROM.
The code in the EEPROM could contain slightly smarter software than what is now used, and offer some extra's in line with PCBIOS chips, initializing the GPU for a default video mode (VGA 640x480), then on a keypress offer a BIOS menu, which gives the ability to direct the rest of the boot process to something other than the SD-Card, and perhaps a few important "BIOS settings", now handled by config.txt, which can be stored in the same EEPROM.
When the "BIOS code" is exited the digital multiplexers are reset so the SD-Card interface is reset to the SD_card instead of a serial EEPROM.

This would give a situation almost identical to modern PC's.

it does rely however on the ability of the hardcoded bootcode to boot from SPI EEPROM instead of the card, it also requires a tiny amount of extra hardware.
User avatar
Forum Moderator
Forum Moderator
Posts: 9152
Joined: Sun Mar 11, 2012 12:19 am
Location: South Holland, The Netherlands
by hippy » Wed Apr 22, 2015 7:21 pm
W. H. Heydt wrote:While I don't have experience with a very wide variety of SoCs, all of the ones that I have done anything with boot from *something* other than a USB (or SATA in one case) device.

The Pi SoC includes code which allows it to boot via USB.

What can currently be done is quite limited and can only be utilised with the A series and CM which do not have the USB-LAN chip fitted.

My understanding is that OTG could be provided on the B series but that would require a board and hardware change, requires considerable effort, isn't a necessity, isn't worthwhile, and it won't likely get done.

Trying to extend functionality on an A or CM is I believe difficult without access to propriety information and tools. Unless someone is prepared to put in considerable effort to reverse engineer what there is and add to it we are stuck with what we have.
Posts: 1970
Joined: Fri Sep 09, 2011 10:34 pm
Location: UK
by W. H. Heydt » Wed Apr 22, 2015 7:24 pm
piclassroomproject wrote:no, i resist.
This is completely impractical on an economic basis. Note also that--as I understand it--the other major devices that use related SoCs--phones and tablets--also boot from flash memory, which implies that *no* company is making such SoCs with any other way of booting.

who will say, that in the next design my wish will be heared by "Mr.Raspberry" (this is a rhetorical adress only) himself and be implemented, as he is sitting in the design office.

never ever say "no" :idea:
esp, those loggorhoic 3000 postings posters

While there is some truth in the proposition that one cannot, categorically, rule out such a feature, it is also possible to look around at what sorts of chips are available and what they cost and make a reasonable estimate of the chances of seeing the feature in a given line of SBCs over next 3 to 5 years. By that measure, direct booting from anything other than an SD card or on-board flash is extraordinarily unlikely. Indeed, I suspect that the engineers working on follow-on Pi devices would be quite startled if such a feature showed up in such a way that it fit within the budget constraints to which the Pi is designed.

As for the size of some postings...that is generally a case of explaining why the answer is what it is. The most knowledgeable could just say, "No, because I know how these chips are designed," and leave it at that. That should be a much less satisfying answer than one that explains why it is the answer and make it possible to accept things the way they are and move on instead of protesting that it is such a good idea that you can't see why it isn't the next thing in the pipeline.

There are features that I would like to see added to the Pi, too, but at least I can point to other boards that have those features, which shows that such features are possible for the sort of SoCs being used on small, (relatively) inexpensive SBCs. If you can point to such a board that has the feature you are looking for, that would change the discussion. It would also mean that you could use that other SBC and solve your issue as well as letting others know that the feature is to be found in the wild.
Posts: 6711
Joined: Fri Mar 09, 2012 7:36 pm
Location: Vallejo, CA (US)
by W. H. Heydt » Wed Apr 22, 2015 7:27 pm
hippy wrote:
W. H. Heydt wrote:While I don't have experience with a very wide variety of SoCs, all of the ones that I have done anything with boot from *something* other than a USB (or SATA in one case) device.

The Pi SoC includes code which allows it to boot via USB.

What can currently be done is quite limited and can only be utilised with the A series and CM which do not have the USB-LAN chip fitted.

From what was stated, even with the Model A, the initial boot of the GPU and loading the Linux kernel is done from the SD card. On *any* Pi, one can run completely from a USB device after the kernel is loaded by telling it that the root file system on the chosen device. The OP is trying to eliminate the SD card. The CM does that in a sense, by having on-board flash.
Trying to extend functionality on an A or CM is I believe difficult without access to propriety information and tools. Unless someone is prepared to put in considerable effort to reverse engineer what there is and add to it we are stuck with what we have.

The CM should just require a suitable carrier board.
Posts: 6711
Joined: Fri Mar 09, 2012 7:36 pm
Location: Vallejo, CA (US)
by Joe Schmoe » Wed Apr 22, 2015 7:28 pm
The RPF could, someday (or even tomorrow), manufacture and sell an x86 based PC that would boot directly from USB.

They could even call it "The Raspberry Pi V".

(Where V refers either to 5 [as in Roman numerals] or the 22nd letter of the alphabet [following the current scheme of giving each model an alphabetical name]. Your choice...)
And some folks need to stop being fanboys and see the forest behind the trees.

(One of the best lines I've seen on this board lately)
Posts: 4277
Joined: Sun Jan 15, 2012 1:11 pm
by davidcoton » Wed Apr 22, 2015 7:31 pm
piclassroomproject wrote:no, i resist.


Resistance is futile -- at zero Kelvin :lol:

More seriously, your dislike of the answers doesn't make them wrong. Especially when the reasoning is explained. It is not likely that any future version of an SBC that is compatible with current versions of the Raspberry Pi will have a USB only boot system. There may be an e-Strawberry, Banana Split, or whatever, possibly even from the Raspberry Pi Foundation. It may work that way, or it may not. My crystal ball (4/3 Pi r cubed) just crashed again. But your case is not well made against the reasoning given for the current situation, and the compromise solutions offered. As others have suggested, if you really want to persuade the Mythical Mr Raspberry* to take your idea seriously, then you need a stronger reason than "it would be nice to start the WHOLE booting process from USB.HDD, so µSD-card would not be necessary any longer."

Incidentally, the WHOLE boot code cannot be on USB, because something has to read the USB. I worked with one minicomputer that had two instructions in the boot loader:
1. Read the first sector of the disk into memory, starting at address zero.
2. Jump to 2.
This was placed in memory (by toggle switches) at an address chosen so the last byte read from disk overwrote line 2 with jump to zero, which started the next phase of the boot process. But underneath that must have been built in support for the apparently simple first instruction.

* henceforward to be known as MMR (TM).
"If it ain't broke, fix it until it is."
“Raspberry Pi is a trademark of the Raspberry Pi Foundation”
Posts: 1876
Joined: Mon Sep 01, 2014 2:37 pm
Location: Cambridge, UK