From 91a21282b018ac9edb233241c789880d79d58a17 Mon Sep 17 00:00:00 2001 From: patacongo Date: Sat, 6 Sep 2008 13:29:14 +0000 Subject: [PATCH] Add NSH command to create RAMDISK git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@884 42af7a65-404d-4744-a932-0658087f49c3 --- Documentation/NuttShell.html | 112 +++++++++++++++++++++++++++-------- Documentation/NuttX.html | 4 +- 2 files changed, 90 insertions(+), 26 deletions(-) diff --git a/Documentation/NuttShell.html b/Documentation/NuttShell.html index 2c8d8e2fb1..fa8003a17c 100644 --- a/Documentation/NuttShell.html +++ b/Documentation/NuttShell.html @@ -179,73 +179,79 @@
- 2.18 Mount a File System (mount) + 2.18 Create a RAMDISK (mkrd)
- 2.19 Check Network Peer (ping) + 2.19 Mount a File System (mount)
- 2.20 Send File Via TFTP (put) + 2.20 Check Network Peer (ping)
- 2.21 Show Current Working Directory (pwd) + 2.21 Send File Via TFTP (put)
- 2.22 Remove a File (rm) + 2.22 Show Current Working Directory (pwd)
- 2.23 Remove a Directory (rmdir) + 2.23 Remove a File (rm)
- 2.24 Set an Environment Variable (set) + 2.24 Remove a Directory (rmdir)
- 2.25 Execute an NSH Script (sh) + 2.25 Set an Environment Variable (set)
- 2.26 Wait for Seconds (sleep) + 2.26 Execute an NSH Script (sh)
- 2.27 Unmount a File System (umount) + 2.27 Wait for Seconds (sleep)
- 2.28 Unset an Environment Variable (unset) + 2.28 Unmount a File System (umount)
- 2.29 Wait for Microseconds (usleep) + 2.29 Unset an Environment Variable (unset) + + + +
+ + 2.30 Wait for Microseconds (usleep) @@ -989,7 +995,58 @@ nsh> + +
-

2.18 Mount a File System (mount)

+

2.18 Create a RAMDISK (mkrd)

+
+ +

Command Syntax:

+ +

+ Synopsis. + 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

+ +

+ Once the ramdisk has been created, it may be formatted using + the mkfatfs command and mounted using the mount command. +

+

Example

+ + + + +
+

2.19 Mount a File System (mount)

@@ -1056,7 +1113,7 @@ nsh>
-

2.19 Check Network Peer (ping)

+

2.20 Check Network Peer (ping)

@@ -1089,7 +1146,7 @@ nsh>
-

2.20 Send File Via TFTP (put)

+

2.21 Send File Via TFTP (put)

@@ -1124,7 +1181,7 @@ put [-b|-n] [-f <remote-path>] -h <ip-address> <local-path>
-

2.21 Show Current Working Directory (pwd)

+

2.22 Show Current Working Directory (pwd)

@@ -1154,7 +1211,7 @@ nsh>
-

2.22 Remove a File (rm)

+

2.23 Remove a File (rm)

@@ -1188,7 +1245,7 @@ nsh>
-

2.23 Remove a Directory (rmdir)

+

2.24 Remove a Directory (rmdir)

@@ -1223,7 +1280,7 @@ nsh>
-

2.24 Set an Environment Variable (set)

+

2.25 Set an Environment Variable (set)

@@ -1249,7 +1306,7 @@ nsh>
-

2.25 Execute an NSH Script (sh)

+

2.26 Execute an NSH Script (sh)

@@ -1267,7 +1324,7 @@ sh <script-path>
-

2.26 Wait for Seconds (sleep)

+

2.27 Wait for Seconds (sleep)

@@ -1284,7 +1341,7 @@ sleep <sec>
-

2.27 Unmount a File System (umount)

+

2.28 Unmount a File System (umount)

@@ -1314,7 +1371,7 @@ nsh>
-

2.28 Unset an Environment Variable (unset)

+

2.29 Unset an Environment Variable (unset)

@@ -1340,7 +1397,7 @@ nsh>
-

2.29 Wait for Microseconds (usleep)

+

2.30 Wait for Microseconds (usleep)

@@ -1448,7 +1505,11 @@ usleep <usec> mkfifo - !CONFIG_DISABLE_MOUNTPOINT && CONFIG_NFILE_DESCRIPTORS > 0 + CONFIG_NFILE_DESCRIPTORS > 0 + + + mkrd + !CONFIG_DISABLE_MOUNTPOINT && CONFIG_NFILE_DESCRIPTORS > 0 && CONFIG_FS_FAT mount @@ -1711,6 +1772,7 @@ usleep <usec>
  • mkdir
  • mkfatfs
  • mkfifo
  • +
  • mkrd
  • mount
  • nice
  • OLDPWD
  • diff --git a/Documentation/NuttX.html b/Documentation/NuttX.html index 2e936dee9e..59f2afdf97 100644 --- a/Documentation/NuttX.html +++ b/Documentation/NuttX.html @@ -8,7 +8,7 @@

    NuttX RTOS

    -

    Last Updated: September 5, 2008

    +

    Last Updated: September 6, 2008

    @@ -1078,6 +1078,8 @@ nuttx-0.3.14 2008-xx-xx Gregory Nutt <spudmonkey@racsa.co.cr> * NSH: Created an HTML document and a more detailed README file describing NSH. * Added basic TFTP client logic (netutils/tftpc). Untested as of initial check-in. * NSH: Add get and put commands to support TFTP get and put operations. + * NSH: Added a mkrd command that will create a RAMDISK that can be formatted + and mounted. pascal-0.1.3 2008-xx-xx Gregory Nutt <spudmonkey@racsa.co.cr>