Philips Semiconductors
AN10476
Getting started Linux with LPC3180
~ # mkdir /mnt/mynfs
~ # mount -o nolock -t nfs 192.168.0.123:/usr/lucy/Linux/fs/rootfs/ /mnt/mynfs
The NFS is a good method for application debugging. User can compile the program in
host PC Linux environment and then mount the related directory ($NFS_HOST) to the
real board environment ($NFS_WORK_PATH). Then the program can be executed in
the local directory $NFS_WORK_PATH.
4.5.2 JFFS2
support
JFFS2 support is by default enabled in the provided kernel, and all required modules are
loaded at boot-time. When you want to add a JFFS2 flash file system, you will have to
make some space in NAND flash (15 MB). The start offset of the JFFS2 is
0x01000000
while the end is
0x01f00000.
In U-Boot type:
nand erase 0x01000000 0x00F00000
The JFFS2 file system cannot be flashed with U-Boot, but must be copied to
/dev/mtd0
when Linux is running (and a remote file system has been mounted over NFS), e.g.:
cp ./mynfs/nand0.jffs2 /dev/mtd0
or
cp ./usbdisk/nand0.jffs2 /dev/mtd0
Now you can add a new JFFS2 mount point:
mkdir /mnt/nand0
mount -t jffs2 /dev/mtdblock0 /mnt/nand0
A new JFFS2 file system can be easily made in your PC Linux environment by using
(should be one line):
mkfs.jffs2 –-eraseblock=0x20000 -–pad=0x01e00000 –n
–d ./your_directory –o nand0.jffs
Note, that the directory contents must not exceed 15 MB. The final JFFS2 image will
always be 15 MB in size.
‘Appendix A Default Flash Layout’ can give you an impression about the JFFS2 location
in the NAND flash device.
5. Flashing
images
5.1 Flashing new images
We use Realview and U-boot to flash new image files.
In the RealView debugger load the
‘uboot_phytec.inc’
file from the
’/rv’
(make sure
the image directory is set correctly in
‘uboot_phytec.inc’
).
U-Boot is started automatically. In the serial terminal window press enter to stop auto-
boot.
Stop the target and download new images to SDRAM for later flash programming usage.
In the debugger, type
‘stop’
and e.g.:
readfile,raw,gui "d:\Linux\Images\rootfs_phytec.ubt"=0x80000000
readfile,raw,gui "d:\Linux\Images\uboot_phytec.ubt"=0x80900000
readfile,raw,gui "d:\Linux\Images\uImage_phytec.ubt"=0x80600000
Or use the aliases
‘fr, fu, and fk’
.
<12NC>
© Koninklijke Philips Electronics N.V. 2004. All rights reserved.
Application note
Rev.03 — 21 Dec 2006
15 of 28