Add support for platoform specific ROMFS startup files

git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3350 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
patacongo 2011-03-08 00:27:35 +00:00
parent aeef4c3db0
commit 0f1b3c978a

View File

@ -8,7 +8,7 @@
<tr align="center" bgcolor="#e4e4e4"> <tr align="center" bgcolor="#e4e4e4">
<td> <td>
<h1><big><font color="#3c34ec"><i>NuttShell (NSH)</i></font></big></h1> <h1><big><font color="#3c34ec"><i>NuttShell (NSH)</i></font></big></h1>
<p>Last Updated: March 1, 2011</p> <p>Last Updated: March 7, 2011</p>
</td> </td>
</tr> </tr>
</table> </table>
@ -580,9 +580,8 @@ mount -t vfat /dev/ram1 /tmp
</p> </p>
<p> <p>
<b>Modifying the ROMFS Image</b>. <b>Modifying the ROMFS Image</b>.
The contents of the <code>/etc</code> directory are retained in the file The contents of the <code>/etc</code> directory are retained in the file <code>examples/nsh/nsh_romfsimg.h</code> OR, if <code>CONFIG_EXAMPLES_NSH_ARCHROMFS</code> is defined, <code>include/arch/board/rcs.template</code>).
<code>examples/nsh/nsh_romfsimg.h</code>. In order to modify the start-up In order to modify the start-up behavior, there are three things to study:
behavior, there are three things to study:
<ol> <ol>
<li> <li>
<b>Configuration Options.</b> <b>Configuration Options.</b>
@ -591,30 +590,37 @@ mount -t vfat /dev/ram1 /tmp
</li> </li>
<li> <li>
<p> <p>
<b><code>mkromfsimg.sh</code> Script</b>. <b><code>tools/mkromfsimg.sh</code> Script</b>.
The script <code>examples/nsh/mkromfsimg.sh</code> creates <code>nsh_romfsimg.h</code>. The script <code>tools/mkromfsimg.sh</code> creates <code>nsh_romfsimg.h</code>.
It is not automatically executed. If you want to change the It is not automatically executed. If you want to change the
configuration settings associated with creating and mounting configuration settings associated with creating and mounting
the <code>/tmp</code> directory, then it will be necessary to re-generate the <code>/tmp</code> directory, then it will be necessary to re-generate
this header file using the <code>mkromfsimg.sh</code> script. this header file using the <code>tools/mkromfsimg.sh</code> script.
</p> </p>
<p> <p>
The behavior of this script depends upon three things: The behavior of this script depends upon three things:
<ul> <ul>
<li>The configuration settings then installed configuration. <li>The configuration settings then installed configuration.
<li>The <code>genromfs<code> tool (available from <a href="http://romfs.sourceforge.net">http://romfs.sourceforge.net</a>). <li>The <code>genromfs<code> tool (available from <a href="http://romfs.sourceforge.net">http://romfs.sourceforge.net</a>).
<li>The file <code>examples/nsh/rcS.template</code>. <li>The file <code>examples/nsh/rcS.template</code>
(OR, if <code>CONFIG_EXAMPLES_NSH_ARCHROMFS</code> is defined <code>include/arch/board/rcs.template</code>.
</ul> </ul>
</p> </p>
</li> </li>
<li> <li>
<b><code>rcS.template</code></b>. <b><code>rcS.template</code></b>.
The file <code>examples/nsh/rcS.template</code> contains the general form The file <code>examples/nsh/rcS.template</code> contains the general form
of the <code>rcS</code> file; configurated values are plugged into this of the <code>rcS</code> file; configured values are plugged into this
template file to produce the final <code>rcS</code> file. template file to produce the final <code>rcS</code> file.
</li> </li>
</ol> </ol>
</p> </p>
<p>
<b>NOTE</b>:
<code>examples/nsh/rcS.template</code> generates the standard, default <code>nsh_romfsimg.h</code> file.
If <code>CONFIG_EXAMPLES_NSH_ARCHROMFS<code> is defined in the NuttX configuration file, then a custom, board-specific <code>nsh_romfsimg.h</code> file residing in <code>configs/&lt;board&gt;/include</code> will be used.
NOTE when the OS is configured, <code>include/arch/board</code> will be linked to <code>configs/&lt;board&gt;/include</code>.
</p>
<p> <p>
All of the startup-behavior is contained in <code>rcS.template</code>. The All of the startup-behavior is contained in <code>rcS.template</code>. The
role of <code>mkromfsimg.sh</code> is to (1) apply the specific configuration role of <code>mkromfsimg.sh</code> is to (1) apply the specific configuration
@ -2254,6 +2260,12 @@ nsh>
<th align="left" width="25%">Configuration</th> <th align="left" width="25%">Configuration</th>
<th align="left">Description</th> <th align="left">Description</th>
</tr> </tr>
<tr>
<td valign="top"><b><code>CONFIG_EXAMPLES_NSH_ARCHROMFS</code></b></td>
<td>
May be defined to specify an alternative ROMFS image that can be found at <code>configs/&lt;board&gt;/include/nsh_romfsimg.h</code>.
</td>
</tr>
<tr> <tr>
<td valign="top"><b><code>CONFIG_EXAMPLES_NSH_ROMFSMOUNTPT</code></b></td> <td valign="top"><b><code>CONFIG_EXAMPLES_NSH_ROMFSMOUNTPT</code></b></td>
<td> <td>
@ -2353,6 +2365,7 @@ nsh>
<li><a href="#nshconfiguration"><code>CONFIG_EXAMPLES_NSH_NOMAC</code></a></li> <li><a href="#nshconfiguration"><code>CONFIG_EXAMPLES_NSH_NOMAC</code></a></li>
<li><a href="#nshconfiguration"><code>CONFIG_EXAMPLES_NSH_ROMFSDEVNO</code></a></li> <li><a href="#nshconfiguration"><code>CONFIG_EXAMPLES_NSH_ROMFSDEVNO</code></a></li>
<li><a href="#nshconfiguration"><code>CONFIG_EXAMPLES_NSH_ROMFSETC</code></a></li> <li><a href="#nshconfiguration"><code>CONFIG_EXAMPLES_NSH_ROMFSETC</code></a></li>
<li><a href="#nshconfiguration"><code>CONFIG_EXAMPLES_NSH_ARCHROMFS</code></a></li>
<li><a href="#nshconfiguration"><code>CONFIG_EXAMPLES_NSH_ROMFSMOUNTPT</code></a></li> <li><a href="#nshconfiguration"><code>CONFIG_EXAMPLES_NSH_ROMFSMOUNTPT</code></a></li>
<li><a href="#nshconfiguration"><code>CONFIG_EXAMPLES_NSH_ROMFSSECTSIZE</code></a></li> <li><a href="#nshconfiguration"><code>CONFIG_EXAMPLES_NSH_ROMFSSECTSIZE</code></a></li>
<li><a href="#nshconfiguration"><code>CONFIG_EXAMPLES_NSH_STACKSIZE</code></a></li> <li><a href="#nshconfiguration"><code>CONFIG_EXAMPLES_NSH_STACKSIZE</code></a></li>