All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kumba <kumba@gentoo.org>
To: linux-mips <linux-mips@linux-mips.org>
Cc: zhuzhenhua <zzh.hust@gmail.com>
Subject: Re: how to emdedded ramdisk.gz in vmlinux for linux-2.6.14?
Date: Thu, 19 Jan 2006 23:11:49 -0500	[thread overview]
Message-ID: <43D06305.8070908@gentoo.org> (raw)
In-Reply-To: <1137704865.22994.7.camel@localhost.localdomain>

Marc Karasek wrote:
> Is the process still the same.  In that you create a ramdisk image that
> can be mounted, just using initramfs instead?   

It's actually simpler than that, insofar as creating the archive.  There are two 
ways that I've tried, probably another exists as well.  None involve the mess of 
creating a mountable image.

1) In the scripts/ dir in the kernel tree, there's a script, 
gen_initramfs_list.sh.  chmod +x it, and pass to it (as its only argument) an 
absolute path pointing to a ready-to-go root file system that will be loaded by 
the machine that boots the subsequently produced kernel.  The output of 
gen_initramfs_list should be directed to a text file -- it's a text listing of 
every file in the directory passed, including mode params, symlink destination, 
whether it's a device or not (and if is, how to re-create it), etc..  This text 
file can then be passed to the initramfs option in menuconfig, and the kernel 
pulls in the files and rolls them into its initramfs cpio archive it builds.

2) cpio up a ready-to-go root file system and pass that to the same initramfs 
option in menuconfig.


Provided the root filesystem is setup properly, just don't pass root= on the 
command line, and the kernel takes over loading and running the main startup 
script (it's either /init or /linuxrc that it looks for, one of the two).


> We will be moving to 2.6.x for our next chip and currently have scripts
> to create a ramdisk with busybox embedded.  If these cannot be used
> anymore, I may want to take over the patches for ramdisk from you and
> maintain them.  Otherwise our sdk would have to change and the tools,
> etc. and that is not a desireable option......

This isn't that big of a change actually.  As described above, it's decidedly 
simpler, as you don't have to rely on any file system (it's basically the same 
as the old MS-DOS ramdisks some utilities diskettes would load up and dump tools 
into)


> IMO: Fixing something that was not broken is not a very good idea. :-)

I thought the same initially, but in truth, initramfs is far simpler, once you 
figure it out.  I even fixed the embedded ramdisk to handle linking in objects 
files with conflicting ABIs (encountered when we built netboot images for SGI O2 
because at the time, we built O2's kernels with -mabi=o64 which uses some mean 
tricks to stuff 64bit code into a 32bit file; ld hated that).  Of course, I did 
this fix about an hour after Ralf removed the ramdisk code from 2.6.10 CVS. 
Talk about a sense of timing.

Especially once we found out initramfs loaded flawlessly on Origin, it was 
essentially deemed to become the replacement.



--Kumba

-- 
Gentoo/MIPS Team Lead
Gentoo Foundation Board of Trustees

"Such is oft the course of deeds that move the wheels of the world: small hands 
do them because they must, while the eyes of the great are elsewhere."  --Elrond

  parent reply	other threads:[~2006-01-20  4:08 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-01-16 14:48 how to emdedded ramdisk.gz in vmlinux for linux-2.6.14? Marc Karasek
2006-01-17  0:26 ` Kumba
2006-01-17 16:27   ` Marc Karasek
2006-01-18  1:10     ` Kumba
2006-01-19 21:07       ` Marc Karasek
2006-01-19 22:49         ` Stuart Longland
2006-01-20  4:11         ` Kumba [this message]
2006-01-20 18:43           ` Marc Karasek
2006-01-20 19:02           ` Marc Karasek
2006-01-20 19:02             ` Marc Karasek
2006-01-20 19:08             ` Stephen P. Becker
     [not found] ` <200601202129.11398.p_christ@hol.gr>
     [not found]   ` <1137786593.22994.46.camel@localhost.localdomain>
     [not found]     ` <200601202203.14325.p_christ@hol.gr>
2006-01-20 20:47       ` Marc Karasek
2006-01-20 21:02         ` P. Christeas
2006-01-20 21:03         ` Wolfgang Denk
  -- strict thread matches above, loose matches on Subject: below --
2006-01-20 21:27 Marc Karasek
2006-01-20 21:27 ` Marc Karasek
2006-01-15  4:22 zhuzhenhua

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=43D06305.8070908@gentoo.org \
    --to=kumba@gentoo.org \
    --cc=linux-mips@linux-mips.org \
    --cc=zzh.hust@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.