On Thu, Feb 01, 2001 at 06:21:46PM -0500, Tyson D Sawyer wrote:
> Has anyone done any work loading an initrd image from linuxbios or
> anything that might be related and useful?
>
> An other approach would be to create a block device driver for my paged
> 8Meg flash chip.
>
> Anyone have any thoughts as to which is a better approach? The
> read-only characterisic of creating a block device driver isn't a
> problem.
I have a PLD paging a 4MB flash device, and I actually have both: I use
initrd to load the root filesystem, and a block driver to reprogram the
system. I prefer initrd for booting because if you don't mind your root
fs being in ram you can compress the whole thing- I get 8MB worth of data
in my root fs, stored in only 4MB.
It's really easy. If you can load your filesystem image (or compressed
filesystem image) into ram, it's trivial to get the kernel to notice it
and use it. You just have to drop a pointer to the start of the image,
and the size, into the kernel parameter table (same table that holds the
kernel command line).
I really didn't have to create a block driver to reprogram the flash, but
at the time when I wrote it I didn't know what was going to work well, so
I was leaving my options open. Doing it over, I'd probably have just
written a simple char driver to allow reprogramming.