Flash File System Concerns
A message that is not in the archive (sent off-list or not yet received): [email protected]
Folks,
I have one concern regarding FFS. If you use flash for your entire filesystem including /var/log, /proc, etc.., you will be accessing flash too many times.
And there is good chance that, your flash on the board reaches maximum number of accesses/writes limited by flash technology.
How do people generally handle that in the industry. Especially, if you have on-board (non-replaceable) flash?
Thanks,
Prakash
Jaap Jan: Thank you very much for precise
instructions.
Quoted 152 lines · --- Jaap-Jan Boor
Prakash,
You should divide your flash into parts. e.g.:
- first block(s) boot
- then some blocks for the kernel
- all remaining blocks as root fsYou do this partitioning in the maps directory of
drivers/mtd.You can make a linux kernel with mtd and jffs2
support and ramdisk that
holds the erase, eraseall, dd, mkfs.jffs2 etc.
programs.You can load the kernel into SDRAM, run it, prepare your flash (erase flash, then use mkfs.jffs2 on a
/dev/mtd? device
to prepare an fs.You should then make a new kernel that uses mtd as rootfs, not
the ramdisk as rootfs.Jaap-Jan
Quoted 4 lines · Prakash kanthi
Hi Jaap Jan,
Thanks for your reply. What do you mean by 'works
out
Quoted 1 line
of the box with denx'? I see the code you referred
to
Quoted 4 lines
but not sure how to use it. I still have some
concerns. Like,1. How can i initially store the image into flash?
My
Quoted 4 lines
flash chip is on the board.
2. How can i boot linux from flash?3. Currently i have a 32MB SDRAM along with flash.
I
Quoted 1 line
have tools to download linux image into SDRAM.
Even if
Quoted 1 line
i go with MTD/JFFS, my concern is unless linux
runs
Quoted 4 lines
flash can not be accessed and vice versa.
4. Lets say, i download linux into a safe place in SDRAM, boot it and then access flash thru MTD/JFFS
and
Quoted 1 line
store linux image into flash. Even in this case,
what
Quoted 1 line
all i need to take care of for making my flash a
boot
Quoted 11 lines
device.
Any detailed documentation is appreciated.
Thanks,
PrakashQuoted 3 lines · --- Jaap-Jan Boor
Hi,
I use strata flash with MTD and JFSS2 as file
system
Quoted 1 line
Quoted 1 line
on top of it. Works out of the box with denx'
eldk
Quoted 2 lines
Quoted 2 lines
kernel and
toolchain. I've provided my own flash map butyou
Quoted 9 lines
Quoted 9 lines
can also use an existing one (look e.g. in
linux/drivers/mtd/maps)Jaap-Jan
Quoted 2 lines · Wolfgang Denk
In message
Quoted 3 lines
Quoted 3 lines
Quoted 2 lines · you
Quoted 2 lines
I have a 32MB Intel Strata flash on my
PPC405
Quoted 4 lines
Quoted 4 lines
based
Quoted 1 line
Quoted 1 line
custom board. I need to create access
routines/APIs to
Quoted 1 line
Quoted 1 line
access the flash. I was thinking of creating
a
Quoted 2 lines
Quoted 2 lines
Flash
Quoted 1 line
Quoted 1 line
File System and mount it as a device in
Linux
Quoted 9 lines
Quoted 9 lines
Quoted 3 lines
Quoted 3 lines
environment.
Are there any off the shelf FFS packages
available?
Quoted 5 lines
Quoted 1 line
Generally, how the flash is used?
Use the MTD layer.
Quoted 1 line
I am working with micro-monitor to use its
Tiny
Quoted 4 lines
Quoted 4 lines
File
Quoted 1 line
Quoted 1 line
System on flash support and eventually mount
into
Quoted 1 line
Quoted 1 line
linux. Did anyone use this combination
before?
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
I think you cannot do this. AFAIK the TFS code
is
Quoted 2 lines
Quoted 2 lines
not available under
Quoted 1 line
a GPL compatible license which prevents it
from
Quoted 11 lines
Quoted 11 lines
being linked with the
Quoted 8 lines
Linux kernel code.
Best regards,
Wolfgang Denk
--
Software Engineering: Embedded and RealtimeSystems, Embedded Linux
Quoted 1 line
Phone: (+49)-8142-4596-87 Fax:
(+49)-8142-4596-88
Quoted 2 lines
Quoted 2 lines
Email: [email protected]
Quoted 1 line
There is is no reason for any individual to
have a
Quoted 7 lines
Quoted 7 lines
computer in their
Quoted 1 line
home. -- Ken Olsen (President of Digital
Equipment Corporation),
Quoted 1 line
Convention of the World Future
Society, in Boston, 1977
Quoted 1 line
Quoted 8 lines
Quoted 8 lines
--
J.G.J. Boor
Room: BE-525
Lucent Technologies Nederland b.v.
Phone: +31 35 687 4721
Optical Networking Group TMS Data
Fax: +31 35 687 5976
P.O. Box 1168, 1200 BD, Hilversum, TheNetherlands
Quoted 2 lines
mailto:[email protected]
Quoted 8 lines
--
J.G.J. Boor
Room: BE-525
Lucent Technologies Nederland b.v.
Phone: +31 35 687 4721
Optical Networking Group TMS Data
Fax: +31 35 687 5976
P.O. Box 1168, 1200 BD, Hilversum, The Netherlands
mailto:[email protected]
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
Quoted 6 lines · Prakash kanthi
Folks,
I have one concern regarding FFS. If you use flash for your entire filesystem including
/var/log, /proc, etc.., you will be accessing flash too many times.
Quoted 7 lines
And there is good chance that, your flash on the board reaches maximum number of accesses/writes limited by flash technology.
How do people generally handle that in the industry. Especially, if you have on-board (non-replaceable) flash?
/proc is mounted from teh system and does not use flash.
Under the rules of the FHS, /var and /tmp should be mounted as a Read-Write filesystem, the rest of the system (depending on options and distribution) can be mounted Read-Only.
Now then, if you need things preserved between system reboots then you need to have /var mounted on a "perminant" storage system. /tmp can be mounted w/ the "tmpfs" filesystem. (Basically a ramdisk.)
The way that I generally recommend this stuff to customers is to symbolically link /tmp to /var/tmp, mount /var as a tmpfs filesystem and then create the log, spool, lock, etc directories as required for the system during the initscripts.
--Mark
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
Quoted 7 lines · Prakash kanthi
Folks,
I have one concern regarding FFS. If you use flash for your entire filesystem including
/var/log, /proc, etc.., you will be accessing flash too many times.
Quoted 8 lines
And there is good chance that, your flash on the board reaches maximum number of accesses/writes limited by flash technology.
How do people generally handle that in the industry. Especially, if you have on-board (non-replaceable) flash?
First of all, use a proper FLASH file system (like JFFS2) which does wear leveling (writes are spread out over the entire device, reducing the wear on any particular portion). Also, move things that get updated a lot to a RAM disk and only flush to the FLASH periodically.
BTW /proc is a pseudo file system - it is not represented in any media like the FLASH.
Quoted 171 lines
Thanks,
PrakashJaap Jan: Thank you very much for precise
instructions.Quoted 152 lines · --- Jaap-Jan Boor
Prakash,
You should divide your flash into parts. e.g.:
- first block(s) boot
- then some blocks for the kernel
- all remaining blocks as root fsYou do this partitioning in the maps directory of
drivers/mtd.You can make a linux kernel with mtd and jffs2
support and ramdisk that
holds the erase, eraseall, dd, mkfs.jffs2 etc.
programs.You can load the kernel into SDRAM, run it, prepare your flash (erase flash, then use mkfs.jffs2 on a
/dev/mtd? device
to prepare an fs.You should then make a new kernel that uses mtd as rootfs, not
the ramdisk as rootfs.Jaap-Jan
Quoted 4 lines · Prakash kanthi
Hi Jaap Jan,
Thanks for your reply. What do you mean by 'works
out
Quoted 1 line
of the box with denx'? I see the code you referred
to
Quoted 4 lines
but not sure how to use it. I still have some
concerns. Like,1. How can i initially store the image into flash?
My
Quoted 4 lines
flash chip is on the board.
2. How can i boot linux from flash?3. Currently i have a 32MB SDRAM along with flash.
I
Quoted 1 line
have tools to download linux image into SDRAM.
Even if
Quoted 1 line
i go with MTD/JFFS, my concern is unless linux
runs
Quoted 4 lines
flash can not be accessed and vice versa.
4. Lets say, i download linux into a safe place in SDRAM, boot it and then access flash thru MTD/JFFS
and
Quoted 1 line
store linux image into flash. Even in this case,
what
Quoted 1 line
all i need to take care of for making my flash a
boot
Quoted 11 lines
device.
Any detailed documentation is appreciated.
Thanks,
PrakashQuoted 3 lines · --- Jaap-Jan Boor
Hi,
I use strata flash with MTD and JFSS2 as file
system
Quoted 1 line
Quoted 1 line
on top of it. Works out of the box with denx'
eldk
Quoted 2 lines
Quoted 2 lines
kernel and
toolchain. I've provided my own flash map butyou
Quoted 9 lines
Quoted 9 lines
can also use an existing one (look e.g. in
linux/drivers/mtd/maps)Jaap-Jan
Quoted 2 lines · Wolfgang Denk
In message
Quoted 3 lines
Quoted 3 lines
Quoted 2 lines · you
Quoted 2 lines
I have a 32MB Intel Strata flash on my
PPC405
Quoted 4 lines
Quoted 4 lines
based
Quoted 1 line
Quoted 1 line
custom board. I need to create access
routines/APIs to
Quoted 1 line
Quoted 1 line
access the flash. I was thinking of creating
a
Quoted 2 lines
Quoted 2 lines
Flash
Quoted 1 line
Quoted 1 line
File System and mount it as a device in
Linux
Quoted 9 lines
Quoted 9 lines
Quoted 3 lines
Quoted 3 lines
environment.
Are there any off the shelf FFS packages
available?
Quoted 5 lines
Quoted 1 line
Generally, how the flash is used?
Use the MTD layer.
Quoted 1 line
I am working with micro-monitor to use its
Tiny
Quoted 4 lines
Quoted 4 lines
File
Quoted 1 line
Quoted 1 line
System on flash support and eventually mount
into
Quoted 1 line
Quoted 1 line
linux. Did anyone use this combination
before?
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
I think you cannot do this. AFAIK the TFS code
is
Quoted 2 lines
Quoted 2 lines
not available under
Quoted 1 line
a GPL compatible license which prevents it
from
Quoted 11 lines
Quoted 11 lines
being linked with the
Quoted 8 lines
Linux kernel code.
Best regards,
Wolfgang Denk
--
Software Engineering: Embedded and RealtimeSystems, Embedded Linux
Quoted 1 line
Phone: (+49)-8142-4596-87 Fax:
(+49)-8142-4596-88
Quoted 2 lines
Quoted 2 lines
Email: [email protected]
Quoted 1 line
There is is no reason for any individual to
have a
Quoted 7 lines
Quoted 7 lines
computer in their
Quoted 1 line
home. -- Ken Olsen (President of Digital
Equipment Corporation),
Quoted 1 line
Convention of the World Future
Society, in Boston, 1977
Quoted 1 line
Quoted 8 lines
Quoted 8 lines
--
J.G.J. Boor
Room: BE-525
Lucent Technologies Nederland b.v.
Phone: +31 35 687 4721
Optical Networking Group TMS Data
Fax: +31 35 687 5976
P.O. Box 1168, 1200 BD, Hilversum, TheNetherlands
Quoted 2 lines
mailto:[email protected]
Quoted 8 lines
--
J.G.J. Boor
Room: BE-525
Lucent Technologies Nederland b.v.
Phone: +31 35 687 4721
Optical Networking Group TMS Data
Fax: +31 35 687 5976
P.O. Box 1168, 1200 BD, Hilversum, The Netherlands
Quoted 3 lines
mailto:[email protected]
--
.--------------------------------------------------------.
| Mind: Embedded Linux and eCos Development | |--------------------------------------------------------| | Gary Thomas email: [email protected] | | Mind ( http://mind.be ) tel: +1 (970) 229-1963 | | gpg: http://www.chez-thomas.org/gary/gpg_key.asc |
'--------------------------------------------------------'
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
Prakash,
You don't have to worry about the /proc filesystem, as it is indepedent of your Disk or Flash filesystem.
I usually point the /var/log directory to a RAMDISK.
Regards,
Daris
SNMC
Quoted 186 lines · Prakash kanthi
Folks,
I have one concern regarding FFS. If you use flash for your entire filesystem including
/var/log, /proc, etc.., you will be accessing flash too many times.And there is good chance that, your flash on the board reaches maximum number of accesses/writes limited by flash technology.
How do people generally handle that in the industry. Especially, if you have on-board (non-replaceable) flash?
Thanks,
PrakashJaap Jan: Thank you very much for precise
instructions.Quoted 152 lines · --- Jaap-Jan Boor
Prakash,
You should divide your flash into parts. e.g.:
- first block(s) boot
- then some blocks for the kernel
- all remaining blocks as root fsYou do this partitioning in the maps directory of
drivers/mtd.You can make a linux kernel with mtd and jffs2
support and ramdisk that
holds the erase, eraseall, dd, mkfs.jffs2 etc.
programs.You can load the kernel into SDRAM, run it, prepare your flash (erase flash, then use mkfs.jffs2 on a
/dev/mtd? device
to prepare an fs.You should then make a new kernel that uses mtd as rootfs, not
the ramdisk as rootfs.Jaap-Jan
Quoted 4 lines · Prakash kanthi
Hi Jaap Jan,
Thanks for your reply. What do you mean by 'works
out
Quoted 1 line
of the box with denx'? I see the code you referred
to
Quoted 4 lines
but not sure how to use it. I still have some
concerns. Like,1. How can i initially store the image into flash?
My
Quoted 4 lines
flash chip is on the board.
2. How can i boot linux from flash?3. Currently i have a 32MB SDRAM along with flash.
I
Quoted 1 line
have tools to download linux image into SDRAM.
Even if
Quoted 1 line
i go with MTD/JFFS, my concern is unless linux
runs
Quoted 4 lines
flash can not be accessed and vice versa.
4. Lets say, i download linux into a safe place in SDRAM, boot it and then access flash thru MTD/JFFS
and
Quoted 1 line
store linux image into flash. Even in this case,
what
Quoted 1 line
all i need to take care of for making my flash a
boot
Quoted 11 lines
device.
Any detailed documentation is appreciated.
Thanks,
PrakashQuoted 3 lines · --- Jaap-Jan Boor
Hi,
I use strata flash with MTD and JFSS2 as file
system
Quoted 1 line
Quoted 1 line
on top of it. Works out of the box with denx'
eldk
Quoted 2 lines
Quoted 2 lines
kernel and
toolchain. I've provided my own flash map butyou
Quoted 9 lines
Quoted 9 lines
can also use an existing one (look e.g. in
linux/drivers/mtd/maps)Jaap-Jan
Quoted 2 lines · Wolfgang Denk
In message
Quoted 3 lines
Quoted 3 lines
Quoted 2 lines · you
Quoted 2 lines
I have a 32MB Intel Strata flash on my
PPC405
Quoted 4 lines
Quoted 4 lines
based
Quoted 1 line
Quoted 1 line
custom board. I need to create access
routines/APIs to
Quoted 1 line
Quoted 1 line
access the flash. I was thinking of creating
a
Quoted 2 lines
Quoted 2 lines
Flash
Quoted 1 line
Quoted 1 line
File System and mount it as a device in
Linux
Quoted 9 lines
Quoted 9 lines
Quoted 3 lines
Quoted 3 lines
environment.
Are there any off the shelf FFS packages
available?
Quoted 5 lines
Quoted 1 line
Generally, how the flash is used?
Use the MTD layer.
Quoted 1 line
I am working with micro-monitor to use its
Tiny
Quoted 4 lines
Quoted 4 lines
File
Quoted 1 line
Quoted 1 line
System on flash support and eventually mount
into
Quoted 1 line
Quoted 1 line
linux. Did anyone use this combination
before?
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
I think you cannot do this. AFAIK the TFS code
is
Quoted 2 lines
Quoted 2 lines
not available under
Quoted 1 line
a GPL compatible license which prevents it
from
Quoted 11 lines
Quoted 11 lines
being linked with the
Quoted 8 lines
Linux kernel code.
Best regards,
Wolfgang Denk
--
Software Engineering: Embedded and RealtimeSystems, Embedded Linux
Quoted 1 line
Phone: (+49)-8142-4596-87 Fax:
(+49)-8142-4596-88
Quoted 2 lines
Quoted 2 lines
Email: [email protected]
Quoted 1 line
There is is no reason for any individual to
have a
Quoted 7 lines
Quoted 7 lines
computer in their
Quoted 1 line
home. -- Ken Olsen (President of Digital
Equipment Corporation),
Quoted 1 line
Convention of the World Future
Society, in Boston, 1977
Quoted 1 line
Quoted 8 lines
Quoted 8 lines
--
J.G.J. Boor
Room: BE-525
Lucent Technologies Nederland b.v.
Phone: +31 35 687 4721
Optical Networking Group TMS Data
Fax: +31 35 687 5976
P.O. Box 1168, 1200 BD, Hilversum, TheNetherlands
Quoted 2 lines
mailto:[email protected]
Quoted 8 lines
--
J.G.J. Boor
Room: BE-525
Lucent Technologies Nederland b.v.
Phone: +31 35 687 4721
Optical Networking Group TMS Data
Fax: +31 35 687 5976
P.O. Box 1168, 1200 BD, Hilversum, The Netherlands
Quoted 3 lines
mailto:[email protected]
Daris A Nevil
Simple Network Magic Corporation
401 Kentucky
McKinney, Texas 75069
http://www.snmc.com
972-562-3751
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/