Joe Schmoe
Posts: 4277
Joined: Sun Jan 15, 2012 1:11 pm

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

Wed Apr 22, 2015 7:36 pm

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.
The point of the "Model A can boot from USB" sub-thread is that the Model A does not have any LAN/USB-hub chip connected to its (single) USB port on the SOC. All of the B (including the B2) have such a chip present, which prevents the USB from running in "slave" mode.

The upshot of all this is that it is, in theory, possible to make the USB port on the Model A work as a slave (I hope I got the terminology right...) and thus to boot and load the OS from another (presumably, a Windows or Linux PC) host machine - using no SD card at all.

Heavy emphasis on the "in theory" aspect of this, because as far as I can tell, no one has actually done it. Except maybe Eben. I seem to remember a post from Dom (maybe years ago) saying that although he knew it was theoretically possible, he'd never actually done it.

And if Dom hasn't done it, there's faint hope for the rest of us...

P.S. All of which is, as I mentioned in an earlier post, OT for the OP, since he wanted to boot from a USB hard disk, not from another host PC.
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)

hippy
Posts: 6519
Joined: Fri Sep 09, 2011 10:34 pm
Location: UK

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

Wed Apr 22, 2015 7:45 pm

Joe Schmoe wrote:P.S. All of which is, as I mentioned in an earlier post, OT for the OP, since he wanted to boot from a USB hard disk, not from another host PC.
We cross-posted as I was adding that point to my own post.

With the Pi booting from a host device it would theoretically be possible to have a device which acts as two hosts ( Pi and USB HDD ) and bridge between the two. But if doing that one might as well just use an SD Card.

User avatar
panik
Posts: 369
Joined: Fri Sep 23, 2011 12:29 pm
Location: Netherlands

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

Wed Apr 22, 2015 9:16 pm

Joe Schmoe wrote: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.
This is the right question to ask, but I still haven't seen an answer to it. The problem you (OP) maybe should try to solve is "booting a Pi in 'offline' regions", not "booting a Pi from USB, no matter what".

Treating a small SD card with just a couple of boot files as a permanent part of the hardware (just hot glue it in) is a good solution. Not sure why you're so dismissive about the idea.

Anyway, have you considered using a board that actually *is* able to boot from USB, like a Beaglebone Black? Why use a Pi if it's clearly not a solution to your 'problem'?
Microcontroller addon boards and software for Raspberry Pi A+/B+/Pi2:
- ARMinARM: ARM Cortex-M3 (STM32)
- AVRPi: ATmega32U4 & ATmega328 ("Arduino")
http://www.onandoffables.com

Joe Schmoe
Posts: 4277
Joined: Sun Jan 15, 2012 1:11 pm

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

Wed Apr 22, 2015 9:23 pm

Anyway, have you considered using a board that actually *is* able to boot from USB, like a Beaglebone Black?
I have a BBB, but I didn't know it could boot from USB. Note that it has on-board flash/NAND, and is setup to boot from that. Are you sure that's not what you are thinking of?
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)

User avatar
panik
Posts: 369
Joined: Fri Sep 23, 2011 12:29 pm
Location: Netherlands

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

Wed Apr 22, 2015 9:38 pm

I also have a BBB, and no that's not what I'm thinking of. But the NAND may be enough even to solve OP's problem, without the need to boot from USB. We don't know enough of the requirements.

I remember reading that it's possible, but that may or may not also need an SD card. Not really sure. Didn't do the full research without said requirements. Think "proverbial BBB". Any other board or solution that solves actual problems. You asked a good question, made good points and I got curious about OP's dismissiveness.

It reminded me about the XY problem: http://mywiki.wooledge.org/XyProblem
Microcontroller addon boards and software for Raspberry Pi A+/B+/Pi2:
- ARMinARM: ARM Cortex-M3 (STM32)
- AVRPi: ATmega32U4 & ATmega328 ("Arduino")
http://www.onandoffables.com

User avatar
piclassroomproject
Posts: 13
Joined: Sat Apr 11, 2015 11:43 am
Location: Berlin, Germany

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

Wed Apr 22, 2015 9:56 pm

remember: I just asked a question. nothing else.
:roll:
http://piclassroomproject.blogspot.com

Joe Schmoe
Posts: 4277
Joined: Sun Jan 15, 2012 1:11 pm

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

Wed Apr 22, 2015 9:58 pm

Yes. heh heh. The eternal XY problem!

Most tech support threads are, in fact, just endless variations of the XY problem.

Which is a shame, because when I ask for help, I have to re-assure any potential answerers that I am not interested in any XY type answers.
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)

User avatar
piclassroomproject
Posts: 13
Joined: Sat Apr 11, 2015 11:43 am
Location: Berlin, Germany

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

Wed Apr 22, 2015 10:00 pm

thx for answer nr 3375 :o
http://piclassroomproject.blogspot.com

W. H. Heydt
Posts: 11260
Joined: Fri Mar 09, 2012 7:36 pm
Location: Vallejo, CA (US)

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

Wed Apr 22, 2015 10:06 pm

davidcoton wrote: 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.
The IPL (Initial Program Load) on thE IBM S/360 was almost that simple, and all you had to do was dial in the CUU (Channel and Unit) or the front panel and hit the "IPL" button.
* henceforward to be known as MMR (TM).
At least it has been shown NOT to cause autism.

User avatar
panik
Posts: 369
Joined: Fri Sep 23, 2011 12:29 pm
Location: Netherlands

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

Wed Apr 22, 2015 10:08 pm

But if this is just a theoretical "Hey, let's have fun trying to hack it and make it boot from USB" party, let me not be the party pooper. It would be very useful.

There's that :)
Microcontroller addon boards and software for Raspberry Pi A+/B+/Pi2:
- ARMinARM: ARM Cortex-M3 (STM32)
- AVRPi: ATmega32U4 & ATmega328 ("Arduino")
http://www.onandoffables.com

W. H. Heydt
Posts: 11260
Joined: Fri Mar 09, 2012 7:36 pm
Location: Vallejo, CA (US)

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

Wed Apr 22, 2015 10:08 pm

piclassroomproject wrote:remember: I just asked a question. nothing else.
:roll:
Not quite...you proceeded to object to the (correct) answers that were supplied to your question.

But by now another question has been asked that you need to answer...*Why* do you need to boot a Pi without using an SD card?
Last edited by W. H. Heydt on Thu Apr 23, 2015 4:53 am, edited 1 time in total.

Joe Schmoe
Posts: 4277
Joined: Sun Jan 15, 2012 1:11 pm

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

Wed Apr 22, 2015 10:15 pm

piclassroomproject wrote:thx for answer nr 3375 :o
This one makes 3376!
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)

BMS Doug
Posts: 3824
Joined: Thu Mar 27, 2014 2:42 pm
Location: London, UK

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

Thu Apr 23, 2015 8:33 am

It seems odd to discriminate against people based on the fact that they have made a large quantity of posts instead of on the quality of response they have given but I can offer you a solution to this problem:

Click on the name of the poster who's response has offended you and you will be taken to their profile page. From there you can add them to your foes list and you will never have to see the details of their posts again.

Simple and easy.
Doug.
Building Management Systems Engineer.

User avatar
adun
Posts: 102
Joined: Fri Mar 20, 2015 9:25 am
Location: Switzerland

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

Thu Apr 23, 2015 1:01 pm

mahjongg wrote: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.
Your idea is really nice. Hope that somebody of the stuff team will pick this up.
Additionally the use of the second SD interface (SD1) may drop the need for the SPI multiplexer and then the BIOS EEPROM could be attached to SD1 leaving SD0 free for SD-Cards. However that needs the GPU to be able to read bootcode from SD1.
Last edited by adun on Mon Apr 27, 2015 1:39 am, edited 1 time in total.

User avatar
panik
Posts: 369
Joined: Fri Sep 23, 2011 12:29 pm
Location: Netherlands

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

Thu Apr 23, 2015 1:49 pm

adun wrote:Your idea is really nice. Hope that somebody of the stuff team will pick this up.
Additionaly the use of the second SD interface (SD1) may drop the need for the SPI multiplexer and then the BIOS EEPROM could be attached to SD1 leaving SD0 free for SD-Cards. However that needs the GPU to be able to read bootcode from SD1.
From a topic with the subject 'booting only from USB', nobody will pick it up. Which is a real shame, because it is indeed a very interesting idea. Unfortunately it's off topic and OP will surely dismiss it.

The only thing left to do now is say 'no' to OP and close the topic or let it die. What a missed opportunity. This party could have been so much fun if the host didn't kick his guests in the teeth.
Microcontroller addon boards and software for Raspberry Pi A+/B+/Pi2:
- ARMinARM: ARM Cortex-M3 (STM32)
- AVRPi: ATmega32U4 & ATmega328 ("Arduino")
http://www.onandoffables.com

MarkTF
Posts: 302
Joined: Tue Mar 03, 2015 4:59 pm

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

Thu Apr 23, 2015 2:27 pm

Joe Schmoe wrote:
Anyway, have you considered using a board that actually *is* able to boot from USB, like a Beaglebone Black?
I have a BBB, but I didn't know it could boot from USB. Note that it has on-board flash/NAND, and is setup to boot from that. Are you sure that's not what you are thinking of?
According to various sources (e.g. http://www.twam.info/hardware/beaglebon ... bone-black) the Beaglebone Black follows a boot sequence which ultimately includes the USB port. While I have one, I've never tried booting from other than the on board eMMC. This ultimately is up to the sophistication of the boot loader embedded in the SOC ROM and it's understandably non-trivial / expensive to make it other than what it is currently, particularly without a compelling reason to do so.

While there is value in compiling a feature wish list, it must be done with the understanding that most wishes will not be granted. The success of the RPi is primarily down to the focus on the educational mission and the size of the support community. It would be a mistake to get in a hardware feature race with other similar products.

hippy
Posts: 6519
Joined: Fri Sep 09, 2011 10:34 pm
Location: UK

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

Fri Apr 24, 2015 8:39 am

MarkTF wrote:The success of the RPi is primarily down to the focus on the educational mission and the size of the support community.
I believe the success of the Pi is almost completely down to its price. It would be interesting to know how many sales have been towards educational use, 'teaching kids to code' and classroom use, and how many have been bought by hobbyists and makers as application platforms but I doubt it is possible to determine numbers. The support community does indeed help sales and is probably the primary reason people choose a Pi than an alternative.

The Pi is a somewhat awkward board to use in a project, with its connectors less than conveniently placed for boxing-up, and it was initially a rather slow performer. Price however trumps those limitations.

What most people are asking for of future Pi revisions is more for the same price to better suit their desires for an application platform. Little of what has been asked for, or has been provided with later revisions, has been essential for educational use.

User avatar
Can-Toi
Posts: 68
Joined: Sat Mar 28, 2015 12:41 pm
Contact: Website

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

Fri Apr 24, 2015 9:11 am

davidcoton wrote:
piclassroomproject wrote:no, i resist.
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:
But this is true of any type of storage.
"The mind is the effect, not the cause"
- Daniel Dennett

Bruny
Posts: 159
Joined: Fri Feb 06, 2015 5:22 pm

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

Fri Apr 24, 2015 9:43 am

that brings us to CONFIG_EFI_STUB?

barstool
Posts: 6
Joined: Sun Dec 28, 2014 10:20 pm

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

Wed Dec 02, 2015 4:36 am

I just wanted to bump this thread because, with the recent PiZero development, this is suddenly an intriguing conversation.

Looks as if one or two people knew what was coming down the pipe...

fruitoftheloom
Posts: 21330
Joined: Tue Mar 25, 2014 12:40 pm
Location: Delightful Dorset

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

Wed Dec 02, 2015 11:43 am

barstool wrote:I just wanted to bump this thread because, with the recent PiZero development, this is suddenly an intriguing conversation.

Looks as if one or two people knew what was coming down the pipe...
Yes ! but it has actually been discussed in this thread so no need to bump up an old thread :roll:

viewtopic.php?t=127211&p=852910
Retired disgracefully.....
This at present is my daily "computer" https://www.asus.com/us/Chrome-Devices/Chromebit-CS10/

Return to “General discussion”