Professional Documents
Culture Documents
TechniquesforFastBooting
Chris Hallinan
Field Applications Engineer
Author: Embedded Linux Primer
Agenda
Hardware Discussion
Software Components
Bootloader Issues
Tools
Applications/Userland
Introduction
Splash screen?
1st user process started?
Device fully up and running, connected?
Hardware Design
Bootloader Implementation
Kernel Configuration
Application Profile
TypicalBootSequence
PowerApplied
Optimization Opportunities
Pwr/Clk/Reset
Bootloader
KernelInit
RootFSMount
Kernel
Applications
UserlandApps
Bootloader
2008MontaVistaSoftwareConfidential
BootloaderConsiderations
BootloaderConsiderations
KernelImageOptimization
LinuxKernelConfiguration
2008MontaVistaSoftwareConfidential
KernelConfigOptionstoConsiderDisabling
CONFIG_MD
RAID/LVM support
CONFIG_IKCONFIG
CONFIG_IDE
CONFIG_PCCARD
CONFIG_HOTPLUG
CONFIG_DEBUG_KERNEL
CONFIG_KALLSYMS
CONFIG_BUG
2008MontaVistaSoftwareConfidential
MoreInterestingKernelConfigOptions
CONFIG_DNOTIFY
CONFIG_INOTIFY
CONFIG_XFS
CONFIG_AUTOFS4_FS (Automounter)
etc
2008MontaVistaSoftwareConfidential
10
CalibrationRoutines
Calculating BogoMips...
Allows precise delay() routines
Can take significant time
lpj=xxxxx
11
DriverConfiguration
2008MontaVistaSoftwareConfidential
12
DriverConfiguration
13
FileSystemSelection
2008MontaVistaSoftwareConfidential
14
XIPExecuteinPlace
Advantages
Disadvantages
15
RemoveSupportforprintk()
Advantages
Disadvantage
16
Tools
EntryDurationLocalPidTrace
1621152300paging_init
1621152300|free_area_init_nodes
16211523120||free_area_init_node
16211511115110|||_etext+0x2f0
1621151100__alloc_bootmem_node
16211511115110!__alloc_bootmem_core
11787230723070vfs_caches_init_early
117871531690vfs_caches_init_early
1178768600[alloc_large_system_hash
1178768600[[__alloc_bootmem
1178768600[[[__alloc_bootmem_nopanic
117876866860[[[[__alloc_bootmem_core
133187767760[inode_init_early
1409412086410mem_init
1409456740#free_all_bootmem
140945635630##free_all_bootmem_core
15607385138510schedule
15607384838480schedule
15630157309915730991kernel_init
1566681152811524schedule
1566681139811394schedule
2008MontaVistaSoftwareConfidential
17
Tools
2008MontaVistaSoftwareConfidential
18
Tools
[1.321054]md:linearpersonalityregisteredforlevel1
[1.326629]md:raid0personalityregisteredforlevel0
[1.331964]md:raid1personalityregisteredforlevel1
[1.342289]TCPcubicregistered
[1.345936]NET:Registeredprotocolfamily1
[1.350403]NET:Registeredprotocolfamily17
[1.355816]RPC:Registeredudptransportmodule.
[1.360571]RPC:Registeredtcptransportmodule.
[1.366034]drivers/rtc/hctosys.c:unabletoopenrtcdevice(rtc0)
[2.880506]IPConfig:Complete:
[2.883575]device=eth0,addr=192.168.1.201,mask=255.255.255.0,gw=255...
[2.892227]host=8349itx,domain=,nisdomain=(none),
[2.897798]bootserver=192.168.1.9,rootserver=192.168.1.9,rootpath=
[2.906152]md:AutodetectingRAIDarrays.
2008MontaVistaSoftwareConfidential
19
Tools
initcall_debug
2008MontaVistaSoftwareConfidential
20
Anexampleofboottimereduction
Initial configuration:
Final Configuration
Networking, static IP
Busybox userland
Many kernel optimizations
2.7 Seconds - Kernel start to shell prompt
Minimal engineering investment
2008MontaVistaSoftwareConfidential
21
Applications/Userland
Startup scripts:
Prelink libraries
22
AdditionalIdeasandResources
2008MontaVistaSoftwareConfidential
23
AdditionalIdeasandResources
2008MontaVistaSoftwareConfidential
24
AdditionalIdeasandResources
http://elinux.org/Boot_Time
http://lwn.net/Articles/299483/
2008MontaVistaSoftwareConfidential
25
AMeld
discussion
onLinux
startup...
2008MontaVistaSoftwareConfidential
26
Thankyou!
ChrisHallinan,FieldAppsEngineer
MontaVistaSoftware,Inc.
challinan@mvista.com