fuffkin
Posts: 92
Joined: Thu Mar 07, 2013 10:50 pm
Location: United Kingdom
Contact: Website

What's the fastest you can boot a Raspberry Pi?

Tue Sep 24, 2013 8:15 am

This is giving a voice to an open question from a number of other threads that wandered off topic.

There is a class of application such as trailcams, security cams where a really, really fast boot is essential. A typical Raspbian from a typical SD Card will take 20-odd seconds.

How fast? - Ideally in the single seconds. But how low can it go?

Here is a video of about a 3 second boot, which is mighty impressive but others have had difficulty reproducing it.
http://www.youtube.com/watch?v=4Fjfqz6FxC8


Factors I know that affect boot speed are:

- SD Card speed (this is a bit of a black art)
- Combination of boot from USB drive and SD Card
- Optimise Drivers loaded etc

How low can we go???

PiGraham
Posts: 3665
Joined: Fri Jun 07, 2013 12:37 pm
Location: Waterlooville

Re: What's the fastest you can boot a Raspberry Pi?

Tue Sep 24, 2013 8:38 am

It depends what you need to boot to do what you need.

At the extreme end of things...

The RasPi 'Chess in assembler' project boots to a chess game in under a second, but it only does what it needs to display graphics, implement chess logic and read GPIO.

People have Midi working on baremetal
http://hackaday.com/2013/01/22/raspberr ... ng-system/

I'm not sure if it's practical to use the PiCam at that level.

Applications you mention may need a file system and networking which are challenging in assembler.

It may take a few seconds to stabilise auto exposure on the camera. So that may limit the start-up time. It should be possible to use a simple fast sensor to meter the exposure (DSLRs do that, for very fast wake and shoot operation <1s)

fuffkin
Posts: 92
Joined: Thu Mar 07, 2013 10:50 pm
Location: United Kingdom
Contact: Website

Re: What's the fastest you can boot a Raspberry Pi?

Tue Sep 24, 2013 9:18 am

PiGraham Good points there.

I think this thread can perform a couple of functions:

- Curate what people have already achieved
- Techniques and what practically you can get
- Pointers as to where the start / look

For example, if I know that I can achieve sub-1s, BUT the only way I can get there is in assembler AND you can still use a camera, then I can then judge whether to take the plunge.

Technically, as you suggest most applications will probably need some form of file system and a lot of applications would require the camera.

shuckle
Posts: 565
Joined: Sun Aug 26, 2012 11:49 am
Location: Finland

Re: What's the fastest you can boot a Raspberry Pi?

Tue Sep 24, 2013 9:56 am

My record with Rasbian without X is about 18 secs.
I am very interested to hear how you can get faster than that.

User avatar
AndrewS
Posts: 3625
Joined: Sun Apr 22, 2012 4:50 pm
Location: Cambridge, UK
Contact: Website

Re: What's the fastest you can boot a Raspberry Pi?

Tue Sep 24, 2013 10:04 am

NOOBS is a really good example of "how fast" you can boot the Pi - the "Recovery Menu" is actually a QT application running on top of a buildroot Linux OS, launched from an initrd 8-) (no assembler involved)

mikerr
Posts: 2781
Joined: Thu Jan 12, 2012 12:46 pm
Location: UK
Contact: Website

Re: What's the fastest you can boot a Raspberry Pi?

Tue Sep 24, 2013 10:05 am

fuffkin wrote:Here is a video of about a 3 second boot, which is mighty impressive but others have had difficulty reproducing it.
http://www.youtube.com/watch?v=4Fjfqz6FxC8
I reproduced it easily - he does provide images:
https://github.com/gamaral/rpi-buildroot/downloads

E.g. download marshmallow-sdcard.img.xz (game)
or sdcard.img.xz (linux prompt)

.xz is just a .zip file - so uncompress with 7zip or something
then use win32 disk imager as normal to put on a SD card.

Note if using sdcard.img then the login is "root"" not pi !

Return to “General discussion”