diff --git a/Documentation/NuttShell.html b/Documentation/NuttShell.html
index db460e48b21..edac2a9583c 100644
--- a/Documentation/NuttShell.html
+++ b/Documentation/NuttShell.html
@@ -8,7 +8,7 @@
NuttShell (NSH)
- Last Updated: November 28, 2015
+ Last Updated: December 13, 2015
|
@@ -85,7 +85,7 @@
2.0 Commands.
|
-
+>
|
@@ -239,199 +239,217 @@
|
|
- 2.26 Send a signal to a task (kill)
+ 2.26 Install an OS module (insmod)
|
|
- 2.27 Setup/teardown the Loop Device (losetup)
+ 2.27 Send a signal to a task (kill)
|
|
- 2.28 List Directory Contents (ls)
+ 2.28 Setup/teardown the Loop Device (losetup)
|
|
- 2.29 Calculate MD5 (md5)
+ 2.29 List Directory Contents (ls)
|
|
- 2.30 Access Memory (mb, mh, and mw)
+ 2.30 Show information about installed OS modules (lsmod)
|
|
- 2.31 Show Current Tasks and Threads (ps)
+ 2.31 Calculate MD5 (md5)
|
|
- 2.32 Create a Directory (mkdir)
+ 2.32 Access Memory (mb, mh, and mw)
|
|
- 2.33 Create a FAT Filesystem (mkfatfs)
+ 2.33 Show Current Tasks and Threads (ps)
|
|
- 2.34 Create a FIFO (mkfifo)
+ 2.34 Create a Directory (mkdir)
|
|
- 2.35 Create a RAMDISK (mkrd)
+ 2.35 Create a FAT Filesystem (mkfatfs)
|
|
- 2.36 Mount a File System (mount)
+ 2.36 Create a FIFO (mkfifo)
|
|
- 2.37 Rename a File (mv)
+ 2.37 Create a RAMDISK (mkrd)
|
|
- 2.38 Mount an NFS file system (nfsmount)
+ 2.38 Mount a File System (mount)
|
|
- 2.39 Lookup a network address (nslookup)
+ 2.39 Rename a File (mv)
|
|
- 2.40 Check Network Peer (ping/ping6)
+ 2.40 Mount an NFS file system (nfsmount)
|
|
- 2.41 Shut the system down (poweroff)
+ 2.41 Lookup a network address (nslookup)
|
|
- 2.42 Send File Via TFTP (put)
+ 2.42 Check Network Peer (ping/ping6)
|
|
- 2.43 Show Current Working Directory (pwd)
+ 2.43 Shut the system down (poweroff)
|
|
- 2.44 Reset and reboot the system (reboot)
+ 2.44 Send File Via TFTP (put)
|
|
- 2.45 Remove a File (rm)
+ 2.45 Show Current Working Directory (pwd)
|
|
- 2.46 Remove a Directory (rmdir)
+ 2.46 Reset and reboot the system (reboot)
|
|
- 2.47 Set an Environment Variable (set)
+ 2.47 Remove a File (rm)
|
|
- 2.48 Execute an NSH Script (sh)
+ 2.48 Remove a Directory (rmdir)
|
|
- 2.49 Shut the system down (shutdown)
+ 2.49 Remove on OS Module (rmmod)
|
|
- 2.50 Wait for Seconds (sleep)
+ 2.50 Set an Environment Variable (set)
|
|
- 2.51 Unmount a File System (umount)
+ 2.51 Execute an NSH Script (sh)
|
|
- 2.52 Print system information (uname)
+ 2.52 Shut the system down (shutdown)
|
|
- 2.53 Unset an Environment Variable (unset)
+ 2.53 Wait for Seconds (sleep)
|
|
- 2.54 URL Decode (urldecode)
+ 2.54 Unmount a File System (umount)
|
|
- 2.55 URL Encode (urlencode)
+ 2.55 Print system information (uname)
|
|
- 2.56 Wait for Microseconds (usleep)
+ 2.56 Unset an Environment Variable (unset)
|
|
- 2.57 Get File Via HTTP (wget)
+ 2.57 URL Decode (urldecode)
|
|
- 2.58 Hexadecimal Dump of Memory (xd)
+ 2.58 URL Encode (urlencode)
+ |
+
+
+
|
+
+ 2.59 Wait for Microseconds (usleep)
+ |
+
+
+
|
+
+ 2.60 Get File Via HTTP (wget)
+ |
+
+
+
|
+
+ 2.61 Hexadecimal Dump of Memory (xd)
|
@@ -1682,11 +1700,55 @@ ifup eth0
+Command Syntax:
+
+insmod <file-path> <module-name>
+
+
+ Synopsis.
+ Install the loadable OS module at <file-path> as module <module-name>.
+
+Example:
+
+nsh> ls -l /mnt/romfs
+/mnt/romfs:
+ dr-xr-xr-x 0 .
+ -r-xr-xr-x 9153 chardev
+nsh> ls -l /dev
+/dev:
+ crw-rw-rw- 0 console
+ crw-rw-rw- 0 null
+ brw-rw-rw- 0 ram0
+ crw-rw-rw- 0 ttyS0
+nsh> lsmod
+NAME INIT UNINIT ARG TEXT SIZE DATA SIZE
+nsh> insmod /mnt/romfs/chardev mydriver
+nsh> ls -l /dev
+/dev:
+ crw-rw-rw- 0 chardev
+ crw-rw-rw- 0 console
+ crw-rw-rw- 0 null
+ brw-rw-rw- 0 ram0
+ crw-rw-rw- 0 ttyS0
+nsh> lsmod
+NAME INIT UNINIT ARG TEXT SIZE DATA SIZE
+mydriver 20404659 20404625 0 20404580 552 204047a8 0
+
+
+
+
+Command Syntax:
kill -<signal> <pid>
@@ -1694,6 +1756,7 @@ kill -<signal> <pid>
Synopsis.
Send the <signal> to the task identified by <pid>.
+Example:
nsh> mkfifo /dev/fifo
nsh> cat /dev/fifo &
@@ -1722,7 +1785,7 @@ nsh>
@@ -1775,7 +1838,7 @@ losetup d <dev-path>
@@ -1809,10 +1872,44 @@ ls [-lRs] <dir-path>
+
+
+Command Syntax:
+
+lsmod
+
+
+ Synopsis.
+ Show information about the currently installed OS modules. This information includes:
+
+
+ - The module name assigned to the module when it was installed (NAME).
+ - The address of the module initialization function (INIT).
+ - The address of the module un-initialization function (UNINIT).
+ - An argument that will be passed to the module un-initialization function (ARG).
+ - The start of the .text memory region (TEXT).
+ - The size of the .text memory region size (SIZE).
+ - The start of the .bss/.data memory region (DATA).
+ - The size of the .bss/.data memory region size (SIZE).
+
+Example:
+
+nsh> lsmod
+NAME INIT UNINIT ARG TEXT SIZE DATA SIZE
+mydriver 20404659 20404625 0 20404580 552 204047a8 0
+
+
+
@@ -1829,7 +1926,7 @@ md5 [-f] <string or filepath>
@@ -1883,7 +1980,7 @@ nsh>
@@ -1917,7 +2014,7 @@ nsh> mount -t procfs /proc
@@ -1952,7 +2049,7 @@ nsh>
@@ -1977,7 +2074,7 @@ mkfatfs [-F <fatsize>] <block-driver>
@@ -2015,7 +2112,7 @@ nsh>
@@ -2066,7 +2163,7 @@ nsh>
@@ -2145,7 +2242,7 @@ nsh> mount
@@ -2163,7 +2260,7 @@ mv <old-path> <new-path>
@@ -2182,7 +2279,7 @@ nfsmount <server-address> <mount-point> <remote-path>
@@ -2199,7 +2296,7 @@ nslookup <host-name>
@@ -2236,7 +2333,7 @@ nsh>
@@ -2258,7 +2355,7 @@ poweroff
@@ -2293,7 +2390,7 @@ put [-b|-n] [-f <remote-path>] -h <ip-address> <local-path>
@@ -2323,7 +2420,7 @@ nsh>
@@ -2345,7 +2442,7 @@ reboot
@@ -2379,7 +2476,7 @@ nsh>
@@ -2414,7 +2511,35 @@ nsh>
+
+Command Syntax:
+
+rmmod <module-name>
+
+
+ Synopsis.
+ Remove the loadable OS module with the <module-name>.
+ NOTE: An OS module can only be removed if it is not busy.
+
+Example:
+
+nsh> lsmod
+NAME INIT UNINIT ARG TEXT SIZE DATA SIZE
+mydriver 20404659 20404625 0 20404580 552 204047a8 0
+nsh> rmmod mydriver
+nsh> lsmod
+NAME INIT UNINIT ARG TEXT SIZE DATA SIZE
+nsh>
+
+
+
@@ -2440,7 +2565,7 @@ nsh>
@@ -2459,7 +2584,7 @@ sh <script-path>
@@ -2480,7 +2605,7 @@ shutdown [--reboot]
@@ -2497,7 +2622,7 @@ sleep <sec>
@@ -2527,7 +2652,7 @@ nsh>
@@ -2594,7 +2719,7 @@ uname [-a | -imnoprsv]
@@ -2620,7 +2745,7 @@ nsh>
@@ -2637,7 +2762,7 @@ urldecode [-f] <string or filepath>
@@ -2654,7 +2779,7 @@ urlencode [-f] <string or filepath>
@@ -2671,7 +2796,7 @@ usleep <usec>
@@ -2698,7 +2823,7 @@ wget [-o <local-path>] <url>
@@ -2887,6 +3012,11 @@ nsh>
CONFIG_NET && CONFIG_FS_PROCFS && !CONFIG_FS_PROCFS_EXCLUDE_NET |
CONFIG_NSH_DISABLE_IFUPDOWN |
+
+ insmod |
+ CONFIG_MODULE |
+ CONFIG_NSH_DISABLE_MODCMDS |
+
kill |
!CONFIG_DISABLE_SIGNALS |
@@ -2902,6 +3032,11 @@ nsh>
CONFIG_NFILE_DESCRIPTORS > 0 |
CONFIG_NSH_DISABLE_LS |
+
+ lsmod |
+ CONFIG_MODULE && CONFIG_FS_PROCFS && !CONFIG_FS_PROCFS_EXCLUDE_MODULE |
+ CONFIG_NSH_DISABLE_MODCMDS |
+
md5 |
CONFIG_NETUTILS_CODECS && CONFIG_CODECS_HASH_MD5 |
@@ -3004,6 +3139,11 @@ nsh>
(((!CONFIG_DISABLE_MOUNTPOINT && CONFIG_FS_WRITABLE) || !CONFIG_DISABLE_PSEUDOFS_OPERATIONS) && CONFIG_NFILE_DESCRIPTORS > 0)4 |
CONFIG_NSH_DISABLE_RMDIR |
+
+ rmmod |
+ CONFIG_MODULE |
+ CONFIG_NSH_DISABLE_MODCMDS |
+
set |
!CONFIG_DISABLE_ENVIRON |
@@ -4472,10 +4612,10 @@ mount -t vfat /dev/ram1 /tmp
CONFIG_NSH_READLINE
CONFIG_NSH_ROMFSDEVNO
CONFIG_NSH_ROMFSETC
+ CONFIG_NSH_ROMFSETC
|