Android分析之init.rc

on init

//在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 <target> <path>  :创建一个指向<path>的软连接<target>

 

mkdir ...

//  mkdir <path> [mode] [owner] [group]
//创建一个目录<path>,可以选择性地指定mode、owner以及group。如果没有指定,默认的权限为755,并属于root用户和root组。

 

mount ...

//mount <type> <device> <dir> [ <mountoption> ]*
//试图在目录<dir>挂载指定的设备。<device> 可以是以 mtd@name 的形式指定一个mtd块设备。<mountoption>包括 //"ro"、"rw"、"remount"、"noatime"、 ...

 

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 /proc/sys/kernel/sched_child_runs_first 0
    write /proc/sys/kernel/sched_min_granularity_ns 400000
    write /proc/sys/kernel/sched_features 24188

//参考http://blog.csdn.net/ustc_dylan/archive/2009/03/27/4028826.aspx

 

 

 

 

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值