Android分析之init.rc
//在init.c下
//action_for_each_trigger(“init”,action_add_queue_tail);
//drain_action_queue();
//执行on init下的action;
sysclktz 0
//设置系统时钟基准(0代表时钟滴答以格林威治平均时(GMT)为准)
loglevel 3
//设置loglevel中打印级别。
//依次执行do_loglevel()@builtins.c, log_set_level()@util.c
//只有小于等于 loglevel才输出,参见log_write@util.c
//如果设置为3,也就是ERROR可以输出而INFO没有输出。
//#define ERROR(x…) log_write(3, “<3>init: ” x)
//#define INFO(x…) log_write(6, “<6>init: ” x)
export PATH ……
//设置全局变量
symlink /system/etc /etc
//symlink
mkdir …
// mkdir
//创建一个目录
mount …
//mount
//试图在目录
write /proc/sys/kenel/panic_on_oops 1
//This file (new in Linux 2.5) controls the kernel’s behaviour when an oops or BUG is encountered. If this file contains 0, then the system tries to continue operation. If it contains 1, then the system delays a few seconds (to give klogd time to record the oops output) and then panics. If the /proc/sys/kernel/panic file is also non-zero then the machine will be rebooted.
write /proc/sys/kernel/sched_latency_ns 600000
write /proc/sys/kernel/sched_wakeup_granularity_ns 2000000
write /proc/sys/kernel/sched_compat_yield 1
write /