I've found the O'Reilly Embedded Android book to be really useful.  It has 
a good section on init and might clear up a lot of your questions.  Just 
keep in mind it is a little out of date and sometimes too high level, but 
it makes a good first step for a lot of Android platform questions.

On Friday, December 13, 2013 12:41:10 AM UTC-7, jui...@gmail.com wrote:
>
> Hi,
> Because I was digging sources and Internet for long time with this topic 
> and didn't find some full documentation for this I dare to ask someone here.
> I'm having some troubles with porting Android to some new device so that's 
> why I choose this group.
>
> During the study of init.rc doc (
> https://android.googlesource.com/platform/system/core/+/master/init/readme.txt)
>  
> I had feeling that no one care about proper documentation.
> Let see some example:
> In readme.txt is written:
> "Actions and Services implicitly declare a new section. All commands
>
> or options belong to the section most recently declared.  Commands
> or options before the first section are ignored."
>
>
> Then I look into example file (from: 
> https://android.googlesource.com/platform/system/core/+/master/rootdir/init.rc)
>  and see, that firs command is the "include" but it is command (placed in 
> section commands in readme.txt) so it should be ignored. Why is not ignored? 
> Why is not proper described? What happen if I include file which is on 
> partition which isn't mounted at beginning?
>
>
> Then I started looking closer and deeper and here is another example of lack 
> of lack of consistency: Triggers.
>
> readme.txt:
>
> "Actions take the form of:
>
> on <trigger>
>     <command>
>
>      ...
>
>
> Triggers
>
>    ...
>
> boot
>
>    ...
>
> <name>=<value>
>
>    ...
>
> device-added-<path>
> device-removed-<path>
>
>    ...
>
> service-exited-<name>
>
>    ..."
>
>
> So what is that in example init.rc like:
>
> on early-init
>
> on init
>
> on fs
>
> on post-fs
>
>
> There is no documentation for this (even "do not touch this sections"), no 
> definition in keywords.h or init_parser.c after digging more finally I have 
> it! In file init.c function main there is section of parsing those "Triggers" 
> but when this is triggered? Which goes first? How init recognizing that now 
> is "init" part of process, or "fs".
>
>
> Then looking closer I see some another crucial label for init process called: 
> "charger". Where it is came from? Why some boot has "charger" option. When?
>
> Why this is not documented if this is important part of init process?
>
>
> So is there any real, I mean REAL documentation for whole Android init 
> process?
> Because this what is provided by AOSP is really poorly written. To not say 
> "slovenly".
>
> I will be really thankful for giving me some ideas and "breadcrumbs" for 
> understanding whole booting process in init part as well as what I should 
> care most with porting Android to new device.
>
> Thanks
> Kamil
>

-- 
-- 
unsubscribe: android-porting+unsubscr...@googlegroups.com
website: http://groups.google.com/group/android-porting

--- 
You received this message because you are subscribed to the Google Groups 
"android-porting" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-porting+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to