m<br><br>On Sunday, March 13, 2016, Woody Wu <<a href="mailto:narkewoody@gmail.com">narkewoody@gmail.com</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br><br>On Sunday, March 13, 2016, Greg KH <<a href="javascript:_e(%7B%7D,'cvml','greg@kroah.com');" target="_blank">greg@kroah.com</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Sat, Mar 12, 2016 at 04:29:08PM +0800, Woody Wu wrote:<br>
> My question is, is there such a kernel parameter to do the job? Probably there<br>
> is a non-parameter solution like passing the initramfs address in a register<br>
> when a boot loader transfer control to the kernel, but this is not an option to<br>
> me since my boot loader (u-boot) does not support doing this. Thanks.<br>
<br>
You have the source to your bootloader, I suggest you fix that up to<br>
support this if you want it, not much the kernel can do on it's own<br>
here, sorry.<br><br>
</blockquote><div><br></div><div>But the kernel document says,</div><div><br></div><div>External initramfs images:</div><div>--------------------------</div><div><br></div><div>If the kernel has initrd support enabled, an external cpio.gz archive can also</div><div>be passed into a 2.6 kernel in place of an initrd. In this case, the kernel</div><div>will autodetect the type (initramfs, not initrd) and extract the external cpio</div><div>archive into rootfs before trying to run /init.</div><div><br></div><div>This has the memory efficiency advantages of initramfs (no ramdisk block</div><div>device) but the separate packaging of initrd (which is nice if you have</div><div>non-GPL code you'd like to run from initramfs, without conflating it with</div><div>the GPL licensed Linux kernel binary).</div><div><br></div><div>It can also be used to supplement the kernel's built-in initramfs image. The</div><div>files in the external archive will overwrite any conflicting files in</div><div>the built-in initramfs archive. Some distributors also prefer to customize</div><div>a single kernel image with task-specific initramfs images, without recompiling.</div><div><br></div><div>So I am thinking, can I from my bootloader load a cpio.gz into ram and start kernel with a command line "initrd=0x30000000"? Wii this work? And, in this case should I also pass kernel with someilike "roo=/dev/ram"? Thanks.</div><div><br></div><div>-woody </div><br><br></blockquote><div>I found the initrd=address works! No root= need to be passed. Only let u-boot load a cpio.uboot image into physical memory and set the correct kernel command line, my problem solved. :-) </div><div> </div><br><br>-- <br>Life is the only flaw in an otherwise perfect nonexistence<br> -- Schopenhauer<br><br>woody<br>public key at <a href="http://subkeys.pgp.net:11371">http://subkeys.pgp.net:11371</a> (<a href="mailto:narkewoody@gmail.com">narkewoody@gmail.com</a>)<br><br><br>