[Top] [All Lists]

Re: how to emdedded ramdisk.gz in vmlinux for linux-2.6.14?

Subject: Re: how to emdedded ramdisk.gz in vmlinux for linux-2.6.14?
From: Stuart Longland <>
Date: Fri, 20 Jan 2006 08:49:41 +1000
In-reply-to: <1137704865.22994.7.camel@localhost.localdomain>
Openpgp: id=63264AB9; url=
Organization: Gentoo Foundation
Original-recipient: rfc822;
References: <> <> <1137515220.11738.2.camel@localhost.localdomain> <> <1137704865.22994.7.camel@localhost.localdomain>
User-agent: Mozilla Thunderbird 1.0.7 (X11/20051029)
Marc Karasek **top-posted**: (Reading emails bottom-to-top is no fun)
> Is the process still the same.  In that you create a ramdisk image that
> can be mounted, just using initramfs instead?   
> 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......

Initramfs works by generating a cpio archive of a directory, and
embedding a compressed version of that.  This is unpacked at boot time,
into something similar to a tmpfs-like filesystem.  It then starts /init
to bring the system online (identical to /linuxrc).

There's a couple of things you can do.  One, is to simply adapt your
scripts to create a cpio archive directly, and then set INITRAMFS_SOURCE
to the full path to your cpio archive.

Alternatively, the kernel can create the cpio archive for you, simply
point INITRAMFS_SOURCE at the root directory.  You can also use this
trick to import a initrd image into initramfs ... simply loop-mount the
initrd somewhere, then point INITRAMFS_SOURCE at the mountpoint.  (Ohh,
and don't forget to `ln -s /linuxrc /init` in your image)

So yeah, there'll be modifications required ... but the changes should
be minimal.  I'm guessing it'll possibly even simplify the tools -- as
you don't have to worry about `dd`ing a ramdisk image from /dev/zero,
running losetup, then formatting, mounting and transferring the filesystem.
Stuart Longland (aka Redhatter)              .'''.
Gentoo Linux/MIPS Cobalt and Docs Developer  '.'` :
. . . . . . . . . . . . . . . . . . . . . .   .'.'             :.'

Attachment: signature.asc
Description: OpenPGP digital signature

<Prev in Thread] Current Thread [Next in Thread>