User applications, 1 flash and jffs2 application, 1 flash tools – SLS Audio NEEK Board Support Package uClinux User Manual
Page 34: 2 accessing flash and jffs2 applications

5. User Applications
Using the User Applications you can access the drivers, file systems and
peripherals available on the board. This chapter describes the following user
applications.
5.1 Flash and JFFS2 Application
To access Flash and JFFS2 application, include its driver and file system as
described in the section
5.1.1 Flash Tools
Select Customize Application/Library Settings>Flash tools. Select the options
as shown below.
Build the kernel as explained in the section
5.1.2 Accessing Flash and JFFS2 Applications
To access the Flash and JFFS2 in your application use the required commands as
described in the table below:
Table below lists Flash and JFFS2 commands along with the description.
Command
Description
cat /proc/mtd
Displays flash partitions.
cat /proc/mounts
Displays already mounted files.
ls -l /dev/mtd*
Lists mtdblocks and other details.
unlock /dev/mtdx
Unlocks all the sectors of mtd device. e.g.:
unlock /dev/mtd0, this will unlock all sectors
in mtd device0.
Flash Tools --->
--- MTD utils
[*] mtd-utils
[*] erase
[*] eraseall
[*] unlock
[*] lock
[*] mkfs.jff2
System Level Solutions
26