View previous topic :: View next topic |
Author |
Message |
meka_usta n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 12 Mar 2012 Posts: 6
|
Posted: Tue Jul 08, 2014 9:12 am Post subject: gentoo for fast booting embedded linux on pandaboard |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
schorsch_76 Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
![](images/avatars/12660649465602e3543dfd9.png)
Joined: 19 Jun 2012 Posts: 452
|
Posted: Tue Jul 08, 2014 9:21 am Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
meka_usta n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 12 Mar 2012 Posts: 6
|
Posted: Tue Jul 08, 2014 10:16 am Post subject: |
|
|
Hi schorch,
I that idea possible: packing a qt applikation into initrd to start the applikation as soon as possible (<3s)? |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
schorsch_76 Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
![](images/avatars/12660649465602e3543dfd9.png)
Joined: 19 Jun 2012 Posts: 452
|
Posted: Tue Jul 08, 2014 10:50 am Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
meka_usta n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 12 Mar 2012 Posts: 6
|
Posted: Tue Jul 08, 2014 2:50 pm Post subject: |
|
|
Thank you, I will test that. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
meka_usta n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 12 Mar 2012 Posts: 6
|
Posted: Thu Jul 10, 2014 7:49 am Post subject: |
|
|
There's no initrd. The most time (10s) is needed from OpenRC. Is there a solution to save time? |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
schorsch_76 Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
![](images/avatars/12660649465602e3543dfd9.png)
Joined: 19 Jun 2012 Posts: 452
|
Posted: Thu Jul 10, 2014 12:19 pm Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
meka_usta n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 12 Mar 2012 Posts: 6
|
Posted: Thu Jul 10, 2014 2:36 pm Post subject: |
|
|
Thank you, I will work through the steps this weekend. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
|