6 Software
User Manual 79/374
High Level Hardware Access
/usr/local/bin/nand_prepare.sh
This shell script prepares the NAND flash to
use it with UBIFS.
Assumptions:
the NAND is organized in one MDT
block with size 1GByte
flash will be attached to UBI device
/dev/ubi0
Following steps are done:
formatting the whole NAND flash to
use it with the UBI driver
WARNING:
All data on the flash are deleted.
creating one volume named
"dataflash" on the flash using all
available flash memory
/usr/local/bin/nand_mount.sh
This shell script attaches and mounts the
volume "dataflash" of the NAND flash to
/mnt/dataflash.
Assumption:
the NAND flash contains a volume
called "dataflash" (e.g. use
nand_prepare.sh to format flash and
create the volume)
mount point /mnt/dataflash must exist
/usr/local/bin/nand_ismounted.sh
This shell script checks if the NAND flash is
mounted to /mnt/dataflash.
p1:
< 0 > NAND flash is mounted
< 1 >NAND flash is NOT mounted
/usr/local/bin/nand_umount.sh
This shell script unmounts and detaches the
volume "dataflash" of the NAND flash on
/mnt/dataflash.