Jffs2 Support; Flashing Images; Flashing New Images - Philips LPC3180 Application Note

Getting started linux with
Table of Contents

Advertisement

Philips Semiconductors
~ # 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
while the end is
In U-Boot type:
nand erase 0x01000000 0x00F00000
The JFFS2 file system cannot be flashed with U-Boot, but must be copied to
when Linux is running (and a remote file system has been mounted over NFS), e.g.:
cp
or
cp
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
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
the image directory is set correctly in
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
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
<12NC>
Application note
0x01f00000.
./mynfs/nand0.jffs2 /dev/mtd0
./usbdisk/nand0.jffs2 /dev/mtd0
–d ./your_directory
'stop'
'fr, fu, and fk'
Rev.03 — 21 Dec 2006
Getting started Linux with LPC3180
–o nand0.jffs
'uboot_phytec.inc'
'uboot_phytec.inc'
and e.g.:
.
AN10476
0x01000000
/dev/mtd0
file from the
(make sure
'/rv'
).
© Koninklijke Philips Electronics N.V. 2004. All rights reserved.
15 of 28

Advertisement

Table of Contents
loading

Table of Contents