CN102096591A - Method for quickening start of embedded Linux system - Google Patents

Method for quickening start of embedded Linux system Download PDF

Info

Publication number
CN102096591A
CN102096591A CN2011100496183A CN201110049618A CN102096591A CN 102096591 A CN102096591 A CN 102096591A CN 2011100496183 A CN2011100496183 A CN 2011100496183A CN 201110049618 A CN201110049618 A CN 201110049618A CN 102096591 A CN102096591 A CN 102096591A
Authority
CN
China
Prior art keywords
linux system
kernel
linux
embedded
embedded linux
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN2011100496183A
Other languages
Chinese (zh)
Inventor
庄敬晖
殷伟
冯枝伟
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
YUNFU NANFENG DIGITAL TECHNOLOGY CO LTD
Original Assignee
YUNFU NANFENG DIGITAL TECHNOLOGY CO LTD
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by YUNFU NANFENG DIGITAL TECHNOLOGY CO LTD filed Critical YUNFU NANFENG DIGITAL TECHNOLOGY CO LTD
Priority to CN2011100496183A priority Critical patent/CN102096591A/en
Publication of CN102096591A publication Critical patent/CN102096591A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Stored Programmes (AREA)

Abstract

The embodiment of the invention discloses a method for quickening the start of an embedded Linux system, which comprises the following steps of: logging in the embedded Linux system; optimizing a kernel processing speed on the basis of the embedded Linux system; tracking and analyzing a start process of the embedded Linux system to obtain a detailed report about time consumption for Linux start; and optimizing a process in the Linux system according to the detailed report about time consumption. By carrying out the method, the start speed of the embedded Linux system can be quickened. The invention provides a general method which is a method capable of providing start optimization for different embedded Linux systems.

Description

A kind of method of accelerating the embedded Linux system startup
Technical field
The present invention relates to field of computer technology, be specifically related to a kind of method that embedded Linux system starts of accelerating.
Background technology
Linux system has obtained using widely with its characteristic of increasing income, and also occupies increasing deal in the embedded system programming.
Linux system is safe and reliable, kernel is customizable, these its advantages all such as open source, but linux system also has weak point, and is bad such as real-time, such as start-up time long etc.
Built-in Linux requires the Linux of customization quick, light and handy, and increasing service application causes embedded Linux system to start and operation becomes more and more slower, a lot of Linux manufacturers have all issued and have accelerated the optimization version that Linux starts, but at the also prematurity of startup optimization of embedded Linux system.
Embedded Linux system applied environment complexity, the service that the embedded Linux system of each version is installed are used mostly different, need to seek the method that a kind of general optimization starts.
Summary of the invention
The invention provides the method that a kind of general quickening embedded Linux system starts, the ability of quick startup can be provided for embedded system.
In order to realize goal of the invention, the embodiment of the invention discloses a kind of method that embedded Linux system starts of accelerating, it is characterized in that, comprising:
The login embedded Linux system;
Optimize kernel processes speed based on embedded Linux system;
Start-up course in the linux system is followed the tracks of and analyzed, obtain the detailed report that Linux consumes start-up time;
The detailed report that consumes start-up time according to Linux is optimized the process in the linux system.
Describedly optimize kernel processes speed based on embedded Linux system and comprise:
Optimize the speed that FLASH reads kernel,, revise its parameter configuration, make its read or write speed reach the fastest as much as possible according to the user manual of the Flash that oneself uses;
The cutting kernel reduces the kernel volume;
Some module direct compilations in the kernel are become the mode of module;
Mask the output of printk function;
Accelerate to load root file system and primary application program in internal memory, the form of root file system adopts the cramfs form and replaces static library to dwindle the volume of primary application program with dynamic base;
Accelerate to start the operation of script, the task in this startup script is deleted to greatest extent, all irrelevant tasks are all removed.
Described start-up course in the linux system followed the tracks of and analyzed, obtain the detailed report that Linux consumes start-up time and comprise:
Unlatching Linux Kernel PrintkTime function provides the PrintkTime function in linux system be all kernel informations increase timestamps of start-up course;
To the tracking and the analysis of Linux start-up course, generate detailed report start-up time.
The described process that the detailed report that consumes start-up time according to Linux is optimized in the linux system comprises:
The RTC clock synchronization of being carried out in the start-up course by shielding or this process is put into startup after carry out; Perhaps
By in start-up parameter, forcing to specify the LPJ value to skip the actual calculation process.
The present invention has the following advantages: technique scheme as can be seen, the present invention has following beneficial effect: the present invention can accelerate the toggle speed of embedded Linux system.The present invention is to provide a kind of method in common, can provide for different embedded Linux systems to start the method for optimizing.
Description of drawings
In order to be illustrated more clearly in the embodiment of the invention or technical scheme of the prior art, to do to introduce simply to the accompanying drawing of required use in embodiment or the description of the Prior Art below, apparently, accompanying drawing in describing below only is some embodiments of the present invention, for those of ordinary skills, under the prerequisite of not paying creative work, can also obtain other accompanying drawing according to these accompanying drawings.
Fig. 1 is the linux system structural representation in the embodiment of the invention;
Fig. 2 is the method flow diagram that the quickening embedded Linux system in the embodiment of the invention starts;
Fig. 3 is the general optimization method process flow diagram that starts of the embedded Linux system in the embodiment of the invention;
Fig. 4 is that the embedded Linux system singularity in the embodiment of the invention starts the optimization method process flow diagram.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the invention, the technical scheme in the embodiment of the invention is clearly and completely described, obviously, described embodiment only is the present invention's part embodiment, rather than whole embodiment.Based on the embodiment among the present invention, those of ordinary skills belong to the scope of protection of the invention not making all other embodiment that obtained under the creative work prerequisite.
The method that the embodiment of the invention provides a kind of general quickening embedded Linux system to start can provide the ability of quick startup for embedded Linux system, and it mainly comprises: the login embedded Linux system; Optimize kernel processes speed based on embedded Linux system; Start-up course in the linux system is followed the tracks of and analyzed, obtain the detailed report that Linux consumes start-up time; The detailed report that consumes start-up time according to Linux is elaborated respectively below optimizing process in the linux system.
As shown in Figure 1, it is the linux system structural representation in the embodiment of the invention, and the present invention mainly comprises with lower unit: general Optimization Platform unit, the embedded Linux system singularity startup Optimization Platform unit of starting of embedded Linux system.
The general Optimization Platform that starts of described embedded Linux system provides general startup prioritization scheme for embedded Linux system.
Described embedded Linux system singularity startup Optimization Platform provides prioritization scheme targetedly for the difference service of embedded Linux system.
Fig. 2 is the method flow diagram that the quickening embedded Linux system in the embodiment of the invention starts, and comprises step:
Step 1: obtain embedded Linux system.
Step 2: set up the general Optimization Platform that starts of embedded Linux system.
Step 3: set up singularity according to the not same sex of embedded Linux system and start Optimization Platform.
Fig. 3 is the general optimization method process flow diagram that starts of embedded Linux system, comprises as follows:
Although embedded Linux system has nothing in common with each other, it still is the same starting flow process, and the general Optimization Platform that starts of embedded Linux system provides identical startup optimization for different embedded Linux systems.It is as follows that embedded Linux system starts flow process: read kernel to internal memory, at the internal memory decompress(ion) and move kernel, load root file system and application program is mirrored to internal memory, the operation root file system starts script operation master routine, starts and finish from Flash.The startup of accelerating built-in Linux will be optimized setting up procedure exactly.
Step 21: optimize the speed that FLASH reads kernel,, revise its parameter configuration, make its read or write speed reach the fastest as much as possible according to the user manual of the Flash that oneself uses.
Step 22: the cutting kernel reduces the kernel volume.When the compiling kernel, remove unwanted hardware driving, file system, Debugging message, make kernel reach minimum as much as possible.Such as the support of checking hardware such as keyboard, mouse in can removing, remove the support of file system such as RomFs, RamDisk.File system in the kernel has accounted for sizable part, and therefore should remove those does not need file system as far as possible.
Step 23: some module direct compilations in the kernel are become the mode of module, rather than be compiled in, after kernel starts, load those modules again, so also can reduce the kernel volume with kernel.Drive such as network interface card, USB drives, and these are not that kernel starts necessary module, therefore needn't compile with kernel, but be compiled into independent module, reloads these modules and get final product after kernel starts.
Step 24: be to accelerate the speed of operation kernel in internal memory, mask the output of printk function, removed all debugging output information when the operation kernel, so also can shorten decompress(ion) and move time of kernel.
Step 25: for accelerating loading root file system and primary application program in internal memory, the form of root file system adopts the cramfs form and replaces static library to dwindle the volume of primary application program with dynamic base.
Step 26: accelerate to start the operation of script, can delete this starting in the script of task to greatest extent, all irrelevant tasks are all removed; Also the task of some energy parallel startings is all made executed in parallel in addition, so just accelerated the speed of each task in the loading system.
Fig. 4 is that the embedded Linux system singularity in the embodiment of the invention starts the optimization method process flow diagram, comprises as follows:
Because the service that embedded Linux system starts is also incomplete same, need analyze the service that starts, for optimisation strategy has been formulated in each service.
Step 31: opening Linux Kernel PrintkTime function, the PrintkTime function is provided in Linux Kernel 2.6.11 version and more senior version is that all kernel informations of start-up course increase timestamps, if rudimentary Linux Kernel version can take the mode of patch to add the PrintkTime function.Open the PrintkTime function only need get final product in the kernel start-up parameter in increase " time ".
Step 32:, generate detailed report start-up time to the tracking and the analysis of Linux start-up course.After the configuration of completing steps 21, restart Linux, then by to issue orders the kernel log-on message being outputed to file: dmesg-s 131072>ktime, utilizing a script " show_delta " (being positioned under the scripts file of Linux source code) then is the time increment display format with the file conversion of above-mentioned output :/usr/src/linux-x.xx.xx/scripts/show_delta ktime>dtime.So just obtained a detailed report that consumes start-up time about Linux.
Step 33:, find out relative time-consuming procedure in the startup by report start-up time that step 32 generates.The report that generates is roughly as follows:
Kernel starts T.T.: 6.188s
Crucial part consuming time:
1) 0.652s-Timer, IRQ, Cache, the initialization of cores such as Mem Pages
2) 0.611s-kernel and RTC clock synchronization
3) 0.328s-calculates Calibrating Delay (wastage in bulk or weights of 4 core cpus)
4) 0.144s-calibration APIC clock
5) 0.312s-calibration Migration Cost
6) 3.520s-Intel E1000 network interface card initialization
The at present temporary transient reliable and feasible without comparison prioritization scheme of the initialization of kernel key component (Timer, IRQ, Cache, Mem Pages......) can not considered earlier.
Second can be adopted the RTCNoSync scheme, the RTC clock synchronization of being carried out in the start-up course by shielding or this process is put into startup after carry out.
The 3rd can be adopted the PresetLPJ scheme, skips the actual calculation process by force to specify the LPJ value in start-up parameter, and this is based on the consideration that the LPJ value can not change under the constant situation of hardware condition.So just can in start-up parameter, specify the LPJ value after behind normal the startup, noting " Calibrating Delay " numerical value in the kernel information: lpj=9600700 with following formal compulsion.
Other item can be optimized according to different prioritization schemes, does not go through here.
More than a kind ofly to the embodiment of the invention provided accelerate the method that embedded Linux system starts and be described in detail, used specific case herein principle of the present invention and embodiment are set forth, the explanation of above embodiment just is used for helping to understand method of the present invention and core concept thereof; Simultaneously, for one of ordinary skill in the art, according to thought of the present invention, the part that all can change in specific embodiments and applications, in sum, this description should not be construed as limitation of the present invention.

Claims (4)

1. accelerate the method that embedded Linux system starts for one kind, it is characterized in that, comprising:
The login embedded Linux system;
Optimize kernel processes speed based on embedded Linux system;
Start-up course in the linux system is followed the tracks of and analyzed, obtain the detailed report that Linux consumes start-up time;
The detailed report that consumes start-up time according to Linux is optimized the process in the linux system.
2. the method that quickening embedded Linux system as claimed in claim 1 starts is characterized in that, describedly optimizes kernel processes speed based on embedded Linux system and comprises:
Optimize the speed that FLASH reads kernel,, revise its parameter configuration, make its read or write speed reach the fastest as much as possible according to the user manual of the Flash that oneself uses;
The cutting kernel reduces the kernel volume;
Some module direct compilations in the kernel are become the mode of module;
Mask the output of printk function;
Accelerate to load root file system and primary application program in internal memory, the form of root file system adopts the cramfs form and replaces static library to dwindle the volume of primary application program with dynamic base;
Accelerate to start the operation of script, the task in this startup script is deleted to greatest extent, all irrelevant tasks are all removed.
3. the method that quickening embedded Linux system as claimed in claim 1 starts is characterized in that, described start-up course in the linux system is followed the tracks of and analyzed, and obtains the detailed report that Linux consumes start-up time and comprises:
Unlatching Linux Kernel PrintkTime function provides the PrintkTime function in linux system be all kernel informations increase timestamps of start-up course;
To the tracking and the analysis of Linux start-up course, generate detailed report start-up time.
4. the method that quickening embedded Linux system as claimed in claim 1 starts is characterized in that, described process in the detailed report optimization linux system that consumes start-up time according to Linux is comprised:
The RTC clock synchronization of being carried out in the start-up course by shielding or this process is put into startup after carry out; Perhaps
By in start-up parameter, forcing to specify the LPJ value to skip the actual calculation process.
CN2011100496183A 2011-03-01 2011-03-01 Method for quickening start of embedded Linux system Pending CN102096591A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2011100496183A CN102096591A (en) 2011-03-01 2011-03-01 Method for quickening start of embedded Linux system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2011100496183A CN102096591A (en) 2011-03-01 2011-03-01 Method for quickening start of embedded Linux system

Publications (1)

Publication Number Publication Date
CN102096591A true CN102096591A (en) 2011-06-15

Family

ID=44129699

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2011100496183A Pending CN102096591A (en) 2011-03-01 2011-03-01 Method for quickening start of embedded Linux system

Country Status (1)

Country Link
CN (1) CN102096591A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103150248A (en) * 2013-03-22 2013-06-12 腾讯科技(深圳)有限公司 Method and device for measuring and calculating startup time consumption
CN103617060A (en) * 2013-12-05 2014-03-05 积成电子股份有限公司 Method for accelerating starting procedure of embedded software by using super state storage
CN103677920A (en) * 2013-12-11 2014-03-26 清华大学 Critical application program identifying and starting accelerating method and system
CN104090783A (en) * 2014-05-22 2014-10-08 西安电子科技大学 Method for increasing starting speed of Linux server through start accelerator
CN104363292A (en) * 2014-11-20 2015-02-18 普华基础软件股份有限公司 Real-time comprehensive monitoring system and method

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1818868A (en) * 2006-03-10 2006-08-16 浙江大学 Multi-task parallel starting optimization of built-in operation system

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1818868A (en) * 2006-03-10 2006-08-16 浙江大学 Multi-task parallel starting optimization of built-in operation system

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
左大全等: "嵌入式Linux 快速启动与XIP 应用", 《计算机工程与科学》 *
赛迪网: "Linux系统管理启动时间的极限优化方案", 《HTTP://SOFT.ZDNET.COM.CN/SOFTWARE_ZONE/2007/1030/590181.SHTML》 *
陈军等: "加快嵌入式Linux 系统启动速度的方法及应用", 《后勤工程学院学报》 *

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103150248A (en) * 2013-03-22 2013-06-12 腾讯科技(深圳)有限公司 Method and device for measuring and calculating startup time consumption
CN103150248B (en) * 2013-03-22 2015-03-18 腾讯科技(深圳)有限公司 Method and device for measuring and calculating startup time consumption
CN103617060A (en) * 2013-12-05 2014-03-05 积成电子股份有限公司 Method for accelerating starting procedure of embedded software by using super state storage
CN103617060B (en) * 2013-12-05 2017-01-18 积成电子股份有限公司 Method for accelerating starting procedure of embedded software by using super state storage
CN103677920A (en) * 2013-12-11 2014-03-26 清华大学 Critical application program identifying and starting accelerating method and system
CN103677920B (en) * 2013-12-11 2017-01-25 清华大学 Critical application program identifying and starting accelerating method and system
CN104090783A (en) * 2014-05-22 2014-10-08 西安电子科技大学 Method for increasing starting speed of Linux server through start accelerator
CN104090783B (en) * 2014-05-22 2017-05-03 西安电子科技大学 Method for increasing starting speed of Linux server through start accelerator
CN104363292A (en) * 2014-11-20 2015-02-18 普华基础软件股份有限公司 Real-time comprehensive monitoring system and method

Similar Documents

Publication Publication Date Title
EP3204849B1 (en) Systems and methods to update source code files
CN104598254A (en) Method and device for rapidly powering on Android system
US20170154134A1 (en) Simulation of virtual processors
CN102096591A (en) Method for quickening start of embedded Linux system
CN101976187A (en) Stack tracing method and device in decompilation process and decompiler
US11403202B2 (en) Power monitoring system for virtual platform simulation
US10592703B1 (en) Method and system for processing verification tests for testing a design under test
CN112068852B (en) Method, system, equipment and medium for installing open-source software based on domestic server
WO2015003452A1 (en) Methods and systems for file processing
CN108572892B (en) PowerPC multi-core processor-based offline test method and device
CN104008046A (en) Method and device for testing programs
KR20190054938A (en) Simulation device, simulation system, simulation method, and simulation program
CN106843822B (en) Execution code generation method and equipment
CN113032257A (en) Automatic test method, device, computer system and readable storage medium
CN102520984A (en) Computing method for worst time of object software in specified hardware environment
Kaur et al. Implementation of Linux Optimization Technique for ARM Based System on Chip
CN113657068A (en) SOC simulation verification and SOC simulation verification equipment verification environment construction method
CN103809915A (en) Read-write method and device of magnetic disk files
CN114327498A (en) Automated deployment method, system, electronic device and computer readable medium
CN112506519A (en) Compiling method of application program, mobile terminal and server
CN115204081A (en) Chip simulation method, chip simulation platform, chip simulation system, and computer-readable storage medium
CN113835680A (en) Application program generation method and device, electronic equipment and computer storage medium
Lee et al. Fast Verilog Simulation using Tel-based Verification Code Generation for Dynamically Reloading from Pre-Simulation Snapshot
US11719749B1 (en) Method and system for saving and restoring of initialization actions on dut and corresponding test environment
Sotiriou-Xanthopoulos et al. A process-based reconfigurable systemc module for simulation speedup

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C02 Deemed withdrawal of patent application after publication (patent law 2001)
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20110615