3 configuring flash partition, 2 vga, lcd and sd card application – SLS Audio NEEK Board Support Package uClinux User Manual

Page 35

Advertising
background image

uClinux NEEK BSP

Network Utility

flash_erase device offset
number_of_blocks

Erases number of blocks of a device
starting from the given address.

e.g. : flash_erase /dev/mtd0 0x00000 5
.This command would erase 5 blocks of
mtdblock0 starting from the offset address
0x00000.

flash_eraseall /dev/mtdx

Erases all the contents of mtd device.

e.g. : flash_eraseall /dev/mtd0. This would
erases all the content from mtd device 0.

Note: here mtd0 means mtd device0 and
not mtdblock0. If you are not able to erase
the content and get the message “read
only file system
” then use the unlock
command mentioned above and after that
use eraseall.

mount -t jffs2 dev/mtdblockx /mnt

Mounts mtdblockx partition on the /mnt
directory. You can also use other directory
than /mnt
e.g. : mount –t jffs2 /dev/mtdblock2 /mnt

This would mount mtdblock2 on the mnt
directory.

Note: Erase entire flash before mounting
JFFS2 file system.

mkdir new

Creates a new directory

cp /new /dev/mtdx

Copies a new directory to mtdx.

e.g. : cp /new /dev/mtd0

lock /dev/mtdx

Locks all sectors of the mtd device.
e.g. : lock /dev/mtd0

This would locks all sectors of mtd device0.

Note:

(1). Where x=0, 1, 2.. mtd device or mtdblocks in the system.

(2). By default sectors of flash device are locked. So you can not write anything before
unlocking the flash device. Use unlock command to write on flash device.

5.1.3 Configuring Flash Partition

To configure the flash partition, either you can create your own mapping driver or
modify the partition with config.c file. Here config.c is the mapping driver for
mtd device. It is located at <path_to_dist>/linux-2.6/arch/nios2/kernel.

5.2 VGA, LCD and SD Card Application

To access the VGA, LCD and SD Card applications, select necessary drivers and
file systems for SD Card, VGA and LCD as mentioned in the

SLS SD Card IP

Driver

,

VFAT

and

SLS VGA IP Driver.

sections.

System Level Solutions

27

Advertising