Ramdisks cannot be mounted in place because the ramdisk implementation keeps
its contents in the file buffer cache. The initrd initializes a ramdisk by
copying (and possibly uncompressing) a filesystem image from a memory region
into the ramdisks buffers.
However, to me it seems pointless to copy an initrd (compressed or not) from
flash to DRAM so that we can then import it into the file buffer cache when
the ramdisk is initialized. The kernel complains or fails in several places
if you attempt to do this -- it has hardwared assumptions that the initrd is
in DRAM. I think I ran into three places I had to patch to make this work.
I never submitted these patches because I didn't think they were clean
enough.
The current code tests that the initrd is in DRAM. I could remove this
check, and then it would work for initrd in Flash, but it would fail if you
accidentally passed in a bogus address. Maybe that's OK, but it's less
checking than in the current kernel. It might be better to add a data
structure describing the physical flash/rom regions corresponding to the one
describing physical DRAM regions. (Down the slippery slope to a structure
passed from the firmware describing what hardware is on the system. Wait,
that might be a good idea.)
-Jamey
> -----Original Message-----
> From: Nicolas Pitre [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, May 23, 2000 10:06 AM
> To: Hugo Fiennes
> Cc: [EMAIL PROTECTED]
> Subject: Re: rom or flashrom root filesystem
>
>
>
>
> On Tue, 23 May 2000, Hugo Fiennes wrote:
>
> > The empeg uses a 320k rom/flash disk (read only) for a
> halfway house boot
> > used when we upgrade the hard disk partitions/contents.
> >
> > We do this just by setting the initrd start & end to point to the
> > appropriate place in flash (in our case I think it's
> 0xd00b0000 - 0xd0000000
> > is the base of flash in our memory map.
> >
> > One thing you *do* have to patch is the code in
> arch/arm/setup.c which
> > checks to see if the initrd exists within physical RAM -
> obviously, it won't
> > in this case. Also, you can't use a compressed image as it's mounted
> > in-place without any RAM usage.
>
> Are you sure of that? AFAIK initrd's are never mounted in place,
> compressed or not. You need a special block device driver to mount
> uncompressed filesystems directly from flash.
>
>
> Nicolas
>
>
> unsubscribe: body of `unsubscribe linux-arm' to
> [EMAIL PROTECTED]
> ++ Please use [EMAIL PROTECTED]
> for ++
> ++ kernel-related discussions.
> ++
>
unsubscribe: body of `unsubscribe linux-arm' to [EMAIL PROTECTED]
++ Please use [EMAIL PROTECTED] for ++
++ kernel-related discussions. ++