HI, As per my understanding this is not the case with android only, this is related to normal linux kernel.
Initramfs archive itself is a complete self-contained root filesystem for Linux. In case of initramfs, the initramfs archive is linked in to the linux image only. When you go for initramfs to boot kernel, ramdisk.img is part of kernel image rather than separate one. Please check linux documents regarding initramfs. Thanks Rizavan On Wed, Feb 11, 2009 at 10:20 AM, Peter Oh <[email protected]> wrote: > > Thank you a lot for your reply. > > Now I'm almost clear except this one. > If I assume that I have initramfs file as the name of 'ramdisk.img' > > How can android kernel find the location of 'ramdisk.img' exists? > If there is 'root=' option, kernel can try to find the location of > 'ramdisk.img' from the location of 'root='. > But if kernel option does not have 'root=' option, > How kernel knows the location of ramdisk.img? > > Does android kernel also usr 'root=' option to find out the location of > 'ramdisk.img'? > Can I see what the typical 'Kernel command line' option for android is? > > Really my best regards. > Peter Oh > > -----Original Message----- > From: [email protected] [mailto: > [email protected]] On Behalf Of Brian Swetland > Sent: Wednesday, February 11, 2009 12:28 AM > To: [email protected] > Subject: [android-porting] Re: How to use initramfs for root filesystem? > > > > When booting with initramfs, the kernel creates a tmpfs at /, unpacking > the initramfs (typically a gzip'd cpio archive) into it. Then it runs > /init (I believe there is actually a short list of programs it tries to > run on / in a specific order, but I'd have to look at the kernel sources > to verify this). > > It's expected that the init process started from initramfs will know how > to get everything else going. In the android world, this involves > /init.rc scripting what to mount where, etc. > > Brian > > [ebmajor <[email protected]>] > > > > Dear all, > > > > I'm trying to understand how initramfs, especially 'init' program is > > used as a root filesystem. > > Usually I've used 'root=/dev/mtdblock0 rootfstype=jffs2' in kernel > > command line for root filesystem and my 'init' program > > is laid in mtdblock0 so kernel can find where the 'init' program > > exists. > > > > But I read initramfs does not required 'root=' command line. > > So, if I don't type 'root=' in kernel command line, how the kernel > > finds out where the 'init' program exists? > > and what kind of filesystem is using for the block that 'init' program > > exists? > > > > Simply asking, > > Can I use kernel command line without 'root=' option? If I can, how > > can I use? > > > > Sincerely. > > > > > > > > > > > > > -- Thanks Rizavan --~--~---------~--~----~------------~-------~--~----~ unsubscribe: [email protected] website: http://groups.google.com/group/android-porting -~----------~----~----~----~------~----~------~--~---
