Android的引导 - 在这里是init%的硬件在%.RC INIT.C阅读?服务正在启动? [英] android boot - where is the init.%hardware%.rc read in init.c ? where are services started?
问题描述
通过code在 <$ C展望$ C> INIT.C 并试图弄清楚两件事情:
Going through the code in init.c
and trying to figure out 2 things:
-
在哪里硬件初始化特定%硬件.RC%读?
Where is the hardware specific init.%hardware%.rc read ?
在哪里服务启动 - 这意味着合子,
/系统/斌/的ServiceManager等
Where are the services started - meaning zygote, /system/bin/servicemanager etc
一个init%硬件的.rc%的一个例子是AP preciated。
An example of an init.%hardware%.rc would be appreciated.
推荐答案
确定了它 - 这两个问题在init.rc回答
Ok got it - both questions are answered in init.rc.
-
具体硬件
的init%硬件.RC%
在的 http://androidxref.com/4.3_r2.1/xref/system/core/rootdir/init.rc#8 ,其中我们看行
import /init.${ro.hardware}.rc
现在, ro.hardware
从命令行读出(的主,的 process_kernel_cmdline 终于 export_kernel_boot_props )。哪里是命令行,嗯......
Now, ro.hardware
is read from the command line (main, process_kernel_cmdline and finally export_kernel_boot_props). Where is the command line, well...
Services started: in main the boot action is triggered, which contains the lines
class_start core
class_start main
这是启动所有的核心和主要的服务。得到的信息<一个href=\"http://stackoverflow.com/questions/20041794/where-are-the-android-system-services-started/20060853#20060853\">Where在Android系统服务启动?
that start all the core and main services. Got the info from Where are the Android system services started?
注:我指的是奇巧 - 因人而异
NB: I refer to KitKat - YMMV
这篇关于Android的引导 - 在这里是init%的硬件在%.RC INIT.C阅读?服务正在启动?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!