- 论坛徽章:
- 0
|
Normal
0
Suspend2 on
Imx21
Suspend2 is
an add-on feature I implemented on iMX21 platform. This work is based on
suspend2 on i386 on (please refer to suspend2.com). I port onto iMX21 platform
and add all the suspend/resume feature in all the devices driver.
Except for
the basic function of suspend/resuming, the suspend makes use of a dynamic
tool-bar to show the procedure of suspend/resuming. The GUI picture will be
appended later…
The process
of "booting->suspend->resuming->suspend " works like:
start
booting-> applications run, and user application runs (booting) ->
user application exits, save data into swap partition (suspend) -> copy data
back, user application runs (resuming)->user application exits, save data
into swap partition (suspend)
FAQ of
suspend.
-Where is suspend image saved.
Suspend image is saved on swap partition. In this implement
of iMX21 platform, there is one swap partition on mmc/sd card created. Its
device name is /dev/mmc/part2.
-what happens during the sleeping process (e.g. what things
are saved and to which file/s)
When we exit user application, we will check whether it
meets the condition of boot and reboot. If it does, system goto shutdown or
reboot; otherwise, system will go to suspend.
In the suspending process, we enter kernel mode and save the
data in the memory space into /dev/mmc/part2. (please refer to
/home/s2script/hibernate)
- what's the flow of execution during resumption mode (e.g., what are the
scripts called)
When we
resume from suspend, we wil check whether suspend image is stored in partition2
(/dev/mmc/part2). If there is an image matched with our kernel, the system will
recove from the image, and the data in swap partition will be copied back into
memory space. (Kernel mode)
After that,
the system will go to user space. we return to the
"/home/s2script/hibernate". please find "echo 1 >
/proc/software_suspend/do_suspend". Then /home/s2script/hibernate calls up
our user application routing restart section
- what files are needed to support this feature
The important files that is used by suspend mode:
kernel with
suspend supported;
user
application routing to call /home/s2script/hibernate;
swap
partitions on SD card
- any other information you can give us.
If there is any features you would like to test whether it
can work after resuming, you need test whether this feature can work after our
system works a long time.
Because our
resuming process actually works like our machine does not shut down.
For
a feature that is called up at the beginning"start" and
"restart" section, the first one is the feature is called up with
minor applications; while the second case is the feature is called up after
main applications in system.
Normal
0
Two callgraphs ofsuspend task
Normal
0
![]()
![]()
Any question about suspend:
Normal
0
Contact me
|
本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u/7273/showart_1916169.html |
|