Linux MIPS Architecture development
 help / color / mirror / Atom feed
* Is there any means to use Cramfs and JFFS2 images as root disks?
@ 2004-10-15 17:31 林建安
  2004-10-15 17:31 ` 林建安
  2004-10-15 17:45 ` Pete Popov
  0 siblings, 2 replies; 8+ messages in thread
From: 林建安 @ 2004-10-15 17:31 UTC (permalink / raw)
  To: linux-mips


Hello,
I had successfully booted up Linux with an NFS root.
Trying to boot up Linux with Cramfs and JFFS2 roots, I am wondering how to
pass parameters to Kernel.
I found that on some bootloaders, parameters are like these:
    rootfstype = jffs2 root=/dev/mtdblock3

But YAMON doesn't seem to support MTD BLOCK.
Therefore, how do I tell Kernel where the root image is on YAMON?

Thanks and regards,
Colin

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Is there any means to use Cramfs and JFFS2 images as root disks?
  2004-10-15 17:31 Is there any means to use Cramfs and JFFS2 images as root disks? 林建安
@ 2004-10-15 17:31 ` 林建安
  2004-10-15 17:45 ` Pete Popov
  1 sibling, 0 replies; 8+ messages in thread
From: 林建安 @ 2004-10-15 17:31 UTC (permalink / raw)
  To: linux-mips


Hello,
I had successfully booted up Linux with an NFS root.
Trying to boot up Linux with Cramfs and JFFS2 roots, I am wondering how to
pass parameters to Kernel.
I found that on some bootloaders, parameters are like these:
    rootfstype = jffs2 root=/dev/mtdblock3

But YAMON doesn't seem to support MTD BLOCK.
Therefore, how do I tell Kernel where the root image is on YAMON?

Thanks and regards,
Colin

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Is there any means to use Cramfs and JFFS2 images as root disks?
  2004-10-15 17:31 Is there any means to use Cramfs and JFFS2 images as root disks? 林建安
  2004-10-15 17:31 ` 林建安
@ 2004-10-15 17:45 ` Pete Popov
  2004-10-16  3:04   ` Eugene Surovegin
       [not found]   ` <004201c4b331$f9f6b180$7101a8c0@dinosaur>
  1 sibling, 2 replies; 8+ messages in thread
From: Pete Popov @ 2004-10-15 17:45 UTC (permalink / raw)
  To:  ªL«Ø¦w , linux-mips

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=us-ascii, Size: 853 bytes --]


--- ªL«Ø¦w <Mickey@turtle.ee.ncku.edu.tw> wrote:

> 
> Hello,
> I had successfully booted up Linux with an NFS root.
> Trying to boot up Linux with Cramfs and JFFS2 roots,
> I am wondering how to
> pass parameters to Kernel.
> I found that on some bootloaders, parameters are
> like these:
>     rootfstype = jffs2 root=/dev/mtdblock3
> 
> But YAMON doesn't seem to support MTD BLOCK.
> Therefore, how do I tell Kernel where the root image
> is on YAMON?

Yamon or any other bootloader doesn't have to support
jffs2 or cramfs. All it needs to do is pass the
parameters to the kernel.  Your parameters above are
incorrect. rootfstype=jffs2 will not be recognized.
The /dev/mtdblock3 is fine, assuming that you really
do have a jffs2 fs there. Then, assuming that the
kernel has jffs2 statically compiled in, it will
recognize the FS and mount it.

Pete

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Is there any means to use Cramfs and JFFS2 images as root disks?
  2004-10-15 17:45 ` Pete Popov
@ 2004-10-16  3:04   ` Eugene Surovegin
       [not found]   ` <004201c4b331$f9f6b180$7101a8c0@dinosaur>
  1 sibling, 0 replies; 8+ messages in thread
From: Eugene Surovegin @ 2004-10-16  3:04 UTC (permalink / raw)
  To: Pete Popov; +Cc: =?ISO-8859-1?Q? =AAL=AB=D8=A6w ?=, linux-mips

On Fri, Oct 15, 2004 at 10:45:42AM -0700, Pete Popov wrote:

[snipped]

> parameters to the kernel.  Your parameters above are
> incorrect. rootfstype=jffs2 will not be recognized.

Why? 

rootfstype is perfectly legal parameter. I use it frequently to tell 
the kernel not to try _every_ registered filesystem when mounting 
root.

--
Eugene

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Is there any means to use Cramfs and JFFS2 images as root disks?
       [not found]   ` <004201c4b331$f9f6b180$7101a8c0@dinosaur>
@ 2004-10-16 16:45     ` Pete Popov
  2004-10-16 17:41       ` ???
  0 siblings, 1 reply; 8+ messages in thread
From: Pete Popov @ 2004-10-16 16:45 UTC (permalink / raw)
  To: ???; +Cc: linux-mips

??? 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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Is there any means to use Cramfs and JFFS2 images as root disks?
  2004-10-16 16:45     ` Pete Popov
@ 2004-10-16 17:41       ` ???
  2004-10-16 17:41         ` ???
  2004-10-16 22:04         ` Wolfgang Denk
  0 siblings, 2 replies; 8+ messages in thread
From: ??? @ 2004-10-16 17:41 UTC (permalink / raw)
  To: Pete Popov; +Cc: linux-mips


----- Original Message ----- 
From: "Pete Popov" <ppopov@embeddedalley.com>
To: "???" <Mickey@turtle.ee.ncku.edu.tw>
Cc: <linux-mips@linux-mips.org>
Sent: Sunday, October 17, 2004 12:45 AM
Subject: Re: Is there any means to use Cramfs and JFFS2 images as root
disks?


> ??? 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".

My question still exists: YAMON doesn't know where /dev/mtdblock3 is...
How do I put JFFS2 image by YAMON onto the right location in Flash... :-)

>
> > 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.
>

Great! This is a good idea.
I can already boot up Linux with NFS root.
I'll give it a try to write JFFS2 root image to /dev/mtdblock on Linux
system, not on YAMON.

> > Can also I use Cramfs as root when boot up, like JFFS2?
>
> Yes, you can. The same steps above apply.
>
> Pete

Thanks and regards,
Colin

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Is there any means to use Cramfs and JFFS2 images as root disks?
  2004-10-16 17:41       ` ???
@ 2004-10-16 17:41         ` ???
  2004-10-16 22:04         ` Wolfgang Denk
  1 sibling, 0 replies; 8+ messages in thread
From: ??? @ 2004-10-16 17:41 UTC (permalink / raw)
  To: Pete Popov; +Cc: linux-mips


----- Original Message ----- 
From: "Pete Popov" <ppopov@embeddedalley.com>
To: "???" <Mickey@turtle.ee.ncku.edu.tw>
Cc: <linux-mips@linux-mips.org>
Sent: Sunday, October 17, 2004 12:45 AM
Subject: Re: Is there any means to use Cramfs and JFFS2 images as root
disks?


> ??? 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".

My question still exists: YAMON doesn't know where /dev/mtdblock3 is...
How do I put JFFS2 image by YAMON onto the right location in Flash... :-)

>
> > 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.
>

Great! This is a good idea.
I can already boot up Linux with NFS root.
I'll give it a try to write JFFS2 root image to /dev/mtdblock on Linux
system, not on YAMON.

> > Can also I use Cramfs as root when boot up, like JFFS2?
>
> Yes, you can. The same steps above apply.
>
> Pete

Thanks and regards,
Colin

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Is there any means to use Cramfs and JFFS2 images as root disks?
  2004-10-16 17:41       ` ???
  2004-10-16 17:41         ` ???
@ 2004-10-16 22:04         ` Wolfgang Denk
  1 sibling, 0 replies; 8+ messages in thread
From: Wolfgang Denk @ 2004-10-16 22:04 UTC (permalink / raw)
  To: ???; +Cc: linux-mips

In message <004b01c4b3a7$6193e810$7101a8c0@dinosaur> you wrote:
> 
> My question still exists: YAMON doesn't know where /dev/mtdblock3 is...
> How do I put JFFS2 image by YAMON onto the right location in Flash... :-)

You set up the MTD partitions, so you should know exactly where  this
partition  starts  and ends in your physical address space. Just pass
these addresses to YAMON.

Best regards,

Wolfgang Denk

-- 
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd@denx.de
The nice thing about  standards  is that there are  so many to choose
from.                                           - Andrew S. Tanenbaum

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2004-10-16 22:05 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-10-15 17:31 Is there any means to use Cramfs and JFFS2 images as root disks? 林建安
2004-10-15 17:31 ` 林建安
2004-10-15 17:45 ` Pete Popov
2004-10-16  3:04   ` Eugene Surovegin
     [not found]   ` <004201c4b331$f9f6b180$7101a8c0@dinosaur>
2004-10-16 16:45     ` Pete Popov
2004-10-16 17:41       ` ???
2004-10-16 17:41         ` ???
2004-10-16 22:04         ` Wolfgang Denk

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox