bastibasti
Posts: 4
Joined: Fri Feb 26, 2016 2:08 pm

Achievable kernel boot time with pi zero?

Fri Feb 26, 2016 2:13 pm

Hi

Iam thinking to use a pi as a really quick booting device - which has one task. boot - shoot a picture, shutdown.
For x86 - i could append an initramfs to the kernel, lets say a busybox and a small bash script that enables all hardware and does the job - but i am not experienced with the pi.

Do you think a pi could boot (powerup to kernel finish) faster than 2 seconds?

User avatar
RaTTuS
Posts: 10532
Joined: Tue Nov 29, 2011 11:12 am
Location: North West UK
Contact: Twitter YouTube

Re: Achievable kernel boot time with pi zero?

Fri Feb 26, 2016 2:28 pm

using a RPI camera , and bare metal yes - but that will not work on a PI0
How To ask Questions :- http://www.catb.org/esr/faqs/smart-questions.html
WARNING - some parts of this post may be erroneous YMMV

1QC43qbL5FySu2Pi51vGqKqxy3UiJgukSX
Covfefe

User avatar
DougieLawson
Posts: 37133
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website Twitter

Re: Achievable kernel boot time with pi zero?

Sat Feb 27, 2016 12:06 am

bastibasti wrote: Do you think a pi could boot (powerup to kernel finish) faster than 2 seconds?
The time taken from sudo shutdown -r now to the kernel booted and /sbin/init running is about twelve seconds. The time taken to get the services running is somewhat longer than that.
Note: Having anything humorous in your signature is completely banned on this forum. Wear a tin-foil hat and you'll get a ban.

Any DMs sent on Twitter will be answered next month.

This is a doctor free zone.

jahboater
Posts: 5071
Joined: Wed Feb 04, 2015 6:38 pm
Location: West Dorset

Re: Achievable kernel boot time with pi zero?

Sat Feb 27, 2016 4:34 pm

My Pi Zero (stock speed):-
[email protected]:~ $ systemd-analyze
Startup finished in 2.377s (kernel) + 17.066s (userspace) = 19.443s
Not far off two seconds.
"We are in the beginning of a mass extinction, and all you can talk
about is money and fairy tales of eternal economic growth."
- Greta Thunberg

User avatar
GTR2Fan
Posts: 1601
Joined: Sun Feb 23, 2014 9:20 pm
Location: South East UK

Re: Achievable kernel boot time with pi zero?

Sat Feb 27, 2016 4:39 pm

For further reference, my Pi2B overclocked as far as it can go with complete stability running a fairly clean Raspbian Jessie...

Code: Select all

systemd-analyze
Startup finished in 2.057s (kernel) + 6.855s (userspace) = 8.913s
Pi2B Mini-PC/Media Centre: ARM=1GHz (+3), Core=500MHz, v3d=500MHz, h264=333MHz, RAM=DDR2-1200 (+6/+4/+4+schmoo). Sandisk Ultra HC-I 32GB microSD card on '50=100' OCed slot (42MB/s read) running Raspbian/KODI16, Seagate 3.5" 1.5TB HDD mass storage.

User avatar
mahjongg
Forum Moderator
Forum Moderator
Posts: 12597
Joined: Sun Mar 11, 2012 12:19 am
Location: South Holland, The Netherlands

Re: Achievable kernel boot time with pi zero?

Sat Feb 27, 2016 4:43 pm

a pi zero does not have a PI-cam interface, and using a USB cam is slow!

User avatar
liudr
Posts: 685
Joined: Sat Jun 01, 2013 12:11 am
Location: Central MN, USA
Contact: Website

Re: Achievable kernel boot time with pi zero?

Sat Feb 27, 2016 9:46 pm

Is there any particular camera you want to use? Most cameras (power on to shooting) and smart phones (starting camera app to shooting) will have a hard time with 2 seconds?
Arduino data loggers, user interface, printed circuit board designer since 2009, RPI 3B 2B 2B Zero Jessie, assembly/C/C++/java/python programmer since the 80's

bastibasti
Posts: 4
Joined: Fri Feb 26, 2016 2:08 pm

Re: Achievable kernel boot time with pi zero?

Mon Feb 29, 2016 9:23 pm

I was thinking about a simple webcam, like a logitech hd webcam, since they work pretty well on linux.

I will download the kernel sources and see what can be trimmed.

The idea is to have a small device you have in your poket and when you push the button, it shoots a row of pictures. It needs to be able to do it quick. and the device wants to be off when not in use to safe battery life.
could use mplayer and output to jpeg - it would be a no brainer as the camera uses mjpeg ;-)

HankB
Posts: 127
Joined: Fri Jan 01, 2016 2:45 pm

Re: Achievable kernel boot time with pi zero?

Tue Mar 01, 2016 12:38 pm

bastibasti wrote:For x86 - i could append an initramfs to the kernel, lets say a busybox and a small bash script that enables all hardware and does the job - but i am not experienced with the pi.
Have you tried this strategy on the Pi? Is there any reason it would not work?

The other option (and perhaps that's what you mean by 'download the kernel sources') is to build a custom kernel and strip it of anything you do not need. You also might benefit from a monolithic kernel (instead of loading modules) or at least eliminate unneeded modules by not building them or blacklisting them.

Of course all of these suggestions are just guesses on my part based on no experience embedding Linux. If you google 'embedded linux' you will probably find suggestions from those who actually know what they're talking about. ;)

texy
Forum Moderator
Forum Moderator
Posts: 5161
Joined: Sat Mar 03, 2012 10:59 am
Location: Berkshire, England

Re: Achievable kernel boot time with pi zero?

Tue Mar 01, 2016 1:08 pm

mahjongg wrote:a pi zero does not have a PI-cam interface, and using a USB cam is slow!
However using a GPIO pin to trigger the shutter of a DSLR is very, very quick, if using a DSLR, or a digital camera that has external shutter port.
Texy
Various male/female 40- and 26-way GPIO header for sale here ( IDEAL FOR YOUR PiZero ):
https://www.raspberrypi.org/forums/viewtopic.php?f=93&t=147682#p971555

Return to “General discussion”