Specifications

d 13
e 14
f 15
__EOD__
chmod 0666 /tmpfs/dev/*
Like we did for the ramdisk, we now create an ext2 file system image using the genext2fs tool:
$ ROOTFS_DIR=rootfs # directory with root file system content
$ ROOTFS_SIZE=3700 # size of file system image
$ ROOTFS_FREE=100 # free space wanted
$ ROOTFS_INODES=380 # number of inodes
$ ROOTFS_DEVICES=rootfs_devices.tab # device description file
$ ROOTFS_IMAGE=ext2.img # generated file system image
$ genext2fs -U \
-d ${ROOTFS_DIR} \
-D ${ROOTFS_DEVICES} \
-b ${ROOTFS_SIZE} \
-r ${ROOTFS_FREE} \
-i ${ROOTFS_INODES} \
${ROOTFS_IMAGE}
3.
We can again use the same setup as before for the JFFS2 filesystem, just changing the boot argument
to "rootfstype=ext2" (or simply omit it completely as this is the default anyway), and we must
change the "rw" argument into "ro" to mount our root file system really read-only:
...
Linux version 2.4.25 (wd@xpert) (gcc version 3.3.3 (DENX ELDK 3.1.1 3.3.3-9)) #1 Sun Jun 12 18:32:18 MEST 2005
On node 0 totalpages: 4096
zone(0): 4096 pages.
zone(1): 0 pages.
zone(2): 0 pages.
Kernel command line: root=/dev/mtdblock6 ro rootfstype=ext2 ip=192.168.3.80:192.168.3.1::255.255.255.0:tqm860l:eth1:off panic=1
Decrementer Frequency = 187500000/60
Calibrating delay loop... 49.86 BogoMIPS
...
4.
9.5.5. Root File System on a Flash Card
Using an ext2 file system on a flash memory card (like CompactFlash, SD, MMC or a USB memory stick)
is standard technology. To avoid unnecessary flash wear it is a good idea to mount the root file system
read-only, or at least using the "noatime" mount option.
For our test we can use the "ext2.img" file from the previous step without changes:
In this test we use a standard CompactFlash card which comes with a single partition on it. We use
U-Boot to copy the ext2 file system image into this partition:
=> tftp 100000 /tftpboot/TQM860L/ext2.img
Using FEC ETHERNET device
TFTP from server 192.168.3.1; our IP address is 192.168.3.80
Filename '/tftpboot/TQM860L/ext2.img'.
Load address: 0x100000
Loading: #################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
1.
9.5.5. Root File System on a Flash Card 120