From bf15faf28c3826541af41632784beaefdb9a2254 Mon Sep 17 00:00:00 2001 From: patacongo Date: Sat, 6 Sep 2008 13:29:14 +0000 Subject: Add NSH command to create RAMDISK git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@884 42af7a65-404d-4744-a932-0658087f49c3 --- nuttx/examples/nsh/README.txt | 42 +++++++++++++++++++++++++++++++++++++++++- 1 file changed, 41 insertions(+), 1 deletion(-) (limited to 'nuttx/examples/nsh/README.txt') 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 brw-rw-rw- 0 ram0 nsh> +o mkrd [-m ] [-s ] + + Create a ramdisk consisting of , each of size + (or 512 bytes if is not specified. + The ramdisk will be registered as /dev/ram (if 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 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 -- -- cgit v1.2.3