I am doing project on Pandaboard using Embedded Linux (UBUNTU 12.10 Server Prebuild image) to optimize boot time. I need techniques or tools through which I can find boot time and techniques to optimize the boot time. If anyone can help.
只需从/etc/init.d/rc文件中删除不需要的应用程序,并在每次进程初始化后放入echo,并检查哪个进程需要花费很多时间启动,如果您发现花费更多时间的应用程序,则对该应用程序进行调试,等等。上。
There is program that can be helpful to know the approximate boot-up time. Check this link Time Stamp .
First of all the best you have to do is to compile yourself your own made kernel, get the source on the internet and do a make xconfig
and then unselected everythin you don't need. In a second time create your own root filesystem using Buildroot and make xconfig
to select/unselect everything you need or not.
Hope this help.
I had the same problem and do that way, now it's clearly not the same ;)
EDIT: Everything you need will be here
to analyze the boot process, you can use Bootchart2 , its available on github: https://github.com/mmeeks/bootchart
or Bootchart , from the Ubuntu packages:
sudo apt-get update
sudo apt-get install bootchart pybootchartgui
There are broadly 3 areas where you can reduce boot time
For more techniques and information on tools that help in measuring the boot time please refer to the following link. Refer to Training Material
The basic rule is: the fastest code is code that never gets loaded and run, so remove everything you don't need:
What can be acchieved by combining all these measures can be seen in this video - and yes, the complete code for this optimization is available here .
Optimizing embedded Linux Boot process , needs modifications in three level of embedded Linux design.
Note: you will need the source codes of bootloader and kernel
Kernel : for having a quicker kernel , you should optimize kernel in many sections. for editing you can use on of Linux config menu. I always use a low graphic menu. it need some dependency you can use it by this command:
$ make menuconfig
our goal for Linux kernel is to have smaller kernel image and less module to load in boot. first change the algorithm of compression from gzip to LZO. the point of this action is gzip algorithm will take much time to extract kernel. by using LZO we have a quicker kernel decompression process. the second , disable any unnecessary driver or module that you don't have it on your board or you don't use it any more. by doing this , you will lose some device access and cannot use them in Linux but you will have two positive points: less Ram usage , quicker boot time. but please remind that some driver are necessary for Linux and by disabling them you will lose some of main features (for example if you disable I2C driver in Linux you will no longer have a HDMI interface) that you need or in worst case you will have a boot problem (such as boot-loop). The third is to disable some of unusable filesystem to reduce kernel size and boot time. The Fourth is to remove some of compression algorithm to have smaller kernel image. the last thing , If you are using a u-boot bootloader create a uImage instead of zImage. the following steps , are general and main actions , for having quicker boot as 1 second after power attach you should change more option.
if you do all of following tasks , you can have quick boot time and fast system to work with.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.