--
unsubscribe: android-kerne...@googlegroups.com
website: http://groups.google.com/group/android-kernel
Normally, the Linux kernel automatically starts a program called 'init', int
the /sbin directory. So most legacy Linux systems have the starting
program placed there: /sbin/init. However, the kernel accepts a command
line variable 'init=<value>' which can be used to specify the starting
program.
In the case of Android, this is set to '/init' (so the full command line
argument is 'init=/init'. This is set by the bootloader. Depending on which
bootloader you are using, you can set this either via the bootloader command
line, or have it read from nvram.
'init' and other kernel command line arguments are documented in the
file: Documentation/kernel_parameters.txt, in the kernel source directory.
The 'main()' function is called by the C initialization code, after the
kernel
starts execution at an address specified in the ELF header for the program.
This is part of the C standard, I believe, but in any case is rather outside
the scope of Android.
-- Tim
--
unsubscribe: android-kernel+unsubscribe@googlegroups.com
website: http://groups.google.com/group/android-kernel
Thank you Tim.
On Mon, Oct 31, 2011 at 11:35 PM, Tim Bird <tim....@am.sony.com> wrote:
'init' and other kernel command line arguments are documented in the
file: Documentation/kernel_parameters.txt, in the kernel source directory.
I know right