public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
* need suggestion about embedded FS plan
@ 2003-01-30  1:54 leeyang
  2003-02-03 19:27 ` Russ Dill
  0 siblings, 1 reply; 5+ messages in thread
From: leeyang @ 2003-01-30  1:54 UTC (permalink / raw)
  To: linux-mtd

Flash:
Am29LV160B(bus wide 16 bit and 2M bytes)
2 banks of above flash and total is 4Mbytes.
Connected to MPC860 with x16 bus,and no
interleave.

I implemented my embedded system with
initrd+ramdisk before,and it did its work.
But that solution lost everything I made after
power down,such as add a user.And some other 
flaws like that I have to reside 4.5M ram 
for the fs(total mem only 16M).
So I want to try Mtd.

In fact,there is only a little fs need to
be 'SAVE',like /etc direcory,it take rooms less
than %1 of all flash size.And the main parts
/lib,/sbin,/bin...maybe never changed.
So I have an idea,
Put main parts of fs(/lib,/sbin....)on Cramfs
at one of the flash bank.
Put bootloader,kernel and need-save-fs(/etc) on
the other flash bank with jffs2 fs.

Is that possible?Sth ,I am not sure,is if no
/etc in root fs,Maybe it can not boot up!!!

And other problem:
In this case,I have 2 banks,Is that means
I have to set up at least 2 partitions,if use
them all with jffs2?
I have limited falsh size for 5 sectors
(64Kbytes each) GC per partitoins.

BTW:the util source files(esp.mkfs.jffs2)
I check out from cvs,seems can not compile,
Is there a stable one?

Great appreciation to any suggestion!

leeyang

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

* Re: need suggestion about embedded FS plan
  2003-01-30  1:54 need suggestion about embedded FS plan leeyang
@ 2003-02-03 19:27 ` Russ Dill
  2003-02-03 19:29   ` Siddharth Choudhuri
  2003-02-03 21:37   ` Henrik Nordstrom
  0 siblings, 2 replies; 5+ messages in thread
From: Russ Dill @ 2003-02-03 19:27 UTC (permalink / raw)
  To: leeyang; +Cc: linux-mtd

> In fact,there is only a little fs need to
> be 'SAVE',like /etc direcory,it take rooms less
> than %1 of all flash size.And the main parts
> /lib,/sbin,/bin...maybe never changed.
> So I have an idea,
> Put main parts of fs(/lib,/sbin....)on Cramfs
> at one of the flash bank.
> Put bootloader,kernel and need-save-fs(/etc) on
> the other flash bank with jffs2 fs.
> 
> Is that possible?Sth ,I am not sure,is if no
> /etc in root fs,Maybe it can not boot up!!!

just make a /linuxrc, linuxrc is a shell script run by the kernel
(init=/linuxrc) that would do stuff like:

#!/bin/sh
mount -t ramfs ramfs /var
mount -t ramfs ramfs /tmp
mkdir /var/run
mkdir /var/lock
mount -t jffs2 /dev/mtd2 /etc
exec /sbin/init



-- 
Russ Dill <Russ.Dill@asu.edu>

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

* Re: need suggestion about embedded FS plan
  2003-02-03 19:27 ` Russ Dill
@ 2003-02-03 19:29   ` Siddharth Choudhuri
  2003-02-03 19:37     ` Russ Dill
  2003-02-03 21:37   ` Henrik Nordstrom
  1 sibling, 1 reply; 5+ messages in thread
From: Siddharth Choudhuri @ 2003-02-03 19:29 UTC (permalink / raw)
  To: Russ Dill; +Cc: leeyang, linux-mtd

> mount -t jffs2 /dev/mtd2 /etc

Shouldn't this be /dev/mtdblock2 since mtd2 is a char device ?

-siddharth

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

* Re: need suggestion about embedded FS plan
  2003-02-03 19:29   ` Siddharth Choudhuri
@ 2003-02-03 19:37     ` Russ Dill
  0 siblings, 0 replies; 5+ messages in thread
From: Russ Dill @ 2003-02-03 19:37 UTC (permalink / raw)
  To: Siddharth Choudhuri; +Cc: leeyang, linux-mtd

On Mon, 2003-02-03 at 12:29, Siddharth Choudhuri wrote:
> > mount -t jffs2 /dev/mtd2 /etc
> 
> Shouldn't this be /dev/mtdblock2 since mtd2 is a char device ?

yes, yes, I wrote this up quick as an example, sorry the details aren't
right

-- 
Russ Dill <Russ.Dill@asu.edu>

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

* Re: need suggestion about embedded FS plan
  2003-02-03 19:27 ` Russ Dill
  2003-02-03 19:29   ` Siddharth Choudhuri
@ 2003-02-03 21:37   ` Henrik Nordstrom
  1 sibling, 0 replies; 5+ messages in thread
From: Henrik Nordstrom @ 2003-02-03 21:37 UTC (permalink / raw)
  To: Russ Dill; +Cc: leeyang, linux-mtd

No need for a linuxrc for such stuff.. simply have it as a sysinit script 
in your inittab.

If the mounting of etc makes that you will have a "better" inittab than in 
the underlying root just do a "telinit q" after mounting the real etc.

Regards
Henrik


On 3 Feb 2003, Russ Dill wrote:

> 
> > In fact,there is only a little fs need to
> > be 'SAVE',like /etc direcory,it take rooms less
> > than %1 of all flash size.And the main parts
> > /lib,/sbin,/bin...maybe never changed.
> > So I have an idea,
> > Put main parts of fs(/lib,/sbin....)on Cramfs
> > at one of the flash bank.
> > Put bootloader,kernel and need-save-fs(/etc) on
> > the other flash bank with jffs2 fs.
> > 
> > Is that possible?Sth ,I am not sure,is if no
> > /etc in root fs,Maybe it can not boot up!!!
> 
> just make a /linuxrc, linuxrc is a shell script run by the kernel
> (init=/linuxrc) that would do stuff like:
> 
> #!/bin/sh
> mount -t ramfs ramfs /var
> mount -t ramfs ramfs /tmp
> mkdir /var/run
> mkdir /var/lock
> mount -t jffs2 /dev/mtd2 /etc
> exec /sbin/init
> 
> 
> 
> 

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

end of thread, other threads:[~2003-02-03 21:37 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-01-30  1:54 need suggestion about embedded FS plan leeyang
2003-02-03 19:27 ` Russ Dill
2003-02-03 19:29   ` Siddharth Choudhuri
2003-02-03 19:37     ` Russ Dill
2003-02-03 21:37   ` Henrik Nordstrom

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