linux-mips
[Top] [All Lists]

Re: Is there any means to use Cramfs and JFFS2 images as root disks?

To: ??? <Mickey@turtle.ee.ncku.edu.tw>
Subject: Re: Is there any means to use Cramfs and JFFS2 images as root disks?
From: Pete Popov <ppopov@embeddedalley.com>
Date: Sat, 16 Oct 2004 09:45:17 -0700
Cc: linux-mips@linux-mips.org
In-reply-to: <004201c4b331$f9f6b180$7101a8c0@dinosaur>
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <20041015174542.20487.qmail@web81008.mail.yahoo.com> <004201c4b331$f9f6b180$7101a8c0@dinosaur>
Sender: linux-mips-bounce@linux-mips.org
User-agent: Mozilla Thunderbird 0.7.3 (X11/20040803)
??? wrote:
Hi Pete,
How do I compile JFFS2 image and Kernel image together and by that way
Kernel can know where /dev/mtdblock3 is?

I'm not sure a brief answer will help you, but here it is.

You don't compile "jffs2 image and kernel image" together. You select jffs2 support in the kernel when you run something like "make menuconfig". You rebuild the kernel and now your kernel will have jffs2 support. You also need your kernel to have mtd support, since that's how you'll access /dev/mtdblockxxxx. You then build a jffs2 image, put it in flash in whatever partition you want or have space for, and then boot the kernel with "root=/dev/mtdblockxxx".

And if I want to just write JFFS2 image to Flash, how do I do on YAMON?

Yes, you can, but I don't remember the commands off the top of my head. On the Au1x boards, you can use yamon to erase the flash and load srec files directly to flash. You may also be able to load a binary file and store it in flash which would make it easier. Finally, you can build a kernel with NFS root file system, or a ramdisk, etc, -- something other than jffs2. Then, you can use the linux kernel to erase the mtd partition where you want a jffs2 image, and then copy the image to that partition.

Can also I use Cramfs as root when boot up, like JFFS2?

Yes, you can. The same steps above apply.

Pete

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