diff --git a/Documentation/NuttShell.html b/Documentation/NuttShell.html index d25d6d8c437..c017d6eca83 100644 --- a/Documentation/NuttShell.html +++ b/Documentation/NuttShell.html @@ -67,6 +67,12 @@ 1.6 Environment Variables + +
+ + 1.7 NSH Start-Up Script + + @@ -470,6 +476,129 @@ fi + + + + +
+

1.7 NSH Start-Up Scrip

+
+ +

+ NSH Start-Up Script. + NSH supports options to provide a start up script for NSH. In general + this capability is enabled with CONFIG_EXAMPLES_NSH_ROMFSETC, but has + several other related configuration options as described with the + NSH-specific configuration settings. + This capability also depends on: +

+

+ +

+ Default Start-Up Behavior. + The implementation that is provided is intended to provide great flexibility + for the use of Start-Up files. This paragraph will discuss the general + behavior when all of the configuration options are set to the default + values. +

+

+ In this default case, enabling CONFIG_EXAMPLES_NSH_ROMFSETC will cause + NSH to behave as follows at NSH startup time: +

+

+

+ Modifying the ROMFS Image. + The contents of the /etc directory are retained in the file + examples/nsh/nsh_romfsimg.h. In order to modify the start-up + behavior, there are three things to study: +

    +
  1. + Configuration Options. + The additional CONFIG_EXAMPLES_NSH_ROMFSETC configuration options + discussed with the other NSH-specific configuration settings. +
  2. +
  3. +

    + mkromfsimg.sh Script. + The script examples/nsh/mkromfsimg.sh creates nsh_romfsimg.h. + It is not automatically executed. If you want to change the + configuration settings associated with creating and mounting + the /tmp directory, then it will be necessary to re-generate + this header file using the mkromfsimg.sh script. +

    +

    + The behavior of this script depends upon three things: +

    +

    +
  4. +
  5. + rcS.template. + The file examples/nsh/rcS.template contains the general form + of the rcS file; configurated values are plugged into this + template file to produce the final rcS file. +
  6. +
+

+

+ All of the startup-behavior is contained in rcS.template. The + role of mkromfsimg.sh is to (1) apply the specific configuration + settings to rcS.template to create the final rcS, and (2) to + generate the header file nsh_romfsimg.h containg the ROMFS + file system image. +

+ @@ -1691,6 +1820,15 @@ nsh> where a minimal footprint is a necessity and background command execution is not. + + + + +
@@ -1641,7 +1770,7 @@ nsh> CONFIG_EXAMPLES_NSH_FILEIOSIZE Size of a static I/O buffer used for file access (ignored if - there is no filesystem). + there is no filesystem). Default is 1024.
CONFIG_EXAMPLES_NSH_ROMFSETC + Mount a ROMFS filesystem at /etc and provide a startup script + at /etc/init.d/rcS. The default startup script will mount + a FAT FS RAMDISK at /tmp but the logic is + easily extensible. +
CONFIG_EXAMPLES_NSH_CONSOLE @@ -1720,6 +1858,7 @@ nsh> Configuration Description
CONFIG_EXAMPLES_NSH_IOBUFFER_SIZE Determines the size of the I/O buffer to use for sending/ @@ -1760,6 +1899,76 @@ nsh>
+

+ If CONFIG_EXAMPLES_NSH_ROMFSETC is selected, then the following additional + configuration setting apply: +

+ +
+ + + + + + + + + + + + + + + + + + + + +
ConfigurationDescription
CONFIG_EXAMPLES_NSH_ROMFSMOUNTPT + The default mountpoint for the ROMFS volume is "/etc", but that + can be changed with this setting. This must be a absolute path + beginning with '/' and enclosed in quotes. +
CONFIG_EXAMPLES_NSH_INITSCRIPT + This is the relative path to the startup script within the mountpoint. + The default is "init.d/rcS". This is a relative path and must not + start with '/' but must be enclosed in quotes. +
CONFIG_EXAMPLES_NSH_ROMFSDEVNO + This is the minor number of the ROMFS block device. The default is + '0' corresponding to /dev/ram0. +
CONFIG_EXAMPLES_NSH_ROMFSSECTSIZE + This is the sector size to use with the ROMFS volume. Since the + default volume is very small, this defaults to 64 but should be + increased if the ROMFS volume were to be become large. Any value + selected must be a power of 2. +
+ +

+ When the default rcS file used when CONFIG_EXAMPLES_NSH_ROMFSETC is + selected, it will mount a FAT FS under /tmp. The following selections + describe that FAT FS. +

+ +
+ + + + + + + + + + + + +
ConfigurationDescription
CONFIG_EXAMPLES_NSH_FATDEVNO + This is the minor number of the FAT FS block device. The default is + '1' corresponding to /dev/ram1. +
CONFIG_EXAMPLES_NSH_FATSECTSIZE + This is the sector size use with the FAT FS. Default is 512. +
+ + -
@@ -1785,13 +1994,22 @@ nsh>
  • CONFIG_EXAMPLES_NSH_DISABLEBG
  • CONFIG_EXAMPLES_NSH_DISABLESCRIPT
  • CONFIG_EXAMPLES_NSH_DRIPADDR
  • +
  • CONFIG_EXAMPLES_NSH_FATDEVNO
  • +
  • CONFIG_EXAMPLES_NSH_FATMOUNTPT
  • +
  • CONFIG_EXAMPLES_NSH_FATNSECTORS
  • +
  • CONFIG_EXAMPLES_NSH_FATSECTSIZE
  • CONFIG_EXAMPLES_NSH_FILEIOSIZE
  • +
  • CONFIG_EXAMPLES_NSH_INITSCRIPT
  • CONFIG_EXAMPLES_NSH_IOBUFFER_SIZE
  • CONFIG_EXAMPLES_NSH_IPADDR
  • CONFIG_EXAMPLES_NSH_LINELEN
  • CONFIG_EXAMPLES_NSH_NESTDEPTH
  • CONFIG_EXAMPLES_NSH_NETMASK
  • CONFIG_EXAMPLES_NSH_NOMAC
  • +
  • CONFIG_EXAMPLES_NSH_ROMFSDEVNO
  • +
  • CONFIG_EXAMPLES_NSH_ROMFSETC
  • +
  • CONFIG_EXAMPLES_NSH_ROMFSMOUNTPT
  • +
  • CONFIG_EXAMPLES_NSH_ROMFSSECTSIZE
  • CONFIG_EXAMPLES_NSH_STACKSIZE
  • CONFIG_EXAMPLES_NSH_STRERROR
  • CONFIG_EXAMPLES_NSH_TELNET
  • @@ -1802,11 +2020,12 @@ nsh>
  • Current working directory
  • echo
  • Environment Variables
  • +
  • /etc/init.d/rcS +
  • exec
  • exit
  • get
  • -
  • Greeting
  • help
  • if-then[-else]-fi
  • @@ -1837,6 +2056,7 @@ nsh>
  • sh
  • Simple commands
  • sleep
  • +
  • start-up script
  • test
  • umount
  • unset
  • diff --git a/Documentation/NuttX.html b/Documentation/NuttX.html index 62068e2c2e2..3ee7c80b71f 100644 --- a/Documentation/NuttX.html +++ b/Documentation/NuttX.html @@ -8,7 +8,7 @@

    NuttX RTOS

    -

    Last Updated: September 10, 2008

    +

    Last Updated: September 11, 2008

    @@ -1099,6 +1099,7 @@ buildroot-0.1.0 2007-03-09 <spudmonkey@racsa.co.cr> nuttx-0.3.15 2008-xx-xx Gregory Nutt <spudmonkey@racsa.co.cr> * Added support for ROMFS filesystem. * Added a simple test the ROMFS filesystem (examples/romfs) + * NSH: Use ROMFS to provide an option for a start-up script at /etc/init.d/rcS pascal-0.1.3 2008-xx-xx Gregory Nutt <spudmonkey@racsa.co.cr>