init.rc中是import init.${hardware}.rc, 中定义
on fs
mount_all /fstab.chipset
mount pstore pstore /sys/fs/pstore
setprop ro.crypto.fuse_sdcard true
symlink /system/res /res
symlink /system/bin /bin
mount_all对应于:
KEYWORD(mount_all, COMMAND, 1, do_mount_all)
else if (ret == FS_MGR_MNTALL_DEV_NOT_ENCRYPTED || !enusure_data_mounted()) {
/* @} */
property_set("ro.crypto.state", "unencrypted");
/* If fs_mgr determined this is an unencrypted device, then trigger
* that action.
*/
action_for_each_trigger("nonencrypted", action_add_queue_tail);
}
mount_all里面会触发nonencrypted的action
on nonencrypted
class_start main
class_start late_start
只是加入action_queue的队列中:
之后在init的for(;;)中执行class_start main?