linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* loading the kernel and root FS separately from flash?
@ 2004-06-27 22:46 Robert P. J. Day
  2004-06-28  3:58 ` Eugene Surovegin
  2004-06-28  7:09 ` Wolfgang Denk
  0 siblings, 2 replies; 18+ messages in thread
From: Robert P. J. Day @ 2004-06-27 22:46 UTC (permalink / raw)
  To: Embedded Linux PPC list


   what is (hopefully) a simple question, before i invest the time to
see whether it works.

   currently, i have a modified rpxlite board, with two flash chips,
each 8M -- one "system" flash, one "user" flash.  the system flash has
the boot loader (embedded planet's planet core), and the loadable
kernel+rootfs image.  this bootable image is only 2.5M in size, so
there's lots of leftover space in that system flash chip.

   with this configuration, it's obviously not possible to update files
or directories in the bootable image individually -- it's just one big
zImage.inited image.

   but is it feasible to redefine the layout of that flash chip and
take, say, 4M of it and create a JFFS2 filesystem, then put the root
filesystem in there uncompressed?  (assuming, of course, that the
rootfs fits in 4M.)  theoretically, then, i could have system flash
with the bootloader (only a couple hundred K), the bootable kernel (at
most 2M in our case), then 4M of JFFS2.  that would give me the
freedom to update the basic root filesystem if i had to.  we could
boot the kernel as we're doing now, and i'm assuming it wouldn't be
difficult to have the kernel know to copy the JFFS2-based root
filesystem into RAM, mount it, and take it from there.

   the current flash layouts are defined in the file
drivers/mtd/maps/rpxlite.c, and we've set it up so that the other 8M
"user" flash is associated with /dev/mtdblock/0.  my thought was to
just define half of system flash as JFFS2, at which point it would be
accessible as /dev/mtdblock/1 (depending on the definition order, of
course).

   is this possible?  anyone done it this way, and can tell me what
pitfalls i have to watch for?  thanks.

rday

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

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

* Re: loading the kernel and root FS separately from flash?
  2004-06-27 22:46 Robert P. J. Day
@ 2004-06-28  3:58 ` Eugene Surovegin
  2004-06-28 10:00   ` Robert P. J. Day
  2004-06-28  7:09 ` Wolfgang Denk
  1 sibling, 1 reply; 18+ messages in thread
From: Eugene Surovegin @ 2004-06-28  3:58 UTC (permalink / raw)
  To: Robert P. J. Day; +Cc: Embedded Linux PPC list


On Sun, Jun 27, 2004 at 06:46:20PM -0400, Robert P. J. Day wrote:
>
>   what is (hopefully) a simple question, before i invest the time to
> see whether it works.
>
>   currently, i have a modified rpxlite board, with two flash chips,
> each 8M -- one "system" flash, one "user" flash.  the system flash has
> the boot loader (embedded planet's planet core), and the loadable
> kernel+rootfs image.  this bootable image is only 2.5M in size, so
> there's lots of leftover space in that system flash chip.
>
>   with this configuration, it's obviously not possible to update files
> or directories in the bootable image individually -- it's just one big
> zImage.inited image.
>
>   but is it feasible to redefine the layout of that flash chip and
> take, say, 4M of it and create a JFFS2 filesystem, then put the root
> filesystem in there uncompressed?  (assuming, of course, that the
> rootfs fits in 4M.)  theoretically, then, i could have system flash
> with the bootloader (only a couple hundred K), the bootable kernel (at
> most 2M in our case), then 4M of JFFS2.  that would give me the
> freedom to update the basic root filesystem if i had to.  we could
> boot the kernel as we're doing now, and i'm assuming it wouldn't be
> difficult to have the kernel know to copy the JFFS2-based root
> filesystem into RAM, mount it, and take it from there.
>
>   the current flash layouts are defined in the file
> drivers/mtd/maps/rpxlite.c, and we've set it up so that the other 8M
> "user" flash is associated with /dev/mtdblock/0.  my thought was to
> just define half of system flash as JFFS2, at which point it would be
> accessible as /dev/mtdblock/1 (depending on the definition order, of
> course).
>
>   is this possible?  anyone done it this way, and can tell me what
> pitfalls i have to watch for?  thanks.

Yes, this is possible and actually quite trivial.

Partition your flash the way you want, e.g. reserve part of the flash chip for
root fs, place filesystem into it and mount corresponding mtdblock device during
boot, e.g. use something like "root=/dev/mtdblock1" if you have several
fs compiled into your kernel you can use additional command line parameter
"rootfstype=<your_root_fs>" to prevent kernel trying all registered fs while
mounting root.

Eugene.

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

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

* Re: loading the kernel and root FS separately from flash?
  2004-06-27 22:46 Robert P. J. Day
  2004-06-28  3:58 ` Eugene Surovegin
@ 2004-06-28  7:09 ` Wolfgang Denk
  2004-06-28  9:42   ` David Woodhouse
  2004-06-28 10:13   ` Robert P. J. Day
  1 sibling, 2 replies; 18+ messages in thread
From: Wolfgang Denk @ 2004-06-28  7:09 UTC (permalink / raw)
  To: Robert P. J. Day; +Cc: Embedded Linux PPC list


In message <Pine.LNX.4.60.0406271836300.10210@localhost.localdomain> you wrote:
>
>    with this configuration, it's obviously not possible to update files
> or directories in the bootable image individually -- it's just one big
> zImage.inited image.

What makes you think that this is not  possible?  If  there  is  (for
example)  a  writable JFFS2 partition available, you can use this for
an overlay filesystem to store the updates.

See for example the "mini_fo" overlay filesystem on  our  FTP  server
and the paper about it:
http://www.denx.de/PDF/Diplomarbeit-MK-1.0-net.pdf

>    but is it feasible to redefine the layout of that flash chip and
> take, say, 4M of it and create a JFFS2 filesystem, then put the root
> filesystem in there uncompressed?  (assuming, of course, that the

Standard JFFS2 code will always compress.

>    is this possible?  anyone done it this way, and can tell me what
> pitfalls i have to watch for?  thanks.

This is a pretty standard setup. Although I don't really recommend to
use JFFS2 for root filesystem (for example, because with a  big  root
filesystem  the boot time may deteriorate). Instead, we usually split
the stuff in a read-only partition (for example cramfs),  a  volatile
part (tmpfs), and a persistent storage partition (JFFS2).

Best regards,

Wolfgang Denk

--
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-4596-87  Fax: (+49)-8142-4596-88  Email: wd@denx.de
Generally speaking, there are other ways to accomplish whatever it is
that you think you need ...                               - Doug Gwyn

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

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

* Re: loading the kernel and root FS separately from flash?
  2004-06-28  7:09 ` Wolfgang Denk
@ 2004-06-28  9:42   ` David Woodhouse
  2004-06-28 10:19     ` Robert P. J. Day
                       ` (2 more replies)
  2004-06-28 10:13   ` Robert P. J. Day
  1 sibling, 3 replies; 18+ messages in thread
From: David Woodhouse @ 2004-06-28  9:42 UTC (permalink / raw)
  To: Wolfgang Denk; +Cc: Robert P. J. Day, Embedded Linux PPC list


On Mon, 2004-06-28 at 09:09 +0200, Wolfgang Denk wrote:
> >    is this possible?  anyone done it this way, and can tell me what
> > pitfalls i have to watch for?  thanks.
>
> This is a pretty standard setup. Although I don't really recommend to
> use JFFS2 for root filesystem (for example, because with a  big  root
> filesystem  the boot time may deteriorate). Instead, we usually split
> the stuff in a read-only partition (for example cramfs),  a  volatile
> part (tmpfs), and a persistent storage partition (JFFS2).

I think it should be OK when it's 4MiB in size. Mount time was far more
of a problem in JFFS2 many years ago when people were using the 2.4
kernel. It's a lot faster in 2.6.

There's people looking at making it even faster now, too.

--
dwmw2


** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

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

* Re: loading the kernel and root FS separately from flash?
  2004-06-28  3:58 ` Eugene Surovegin
@ 2004-06-28 10:00   ` Robert P. J. Day
  0 siblings, 0 replies; 18+ messages in thread
From: Robert P. J. Day @ 2004-06-28 10:00 UTC (permalink / raw)
  To: Eugene Surovegin; +Cc: Embedded Linux PPC list


(as wolfgang also responded to this, i'll save some feedback for his
post.)

On Sun, 27 Jun 2004, Eugene Surovegin wrote:

> Yes, this is possible and actually quite trivial.
>
> Partition your flash the way you want, e.g. reserve part of the
> flash chip for root fs, place filesystem into it and mount
> corresponding mtdblock device during boot, e.g. use something like
> "root=/dev/mtdblock1" if you have several fs compiled into your
> kernel you can use additional command line parameter
> "rootfstype=<your_root_fs>" to prevent kernel trying all registered
> fs while mounting root.

yes, i found out that it was, in fact, kind of embarrassingly easy. i
just followed a sample partition definition in rpxlite.c and, lo and
behold, it just worked.  i'm not used to having things just work. :-)

rday

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

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

* Re: loading the kernel and root FS separately from flash?
  2004-06-28  7:09 ` Wolfgang Denk
  2004-06-28  9:42   ` David Woodhouse
@ 2004-06-28 10:13   ` Robert P. J. Day
  2004-06-28 10:41     ` Wolfgang Denk
  1 sibling, 1 reply; 18+ messages in thread
From: Robert P. J. Day @ 2004-06-28 10:13 UTC (permalink / raw)
  To: Wolfgang Denk; +Cc: Embedded Linux PPC list


(sorry, i realize that this isn't directly related to PPC issues.)

as a first followup question, now that i've just created a 4M
partition on an 8M flash chip, and formatted it as JFFS2, if i put a
copy of the root FS on that filesystem, i can of course boot and use
that as my root filesystem.  but, at the moment, since i'm booting
with what is essentially a zImage.initrd, the kernel is first loaded,
and then the uncompressed root filesystem is copied into RAM of
course.

i suspect that leaving my root filesystem in flash would cause
noticeable performance problems (even if i managed to structure it so
that it could be read-only).  how hard would it be to automatically
have that root FS copied from JFFS2 to RAM and mounted from there?
can that be done as a kernel option i haven't seen?  or do i have to
do that manually, involving something like "pivot_root"?  or is it
worth the trouble?

On Mon, 28 Jun 2004, Wolfgang Denk wrote:

> In message <Pine.LNX.4.60.0406271836300.10210@localhost.localdomain> you wrote:
>>
>>    with this configuration, it's obviously not possible to update files
>> or directories in the bootable image individually -- it's just one big
>> zImage.initrd image.
>
> What makes you think that this is not  possible?  If  there  is  (for
> example)  a  writable JFFS2 partition available, you can use this for
> an overlay filesystem to store the updates.
>
> See for example the "mini_fo" overlay filesystem on  our  FTP  server
> and the paper about it:
> http://www.denx.de/PDF/Diplomarbeit-MK-1.0-net.pdf

ah, now this looks interesting.  from a quick glance, is this just a
theoretical concept, or has it been implemented?  we have *some* JFFS2
space available, but not a guaranteed amount.  if this requires a
completely separate JFFS2 partition, we might not be able to handle
that.

>>    but is it feasible to redefine the layout of that flash chip and
>> take, say, 4M of it and create a JFFS2 filesystem, then put the root
>> filesystem in there uncompressed?  (assuming, of course, that the
>
> Standard JFFS2 code will always compress.

sorry, i'm not sure what you're saying here.  are you saying that i
can create a compressed JFFS2 image of my root filesystem on my build
host, just as i do when i create my zImage.initrd?  or just compress
the individual files in the filesystem?  and have this filesystem
automatically loaded into, and mounted from, RAM?  can you clarify
this?

> This is a pretty standard setup. Although I don't really recommend to
> use JFFS2 for root filesystem (for example, because with a  big  root
> filesystem  the boot time may deteriorate).

that was one of my concerns -- not just the boot time but the run
time, even if i could structure it as read-only.

> Instead, we usually split the stuff in a read-only partition (for
> example cramfs), a volatile part (tmpfs), and a persistent storage
> partition (JFFS2).

that's awfully close to what we're doing now.  we've got the tmpfs, we
have a completely separate flash for persistent apps and data, it's
just the root filesystem that i would *dearly* love to be able to
patch on the fly on a running system.  i'll look a lot more closely
into the above.  thanks.

rday

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

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

* Re: loading the kernel and root FS separately from flash?
  2004-06-28  9:42   ` David Woodhouse
@ 2004-06-28 10:19     ` Robert P. J. Day
  2004-06-28 10:48       ` Wolfgang Denk
  2004-06-28 10:23     ` Robert P. J. Day
  2004-06-28 10:36     ` Wolfgang Denk
  2 siblings, 1 reply; 18+ messages in thread
From: Robert P. J. Day @ 2004-06-28 10:19 UTC (permalink / raw)
  To: David Woodhouse; +Cc: Wolfgang Denk, Embedded Linux PPC list


On Mon, 28 Jun 2004, David Woodhouse wrote:

> On Mon, 2004-06-28 at 09:09 +0200, Wolfgang Denk wrote:
>>>    is this possible?  anyone done it this way, and can tell me what
>>> pitfalls i have to watch for?  thanks.
>>
>> This is a pretty standard setup. Although I don't really recommend to
>> use JFFS2 for root filesystem (for example, because with a  big  root
>> filesystem  the boot time may deteriorate). Instead, we usually split
>> the stuff in a read-only partition (for example cramfs),  a  volatile
>> part (tmpfs), and a persistent storage partition (JFFS2).
>
> I think it should be OK when it's 4MiB in size. Mount time was far more
> of a problem in JFFS2 many years ago when people were using the 2.4
> kernel. It's a lot faster in 2.6.
>
> There's people looking at making it even faster now, too.

we're still using the 2.4 kernel here, but i don't think boot/mount
time is an issue.  i mean, someone's just going to turn the unit on,
wait to get a "READY" prompt, and go to work.  if it takes a bit
longer, tough. :-)

it was more the response time from flash as opposed to RAM that was an
issue for me.  that's why i was asking about having the root FS loaded
from flash into RAM at boot time.  we'd probably be happy about
sacrificing boot time response (copying all of the root FS into RAM)
for better run time performance, although i don't know the differences
in performance at the moment.

but i like the fact that it's snappier under 2.6.

rday

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

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

* Re: loading the kernel and root FS separately from flash?
  2004-06-28  9:42   ` David Woodhouse
  2004-06-28 10:19     ` Robert P. J. Day
@ 2004-06-28 10:23     ` Robert P. J. Day
  2004-06-28 10:36     ` Wolfgang Denk
  2 siblings, 0 replies; 18+ messages in thread
From: Robert P. J. Day @ 2004-06-28 10:23 UTC (permalink / raw)
  To: David Woodhouse; +Cc: Wolfgang Denk, Embedded Linux PPC list


On Mon, 28 Jun 2004, David Woodhouse wrote:

> I think it should be OK when it's 4MiB in size. Mount time was far more
> of a problem in JFFS2 many years ago when people were using the 2.4
> kernel. It's a lot faster in 2.6.

this is yet another reason why i'm keen on getting that 2.6 kernel
running on my board.  so far, i still get a full kernel boot, then a
brief foray into user space to start minit, then ... hang.

so i'll just keep pulling the latest updates and keep trying.

rday

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

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

* Re: loading the kernel and root FS separately from flash?
  2004-06-28  9:42   ` David Woodhouse
  2004-06-28 10:19     ` Robert P. J. Day
  2004-06-28 10:23     ` Robert P. J. Day
@ 2004-06-28 10:36     ` Wolfgang Denk
  2004-06-28 10:40       ` David Woodhouse
  2 siblings, 1 reply; 18+ messages in thread
From: Wolfgang Denk @ 2004-06-28 10:36 UTC (permalink / raw)
  To: David Woodhouse; +Cc: Robert P. J. Day, Embedded Linux PPC list


In message <1088415754.6992.1.camel@hades.cambridge.redhat.com> you wrote:
>
> I think it should be OK when it's 4MiB in size. Mount time was far more
> of a problem in JFFS2 many years ago when people were using the 2.4
> kernel. It's a lot faster in 2.6.

Is this really a question of which  kernel  is  running?  It  was  my
impression that this is merely an issue of which version of the JFFS2
(i. e. MTD) code you are using?

Best regards,

Wolfgang Denk

--
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-4596-87  Fax: (+49)-8142-4596-88  Email: wd@denx.de
panic: kernel trap (ignored)

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

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

* Re: loading the kernel and root FS separately from flash?
  2004-06-28 10:36     ` Wolfgang Denk
@ 2004-06-28 10:40       ` David Woodhouse
  0 siblings, 0 replies; 18+ messages in thread
From: David Woodhouse @ 2004-06-28 10:40 UTC (permalink / raw)
  To: Wolfgang Denk; +Cc: Robert P. J. Day, Embedded Linux PPC list


On Mon, 2004-06-28 at 12:36 +0200, Wolfgang Denk wrote:
> In message <1088415754.6992.1.camel@hades.cambridge.redhat.com> you wrote:
> >
> > I think it should be OK when it's 4MiB in size. Mount time was far more
> > of a problem in JFFS2 many years ago when people were using the 2.4
> > kernel. It's a lot faster in 2.6.
>
> Is this really a question of which  kernel  is  running?  It  was  my
> impression that this is merely an issue of which version of the JFFS2
> (i. e. MTD) code you are using?

True -- for the moment at least you can drop the JFFS2 development tree
into a 2.4 kernel.

--
dwmw2


** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

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

* Re: loading the kernel and root FS separately from flash?
  2004-06-28 10:13   ` Robert P. J. Day
@ 2004-06-28 10:41     ` Wolfgang Denk
  2004-06-28 10:50       ` Robert P. J. Day
  0 siblings, 1 reply; 18+ messages in thread
From: Wolfgang Denk @ 2004-06-28 10:41 UTC (permalink / raw)
  To: Robert P. J. Day; +Cc: Embedded Linux PPC list


In message <Pine.LNX.4.60.0406280600140.3259@localhost.localdomain> you wrote:
>
> i suspect that leaving my root filesystem in flash would cause
> noticeable performance problems (even if i managed to structure it so

What makes you think so?

The startup behaviour may change: at the moment you  load  the  whole
root  filesystem  into  RAM before you can run anything at all - that
means it takes longer before the first  application  can  start.  But
then  everything  _is_  in  RAM, so anything else will start quickly,
too.

With a  flash  based  root  filesystem  only  the  things  (binaries,
libraries)  that  are  actually  needed  for the first user processes
(init etc.) will be loaded to RAM, so they may actually start  faster
than  from  a  RAM  disk.  But  anything  else  may  require  to load
additional libraries etc. so it may start slower than from a ramdisk.
On the other hand, some code or binaries (like error handling  stuff,
debug  tools  etc.) may not be loaded at all for normal operation, so
you will have more RAM free, which adds to speed, too.

> that it could be read-only).  how hard would it be to automatically
> have that root FS copied from JFFS2 to RAM and mounted from there?

This makes just no sense to me.

> can that be done as a kernel option i haven't seen?  or do i have to
> do that manually, involving something like "pivot_root"?  or is it
> worth the trouble?

I cannot see any advantages from such a setup.

If you want a RAM based root filesystem, use a ramdisk.

Best regards,

Wolfgang Denk

--
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-4596-87  Fax: (+49)-8142-4596-88  Email: wd@denx.de
At the source of every error which is blamed on the computer you will
find at least two human errors, including the error of blaming it  on
the computer.

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

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

* Re: loading the kernel and root FS separately from flash?
  2004-06-28 10:19     ` Robert P. J. Day
@ 2004-06-28 10:48       ` Wolfgang Denk
  2004-06-28 10:52         ` Robert P. J. Day
  0 siblings, 1 reply; 18+ messages in thread
From: Wolfgang Denk @ 2004-06-28 10:48 UTC (permalink / raw)
  To: Robert P. J. Day; +Cc: Embedded Linux PPC list


In message <Pine.LNX.4.60.0406280615400.3259@localhost.localdomain> you wrote:
>
> it was more the response time from flash as opposed to RAM that was an
> issue for me.  that's why i was asking about having the root FS loaded
> from flash into RAM at boot time.  we'd probably be happy about
> sacrificing boot time response (copying all of the root FS into RAM)
> for better run time performance, although i don't know the differences
> in performance at the moment.

Where is your ramdisk image coming from? Being loaded from flash?

So what's the difference between loading the image as a whole  before
startup,  or  loading the files step by step when needed? If you need
everything in your ramdisk the  difference  in  time  is  very  small
(except  from  measurable changes in the start-up sequence, wher eyou
can have the first code running actually faster from  a  flash  based
filesystem);  if  you don't use all the stuff in your ramdisk all the
time than the flash based filesystem may be faster, too.

We got the fastest boot and run times using a  read-only  ext2  file-
system in a MTD partition.

And using an overlay mounto to a JFFS2 partition you can still update
the files. [Or, for  occasional  updates,  you  can  remount  rw  the
filesystem,  perform  the  updates,  and  remount  ro again - an ext2
filesystem on a flash partition is obviously not optimal, but if  you
just  need  to  change  2  files  every year or so it will still work
fine.]

Best regards,

Wolfgang Denk

--
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-4596-87  Fax: (+49)-8142-4596-88  Email: wd@denx.de
"An open mind has but one disadvantage: it collects dirt."
                                                    - a saying at RPI

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

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

* Re: loading the kernel and root FS separately from flash?
  2004-06-28 10:41     ` Wolfgang Denk
@ 2004-06-28 10:50       ` Robert P. J. Day
  2004-06-29  9:31         ` David Woodhouse
  0 siblings, 1 reply; 18+ messages in thread
From: Robert P. J. Day @ 2004-06-28 10:50 UTC (permalink / raw)
  To: Wolfgang Denk; +Cc: Embedded Linux PPC list


On Mon, 28 Jun 2004, Wolfgang Denk wrote:

> In message <Pine.LNX.4.60.0406280600140.3259@localhost.localdomain> you wrote:

>> that it could be read-only).  how hard would it be to automatically
>> have that root FS copied from JFFS2 to RAM and mounted from there?
>
> This makes just no sense to me.

ok, i'm probably getting confused about something fundamental here.
what i'm after is to have my root filesystem in persistent storage and
available for updates on the fly, hence the notion of partitioning off
a part of the system flash for the JFFS2 version of the root
filesystem.  i've done that, so i've solved that problem -- i have a
root filesystem i can mount from a running system and modify.

now, i could just mount that JFFS2 version of the root fs straight out
of flash, but i get the impression that that would cause a performance
hit.  so i was wondering about the feasibility about copying that
entire flash FS into RAM at boot time, and running out of RAM.  this
would mean, of course, that if i wanted to make mods to the root FS,
i'd do them in flash and they'd only take effect at the next reboot,
which is fine with me.

or am i just hopelessly confused about what is and is not a reasonable
option here?  i get the feeling i'm missing something important.

rday

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

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

* Re: loading the kernel and root FS separately from flash?
  2004-06-28 10:48       ` Wolfgang Denk
@ 2004-06-28 10:52         ` Robert P. J. Day
  0 siblings, 0 replies; 18+ messages in thread
From: Robert P. J. Day @ 2004-06-28 10:52 UTC (permalink / raw)
  To: Wolfgang Denk; +Cc: Embedded Linux PPC list


On Mon, 28 Jun 2004, Wolfgang Denk wrote:

> We got the fastest boot and run times using a  read-only  ext2  file-
> system in a MTD partition.

ah, now i see what i was overlooking -- having a straight ext2 FS in
flash from the beginning and i'm pretty sure i can mount it read-only.
i think that might just do it, although i'm still going to look into
that overlay paper and the cramfs option.  just to round out my
education.  thanks.

rday

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

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

* Re: loading the kernel and root FS separately from flash?
@ 2004-06-28 11:33 Gerhard TAEUBL
  0 siblings, 0 replies; 18+ messages in thread
From: Gerhard TAEUBL @ 2004-06-28 11:33 UTC (permalink / raw)
  To: rpjday; +Cc: linuxppc-embedded


Hi!

We have the same 'problem' if we startet with linux.
I think the point is:
What do you want to update?
In most cases only project related files like configuration or the
application itself has to be updated, but not the whole distribution.
So look what do you think that is necessayr to update and which files
are not.
We use a compressed filesystem without the possibilty to update it
(easily). Then we mount a jffs2 partition where the project related
files are stored. (In detail: a standard project directory is also
stored in the compressed filesystem, and if the hardware boots the first
time, the flashdisk will be formated and the standard application
copied. So from this point on it could be handled in our system as
usual, and also newer application could be stored, wihout the need to
update everything)

I hope you could see now clear .-)

br
Gerhard

>>> "Robert P. J. Day" <rpjday@mindspring.com> 06/28/04 12:50pm >>>

On Mon, 28 Jun 2004, Wolfgang Denk wrote:

> In message <Pine.LNX.4.60.0406280600140.3259@localhost.localdomain>
you wrote:

>> that it could be read-only).  how hard would it be to automatically
>> have that root FS copied from JFFS2 to RAM and mounted from there?
>
> This makes just no sense to me.

ok, i'm probably getting confused about something fundamental here.
what i'm after is to have my root filesystem in persistent storage and
available for updates on the fly, hence the notion of partitioning off
a part of the system flash for the JFFS2 version of the root
filesystem.  i've done that, so i've solved that problem -- i have a
root filesystem i can mount from a running system and modify.

now, i could just mount that JFFS2 version of the root fs straight out
of flash, but i get the impression that that would cause a performance
hit.  so i was wondering about the feasibility about copying that
entire flash FS into RAM at boot time, and running out of RAM.  this
would mean, of course, that if i wanted to make mods to the root FS,
i'd do them in flash and they'd only take effect at the next reboot,
which is fine with me.

or am i just hopelessly confused about what is and is not a reasonable
option here?  i get the feeling i'm missing something important.

rday


** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

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

* Re: loading the kernel and root FS separately from flash?
       [not found] <s0e01d9a.092@mail.frequentis.com>
@ 2004-06-28 12:11 ` Robert P. J. Day
  0 siblings, 0 replies; 18+ messages in thread
From: Robert P. J. Day @ 2004-06-28 12:11 UTC (permalink / raw)
  To: Gerhard TAEUBL; +Cc: linuxppc-embedded


On Mon, 28 Jun 2004, Gerhard TAEUBL wrote:

> Hi!
>
> We have the same 'problem' if we startet with linux.
> I think the point is:
> What do you want to update?
> In most cases only project related files like configuration or the
> application itself has to be updated, but not the whole distribution.
> So look what do you think that is necessayr to update and which files
> are not.
> We use a compressed filesystem without the possibilty to update it
> (easily). Then we mount a jffs2 partition where the project related
> files are stored. (In detail: a standard project directory is also
> stored in the compressed filesystem, and if the hardware boots the first
> time, the flashdisk will be formated and the standard application
> copied. So from this point on it could be handled in our system as
> usual, and also newer application could be stored, wihout the need to
> update everything)
>
> I hope you could see now clear .-)

sadly, i need the ability to update arbitrary files anywhere in the
root filesystem on demand (but only on occasion).  updating
application-specific stuff is easy as all that is stored in a totally
separate flash chip, formatted as a single JFFS2 filesystem, so that
part is easy.

it's the fundamental root filesystem contents that are the issue here,
but i think wolfgang has given me what i need to handle this.

rday

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

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

* Re: loading the kernel and root FS separately from flash?
  2004-06-28 10:50       ` Robert P. J. Day
@ 2004-06-29  9:31         ` David Woodhouse
  2004-06-29 12:09           ` Robert P. J. Day
  0 siblings, 1 reply; 18+ messages in thread
From: David Woodhouse @ 2004-06-29  9:31 UTC (permalink / raw)
  To: Robert P. J. Day; +Cc: Wolfgang Denk, Embedded Linux PPC list


On Mon, 2004-06-28 at 06:50 -0400, Robert P. J. Day wrote:
> On Mon, 28 Jun 2004, Wolfgang Denk wrote:
>
> > In message <Pine.LNX.4.60.0406280600140.3259@localhost.localdomain> you wrote:
>
> >> that it could be read-only).  how hard would it be to automatically
> >> have that root FS copied from JFFS2 to RAM and mounted from there?
> >
> > This makes just no sense to me.
>
> ok, i'm probably getting confused about something fundamental here.
> what i'm after is to have my root filesystem in persistent storage and
> available for updates on the fly, hence the notion of partitioning off
> a part of the system flash for the JFFS2 version of the root
> filesystem.  i've done that, so i've solved that problem -- i have a
> root filesystem i can mount from a running system and modify.
>
> now, i could just mount that JFFS2 version of the root fs straight out
> of flash, but i get the impression that that would cause a performance
> hit.

Why so? JFFS2 is relatively slow to mount, and obviously _writing_ to
flash can be slow -- but for normal operation it should be fine. Try it.

Personally, I'd just use a JFFS2 root file system for everything. Put
your kernel in it too -- RedBoot and u-boot can load kernels from JFFS2,
and that means you can atomically update the kernel at runtime too,
which you can't do if it's stored in a separate partition (unless you
play with having two partitions for it and teach the bootloader to work
out which one is valid).

--
dwmw2


** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

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

* Re: loading the kernel and root FS separately from flash?
  2004-06-29  9:31         ` David Woodhouse
@ 2004-06-29 12:09           ` Robert P. J. Day
  0 siblings, 0 replies; 18+ messages in thread
From: Robert P. J. Day @ 2004-06-29 12:09 UTC (permalink / raw)
  To: David Woodhouse; +Cc: Embedded Linux PPC list


On Tue, 29 Jun 2004, David Woodhouse wrote:

> On Mon, 2004-06-28 at 06:50 -0400, Robert P. J. Day wrote:

> Why so? JFFS2 is relatively slow to mount, and obviously _writing_ to
> flash can be slow -- but for normal operation it should be fine. Try it.
...

given that i have a few more questions (quelle surprise!) and that
they're more specifically related to filesystems and JFFS2, i figure i
might as well move this to the MTD mailing list.  it's getting a bit
off-topic for a PPC list.

rday

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

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

end of thread, other threads:[~2004-06-29 12:09 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-06-28 11:33 loading the kernel and root FS separately from flash? Gerhard TAEUBL
     [not found] <s0e01d9a.092@mail.frequentis.com>
2004-06-28 12:11 ` Robert P. J. Day
  -- strict thread matches above, loose matches on Subject: below --
2004-06-27 22:46 Robert P. J. Day
2004-06-28  3:58 ` Eugene Surovegin
2004-06-28 10:00   ` Robert P. J. Day
2004-06-28  7:09 ` Wolfgang Denk
2004-06-28  9:42   ` David Woodhouse
2004-06-28 10:19     ` Robert P. J. Day
2004-06-28 10:48       ` Wolfgang Denk
2004-06-28 10:52         ` Robert P. J. Day
2004-06-28 10:23     ` Robert P. J. Day
2004-06-28 10:36     ` Wolfgang Denk
2004-06-28 10:40       ` David Woodhouse
2004-06-28 10:13   ` Robert P. J. Day
2004-06-28 10:41     ` Wolfgang Denk
2004-06-28 10:50       ` Robert P. J. Day
2004-06-29  9:31         ` David Woodhouse
2004-06-29 12:09           ` Robert P. J. Day

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).