4 Supported File Systems
Linux Software Developers Kit (SDK) User Guide
28
ROMFS being a read-only file system, makes it easy to guarantee its integrity during runtime.
On the other hand, all variable data like configuration files that might need to be updated
during runtime need to be stored on a separate file system.
All applications in ROMFS can be run with XIP: eXecute In Place (set romfs_flash to on in
dBug) – see (
www.ucdot.org/article.pl?sid=02/08/28/0434210&mode=thread
All applications in the distribution get compiled with the XIP flag set by default.
Configure the Boot Loader for ROMFS as Root Partition
To tell µClinux kernel to look for a ROMFS root file system, the kernel command line (kcl) has to
be set accordingly. To validate this, boot the target into dBUG and issue the following:
dBUG> show
watchdog:
on
silentboot:
off
romfs_flash:
off
bootbank:
Single
safebank:
0
netcon:
on
tftpsrv:
on
base:
16
baud:
115200
autoboot:
Stop at prompt
server:
172.19.239.1
client:
172.19.239.77
gateway:
172.19.0.1
netmask:
255.255.0.0
filename:
/tftpboot/image.bin
filetype:
Image
ethaddr:
00:20:4A:80:8C:7E
dns:
172.19.1.1
bootfc:
0
maxbootfc:
off
kcl:
rootfstype=romfs
If kcl is not set to
rootfstype=romfs
it can be fixed by issuing the command
dBUG> set kcl rootfstype=romfs
and the target will try to mount the ROMFS.
JFFS2
What Does JFFS2 Offer
JFFS2 is a sophisticated writeable log-structured file system that supports wear-leveling. JFFS2
does not support XIP. One disadvantage of having a JFFS2 root file system is that it is extremely
difficult to upgrade the firmware from within Linux without sufficient flash space (see Chapter 13
). At minimum, the configuration files should be stored in a separate file system
that does not get overwritten by a firmware update.
UBIFS, LogFS, and YAFFS are promising new file systems trying to become the heir to JFFS2.
They attempt to resolve many of its shortcomings.