Chapter 4 Boot Time Analysis
4.5 Boot Sequence Analysis
4.5.2 Level II: From the Functional Block’s Point of View
We subdivide the three major phases further by timing result, to enable us to measure more detailed boot time. In order to do subdivision, we need to cross check the boot movie frames, kernel ring buffer and the signal records of oscillator and logical to decide the separate time of the different function block. And subdivide the boot time to 18 functional blocks by the characteristic of different signal of oscillator and logical analyzer, e.g. the flash access status or the console output. The 18 functional blocks is shown at Table 4.2.
Table 4.2 The 18 functional blocks
Start Point End Point
#
Description
Device reset start Device reset over 1
From the first signal MPU_nRESET becoming high to the first signal RST_OUT becoming high. OMAP5912OSK enable the hardware preliminary.
Device reset over MPU read first instruction 2
From the first signal RST_OUT becoming high to the first signal RS232_TX becoming low. OMAP5912OSK start to execute the first instruction.
MPU read first instruction env_relocate_spec start Boot
loader phase
3
From the first signal nFLASH.CSx becoming low to the signal RS232_TX of function env_relocate_spec start (the signal RS232_TX becoming high). U-boot starts and prepares to execute the first function which access flash.
env_relocate_spec start env_relocate_spec over 4
From the signal RS232_TX of function env_relocate_spec start to the signal RS232_TX of function env_relocate_spec over. env_relocate_spec relocates the environment parameters.
env_relocate_spec over Image date checksum start 5
From the signal RS232_TX of function env_relocate_spec over to the signal RS232_TX of image date checksum start. This function block does not access flash.
Image date checksum start Image date checksum over 6
From the signal RS232_TX of image date checksum start to the signal RS232_TX of image date checksum over. U-Boot verifies the image data checksum.
Image date checksum over Copying image to ram start 7
From the signal RS232_TX of image date checksum over to the signal RS232_TX of copying image to ram start. U-Boot finished image data checksum and prepares copy image to DDRRAM.
Copying image to ram start Copying image to ram over 8
From the signal RS232_TX of copying image to ram start to the signal RS232_TX of copying image to ram over. U-Boot copies image from flash to DDRRAM.
Copying image to ram over Transfer control to Linux 9
From the signal RS232_TX of copying image to ram over to the signal RS232_TX of transferring control to Linux. U-Boot transfers control to Linux kernel.
Transfer control to Linux Uncompress kernel start 10
From the signal RS232_TX of transferring control to Linux to the signal RS232_TX of uncompressing kernel start. Linux kernel gets the control and prepares to uncompress kernel.
Uncompress kernel start Uncompress kernel over 11
From the signal RS232_TX of the signal RS232_TX of uncompressing kernel start to the signal RS232_TX of the signal RS232_TX of uncompressing kernel over.
Linux kernel is uncompressed.
Uncompress kernel over jffs2_build_filesystem start 12
From the signal RS232_TX of uncompressing kernel over to the signal RS232_TX of jffs2_build_filesystem start. Linux kernel uncompressed and execute routine start_kernel, Linux kernel does not access flash until the routine mount_root invoking jffs2_build_filesystem.
jffs2_build_filesystem start jffs2_build_filesystem over 13
From the signal RS232_TX of jffs2_build_filesystem start to the signal RS232_TX of jffs2_build_filesystem over. Linux kernel builds the jffs2 file system.
Kernel phase
14 jffs2_build_filesystem over Invoke init
From the signal RS232_TX of jffs2_build_filesystem over to the signal RS232_TX of invoking init. Root file system has been built and Linux kernel invoke the sysvinit tool: /sbin/init.
Invoke init init_main start
15
From the signal RS232_TX of invoking init to the signal RS232_TX of invoking init_main start. Linux kernel still run background routines and init wait for start.
init_main start RC script start
16
From the signal RS232_TX of invoking init_main start to the signal RS232_TX of RC script start. init_main started for user space and prepares to run RC script.
RC script start RC script over
17
From the signal RS232_TX of RC script start to the signal RS232_TX of RC script over. RC script starts several daemons.
RC script over Shell prompt
User space phase
18
From the signal RS232_TX of RC script over to the signal RS232_TX of shell prompt. RC script finished and shell prompt enabled.
After subdivide the boot sequence to 18 function blocks, each function has the similar characteristic. That is to say, the behaviors of all function in a function block are almost similar. It is useful for our redundancy analysis.
We supply a template of the boot time measurement table. See Table 4.3.
Table 4.3 A Template of Boot Time Measurement Table
Level II
Start Point End Point
Level I
Time
Device reset start Device reset over ms
Device reset over MPU read first instruction ms
MPU read first instruction env_relocate_spec start ms
env_relocate_spec start env_relocate_spec over ms
env_relocate_spec over image date checksum start ms
image date checksum start image date checksum over Total
ms
Boot Loader ms
ms
image date checksum over copy image to ram start ms
copy image to ram start copy image to ram over ms
copy image to ram over transfer control to Linux ms
transfer control to Linux uncompress kernel start ms
uncompress kernel start uncompress kernel over ms
uncompress kernel over jffs2_build_filesystem start ms
jffs2_build_filesystem start jffs2_build_filesystem over ms
jffs2_build_filesystem over invoke init Kernel
ms
ms
invoke init init_main start ms
init_main start RC script start ms
RC script start RC script over ms
RC script over Shell prompt User Space
ms
ms