Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
gentoo for fast booting embedded linux on pandaboard
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gentoo on Alternative Architectures
View previous topic :: View next topic  
Author Message
meka_usta
n00b
n00b


Joined: 12 Mar 2012
Posts: 6

PostPosted: Tue Jul 08, 2014 9:12 am    Post subject: gentoo for fast booting embedded linux on pandaboard Reply with quote

Hi,

I want a fast booting linux on my pandaboard (<3s). I've installed gentoo and the boot time is 20 s. Before I sart modification in the kernel or bootloader: should I use buildroot or openembedded to setup a fast booting linux? Which solution is better for a fast booting linux? Custom built or gentoo?
thx
Back to top
View user's profile Send private message
schorsch_76
Guru
Guru


Joined: 19 Jun 2012
Posts: 450

PostPosted: Tue Jul 08, 2014 9:21 am    Post subject: Reply with quote

The most time is often used in the initrd. Build a static kernel. Boot it without an initrd and you will save a lot of time. If the most time is used to start the services, you will need the same time in openembedded or buildroot or whatever you might use.
Back to top
View user's profile Send private message
meka_usta
n00b
n00b


Joined: 12 Mar 2012
Posts: 6

PostPosted: Tue Jul 08, 2014 10:16 am    Post subject: Reply with quote

Hi schorch,

I that idea possible: packing a qt applikation into initrd to start the applikation as soon as possible (<3s)?
Back to top
View user's profile Send private message
schorsch_76
Guru
Guru


Joined: 19 Jun 2012
Posts: 450

PostPosted: Tue Jul 08, 2014 10:50 am    Post subject: Reply with quote

Any QT Application would need xorg to run. I would use an static kernel and directly start on the root device without the need to run an initrd. The static kernel and static dev would cut down the time to probe for devices. Use an readonly rootfs to protect the rootfs from damage.

Use the smallest profile you could use and minimal software for your needs. The less software you need to start, the less time you need to start it. You could use slim to start your x terminal or you could use startx and .xinitrc to directly start your application without an window manager. You could use nodm to start xorg.

If the image is ready you could use squashfs for your rootfs. This often improves the speed (if the decompression on the CPU is fast enough).
Back to top
View user's profile Send private message
meka_usta
n00b
n00b


Joined: 12 Mar 2012
Posts: 6

PostPosted: Tue Jul 08, 2014 2:50 pm    Post subject: Reply with quote

Thank you, I will test that.
Back to top
View user's profile Send private message
meka_usta
n00b
n00b


Joined: 12 Mar 2012
Posts: 6

PostPosted: Thu Jul 10, 2014 7:49 am    Post subject: Reply with quote

There's no initrd. The most time (10s) is needed from OpenRC. Is there a solution to save time?
Back to top
View user's profile Send private message
schorsch_76
Guru
Guru


Joined: 19 Jun 2012
Posts: 450

PostPosted: Thu Jul 10, 2014 12:19 pm    Post subject: Reply with quote

I have an embedded system where i did completly disable openrc. I changed to runit. Static-dev, no udev/eudev/systemd and static kernel. The system and services are up in 6.5 sec from cold boot. The system needed about 40 secs with standard openrc.

Precausions: Have a rescue system at hand. Be it a second sd card or whatever you might need. Make a backup before you start. That point is important!

1. compile an static kernel
2. change to static dev
3. emerge runit [1] or s6 [2]
4. Make service directories and run scripts for your services
5. add init=/sbin/runit to your kernel commandline

6. Measure Time :)

For 1. i did the following:
Code:

zcat /proc/config.gz | sed s/=m/=y/g > static-config

Then compile your kernel with this static-config. Maybe disable the module loading completly. I did it.

The most hard point is 2. Neddy here in the forum wrote a wiki page [3]

[1] http://smarden.org/runit/
[2] http://skarnet.org/software/s6/
[3] http://dev.gentoo.org/~neddyseagoon/Old_Fashioned_Gentoo_3.xml
Back to top
View user's profile Send private message
meka_usta
n00b
n00b


Joined: 12 Mar 2012
Posts: 6

PostPosted: Thu Jul 10, 2014 2:36 pm    Post subject: Reply with quote

Thank you, I will work through the steps this weekend.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo on Alternative Architectures All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum