summaryrefslogtreecommitdiff
path: root/nuttx/examples/nsh/README.txt
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2008-09-06 13:29:14 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2008-09-06 13:29:14 +0000
commitbf15faf28c3826541af41632784beaefdb9a2254 (patch)
tree693df9115f41cfdf1df8985ab608e34db7c5dc44 /nuttx/examples/nsh/README.txt
parent0d247e402ea9508b15e37fdd16d96e7d5ddd5498 (diff)
downloadpx4-nuttx-bf15faf28c3826541af41632784beaefdb9a2254.tar.gz
px4-nuttx-bf15faf28c3826541af41632784beaefdb9a2254.tar.bz2
px4-nuttx-bf15faf28c3826541af41632784beaefdb9a2254.zip
Add NSH command to create RAMDISK
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@884 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/examples/nsh/README.txt')
-rw-r--r--nuttx/examples/nsh/README.txt42
1 files changed, 41 insertions, 1 deletions
diff --git a/nuttx/examples/nsh/README.txt b/nuttx/examples/nsh/README.txt
index 1972b2b13..0c0bc2eba 100644
--- a/nuttx/examples/nsh/README.txt
+++ b/nuttx/examples/nsh/README.txt
@@ -325,6 +325,45 @@ o mkfifo <path>
brw-rw-rw- 0 ram0
nsh>
+o mkrd [-m <minor>] [-s <sector-size>] <nsectors>
+
+ Create a ramdisk consisting of <nsectors>, each of size
+ <sector-size> (or 512 bytes if <sector-size> is not specified.
+ The ramdisk will be registered as /dev/ram<n> (if <n> is not
+ specified, mkrd will attempt to register the ramdisk as
+ /dev/ram0.
+
+ Example:
+ ^^^^^^^^
+
+ nsh> ls /dev
+ /dev:
+ console
+ null
+ ttyS0
+ ttyS1
+ nsh> mkrd 1024
+ nsh> ls /dev
+ /dev:
+ console
+ null
+ ram0
+ ttyS0
+ ttyS1
+ nsh>
+
+ Once the ramdisk has been created, it may be formatted using
+ the mkfatfs command and mounted using the mount command.
+
+ Example:
+ ^^^^^^^^
+ nsh> mkrd 1024
+ nsh> mkfatfs /dev/ram0
+ nsh> mount -t vfat /dev/ram0 /tmp
+ nsh> ls /tmp
+ /tmp:
+ nsh>
+
o mount -t <fstype> <block-device> <dir-path>
The 'mount' command mounts a file system in the NuttX psuedo
@@ -543,7 +582,8 @@ Command Dependencies on Configuration Settings
mem ---
mkdir !CONFIG_DISABLE_MOUNTPOINT && CONFIG_NFILE_DESCRIPTORS > 0
mkfatfs !CONFIG_DISABLE_MOUNTPOINT && CONFIG_NFILE_DESCRIPTORS > 0 && CONFIG_FS_FAT
- mkfifo !CONFIG_DISABLE_MOUNTPOINT && CONFIG_NFILE_DESCRIPTORS > 0
+ mkfifo CONFIG_NFILE_DESCRIPTORS > 0
+ mkrd !CONFIG_DISABLE_MOUNTPOINT && CONFIG_NFILE_DESCRIPTORS > 0 && CONFIG_FS_FAT
mount !CONFIG_DISABLE_MOUNTPOINT && CONFIG_NFILE_DESCRIPTORS > 0 && CONFIG_FS_FAT
ping CONFIG_NET && CONFIG_NET_ICMP && CONFIG_NET_ICMP_PING && !CONFIG_DISABLE_CLOCK && !CONFIG_DISABLE_SIGNALS
ps --