There are many approaches to speed up boot time for embedded device. One of the interesting tech is based hibernation. Rloader is based on this kind of tech.
5. Why Boot Time?
Define boot time, please
Power saving
User experiences
Android's boot time is especially painful
Devices
Tablet
In-vechile system
TV
Smart Phone
Camera
6. We Are Not Alone
Quick boot
Ubiqutous
Improving meego boot-up time
Hiroshi DOYU, Nokia Sotware Architect
Boosting up embedded Linux device: experience on
Linux-based smarphone
Samsung Electronics Co. Ltd.
Swap-before-hibernate: A fast-on algorithm at OS
level
Shi-wu Lo, OS Lab, CCU
10. User Space
Bootchart
http://www.bootchart.org/
cat /proc/uptime
2012.39 512.64
grabserial
http://elinux.org/Grabserial
11. Hardware Approach
External instrument
Scope
Logic Analyzer
Hardware timer count
Resolution is dependent on your clock source
ETM (Embedded Trace Microcell)
Need assisted software such as TRACE32/OpenOCD
New feature in ARM Cortex seies
16. Userland
Optimize linker and loader time
Specific linker option
Parallelize rc script
Application specific optimization
Hibernation based technologies
18. Swsusp
Natviely support in x86
Based on work by
TI, Teerth Reddy
https://patchwork.kernel.org/patc
h/96442/
Nokia, Hiroshi DOYU
https://lists.linux-
foundation.org/pipermail/linux-
pm/2010-June/027422.html
Start hibernation
echo disk >/sys/power/state
19. Swsusp2/TuxOnICE
Not support in main line
kernel
Provides many features
Compression of images
Readhead
multiple thread I/O
drop pagecache
Hbernation trigger
eho 1
>/sys/power/tuxonice/do_hib
ernation
21. Rloader Is Nothing New
Do we really need follow normal booting process?
The implementation of Rloader could be
Bootloader
snapshot boot
www.elinux.org/images/3/37/Snapshot-boot-final.pdf
Custom kernel
Kernel with software resume support
Different hibernation images make difference user scenario
22. Booting Process
Normal booting
Boottloader
Kernel Init init.rc, platform-specific rc
init
Kernel as Rloader
Bootloader Minimal device Restore
init Init process
Bootloader as Rloader
Bootloader Restore
init process
23. Make ARM Hibernated
Merge patches
swsusp patch from TI/Nokia
TOI patches according to your kernel version
'swap out' page as much as possible
ARM does not support ACPI
Currently, there are patches for ARM
Cortex A8/A9 provided
26. Normal Booting Time Diagram
25 seconds
GPIO signal of
Key-guard event
GPIO signal of
Power On Reset stepping into kernel
27. Hibernation Boot Time Diagram
6 seconds
Power On Reset GPIO signal of GPIO signal of
stepping into kernel Key-gurad event
28. Rloader as Kernel or Bootloader?
It's a trade-off between your boot time and
management cost
Maintainence
Once kernel/TOI changes, you need to re-implement
Complexicity
How to restore pages?
Resume point? PC value?
Improved room might be limited
29. Further Optimization
Re-construct initcall stages
Try different algorithm out on compressing
images
http://code.google.com/p/snappy/
Lazy loading
Put driver state into hibernation image
30. Summary
It's still far away from being a product
File system inconstency
Power failure as hibernation
Hardware solution is the sliver bullet?
The time of stepping into hibernation is also
needed to concern