文章详情

  • 游戏榜单
  • 软件榜单
关闭导航
热搜榜
热门下载
热门标签
php爱好者> php文档>项目一 iMX21整体方案(4): Suspend

项目一 iMX21整体方案(4): Suspend

时间:2009-05-02  来源:anabelle

<link rel="File-List" href="file:///C:/Users/CHENHU%7E1/AppData/Local/Temp/msoclip1/01/clip_filelist.xml"><style> </style>

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.

<meta http-equiv="Content-Type" content="text/html; charset=utf-8"><meta name="ProgId" content="Word.Document"><meta name="Generator" content="Microsoft Word 9"><meta name="Originator" content="Microsoft Word 9"><link rel="File-List" href="file:///C:/Users/CHENHU%7E1/AppData/Local/Temp/msoclip1/01/clip_filelist.xml"><style> </style>

Two callgraphs ofsuspend task

<meta name="Generator" content="Microsoft Word 9"><meta name="Originator" content="Microsoft Word 9"><link rel="File-List" href="file:///C:/Users/CHENHU%7E1/AppData/Local/Temp/msoclip1/01/clip_filelist.xml"><style> </style> 500)this.width=500;" border="0">
500)this.width=500;" border="0">


Any question about suspend: <link rel="File-List" href="file:///C:/Users/CHENHU%7E1/AppData/Local/Temp/msoclip1/01/clip_filelist.xml"><style> </style>Contact me|
相关阅读 更多 +
排行榜 更多 +
方舟生存进化2.0手机版下载安装

方舟生存进化2.0手机版下载安装

角色扮演 下载
图书馆挠痒大作战游戏下载

图书馆挠痒大作战游戏下载

休闲益智 下载
假面骑士响鬼模拟器豪华版下载

假面骑士响鬼模拟器豪华版下载

角色扮演 下载