As you have found, the internal documentation is sometimes out-of-date.
In cases like this, the authoritative reference is the source code
in system/core/init/

A general web search for this topic finds a number
of articles on this subject.  I can't vouch for the accuracy of them all,
but some of them might be helpful to you.

If you would like to help improve the documentation, please see
http://source.android.com/source/life-of-a-patch.html

On Thursday, December 12, 2013 11:41:10 PM UTC-8, [email protected] 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: [email protected]
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 [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to