Hi
Thanks for response
loglevl and ERROR() helps a lot to debug the init process.
In the import_kernel_nv(char *name, int in_qemu) function
else if (!strcmp(name,"root")) {
<http://android.git.kernel.org/?p=platform/system/core.git;a=blob;f=init/init.c;h=75ffb5c7a0c1fb4147699f45dbca05421eedd365;hb=327b2b709f1c9ed119b2d87cd95d4a5367fe0338#l416>
if (!strcmp(value,"/dev/sda1")) {
USB
}
else
{
MMC
}
<http://android.git.kernel.org/?p=platform/system/core.git;a=blob;f=init/init.c;h=75ffb5c7a0c1fb4147699f45dbca05421eedd365;hb=327b2b709f1c9ed119b2d87cd95d4a5367fe0338#l416>
}
I am able to capture the boot device information(sda/mmc) from above
condtion apply. But how to pass device info into init.rc script?. In this
place property_set() is not working. The property_init() is called after
this function.
with regards,
saminath
On Mon, May 23, 2011 at 9:42 AM, tforce <[email protected]> wrote:
> I think you want to look into your BoardConfig.mk file. Usually this
> file is located in /vendor/<product_name>/<board_name>/ folder.
>
> You can add some parameters as following:
>
> Ifeq($(x),1)
> BOARD_BOOTMEDIA:=harddisk # This refers booting from
> hard drive
> Else
> Ifeq($(x),2)
> BOARD_BOOTMEDIA:=sdcard1 #This referst booting from SD Card
> Endif
>
> After you modify Boardconfig.mk file as mentioned above, rebuild your
> android boot files using parameter "x" as following:
>
> $ make x=1 xyz_platform -j 16 // this will show you
> "bootmedia=harddisk" in new boot/cmdline file and will boot from
> harddrive
>
> $ make x=2 xyz_platform -j 16 // this will show you
> "bootmedia=sdcard1" in new boot/cmdline file and will boot from SD
> Card
>
> I have tried this and it is working without issue. Let me know if you
> see any problem.
>
> I hope the above will help.
>
> Regards
>
> -Tapan
>
> On May 23, 12:09 pm, Tim Bird <[email protected]> wrote:
> > On 05/22/2011 10:46 PM, Deva R wrote:
> >
> > > [+list - many eyes are better to get quick help]
> >
> > > you can increase loglevel in init.rc to get all traces of init.,
> >
> > > You can use ERROR("..",fmt) macro or log_write() calls to get traces
> > > out. check in init.c, utils.c for exisiting traces reference..
> >
> > Just another point, for those unfamiliar with the init logging...
> >
> > The log messages from init go into the kernel log buffer, NOT
> > the regular Android logging system. (These both go through the
> > Linux kernel, but are currently separate.)
> >
> > So to access 'init' messages after booting, use the Linux command
> 'dmesg',
> > not 'logcat'.
> > -- Tim
> >
> > =============================
> > Tim Bird
> > Architecture Group Chair, CE Workgroup of the Linux Foundation
> > Senior Staff Engineer, Sony Network Entertainment
> > =============================
>
> --
> unsubscribe: [email protected]
> website: http://groups.google.com/group/android-porting
>
--
unsubscribe: [email protected]
website: http://groups.google.com/group/android-porting