⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 exec-command.html

📁 有关ecos2。0介绍了实时嵌入式的结构以及线程调度的实现和内存的管理等
💻 HTML
字号:
<!-- Copyright (C) 2003 Red Hat, Inc.                                --><!-- This material may be distributed only subject to the terms      --><!-- and conditions set forth in the Open Publication License, v1.0  --><!-- or later (the latest version is presently available at          --><!-- http://www.opencontent.org/openpub/).                           --><!-- Distribution of the work or derivative of the work in any       --><!-- standard (paper) book form is prohibited unless prior           --><!-- permission is obtained from the copyright holder.               --><HTML><HEAD><TITLE>exec</TITLE><meta name="MSSmartTagsPreventParsing" content="TRUE"><METANAME="GENERATOR"CONTENT="Modular DocBook HTML Stylesheet Version 1.76b+"><LINKREL="HOME"TITLE="eCos Reference Manual"HREF="ecos-ref.html"><LINKREL="UP"TITLE="Executing Programs from RedBoot"HREF="executing-programs.html"><LINKREL="PREVIOUS"TITLE="go"HREF="go-command.html"><LINKREL="NEXT"TITLE="Rebuilding RedBoot"HREF="rebuilding-redboot.html"></HEAD><BODYCLASS="REFENTRY"BGCOLOR="#FFFFFF"TEXT="#000000"LINK="#0000FF"VLINK="#840084"ALINK="#0000FF"><DIVCLASS="NAVHEADER"><TABLESUMMARY="Header navigation table"WIDTH="100%"BORDER="0"CELLPADDING="0"CELLSPACING="0"><TR><THCOLSPAN="3"ALIGN="center">eCos Reference Manual</TH></TR><TR><TDWIDTH="10%"ALIGN="left"VALIGN="bottom"><AHREF="go-command.html"ACCESSKEY="P">Prev</A></TD><TDWIDTH="80%"ALIGN="center"VALIGN="bottom"></TD><TDWIDTH="10%"ALIGN="right"VALIGN="bottom"><AHREF="rebuilding-redboot.html"ACCESSKEY="N">Next</A></TD></TR></TABLE><HRALIGN="LEFT"WIDTH="100%"></DIV><H1><ANAME="EXEC-COMMAND">exec</H1><DIVCLASS="REFNAMEDIV"><ANAME="AEN4570"></A><H2>Name</H2>exec&nbsp;--&nbsp;Execute a Linux kernel</DIV><DIVCLASS="REFSYNOPSISDIV"><ANAME="AEN4573"><H2>Synopsis</H2><P><BCLASS="COMMAND">exec</B>  [-w <TTCLASS="REPLACEABLE"><I> timeout</I></TT>] [-r <TTCLASS="REPLACEABLE"><I> ramdisk_address</I></TT>] [-s <TTCLASS="REPLACEABLE"><I> ramdisk_length</I></TT>] [-b <TTCLASS="REPLACEABLE"><I> load_address</I></TT>   	    {-l <TTCLASS="REPLACEABLE"><I> load_length</I></TT>}        ] [-c <TTCLASS="REPLACEABLE"><I> kernel_command_line</I></TT>] [<TTCLASS="REPLACEABLE"><I> entry_point</I></TT>]</P></DIV><DIVCLASS="REFSECT1"><ANAME="AEN4590"></A><H2>Arguments</H2><DIVCLASS="INFORMALTABLE"><ANAME="AEN4592"><P></P><TABLEBORDER="1"CLASS="CALSTABLE"><THEAD><TR><THWIDTH="25%"ALIGN="LEFT"VALIGN="TOP">Name</TH><THWIDTH="25%"ALIGN="LEFT"VALIGN="TOP">Type</TH><THWIDTH="25%"ALIGN="LEFT"VALIGN="TOP">Description</TH><THWIDTH="25%"ALIGN="LEFT"VALIGN="TOP">Default</TH></TR></THEAD><TBODY><TR><TDWIDTH="25%"ALIGN="LEFT"VALIGN="TOP">-w <TTCLASS="REPLACEABLE"><I>timeout</I></TT></TD><TDWIDTH="25%"ALIGN="LEFT"VALIGN="TOP">Number</TD><TDWIDTH="25%"ALIGN="LEFT"VALIGN="TOP">Time to wait before starting execution.</TD><TDWIDTH="25%"ALIGN="LEFT"VALIGN="TOP">0</TD></TR><TR><TDWIDTH="25%"ALIGN="LEFT"VALIGN="TOP">-r <TTCLASS="REPLACEABLE"><I>ramdisk_address</I></TT></TD><TDWIDTH="25%"ALIGN="LEFT"VALIGN="TOP">Number</TD><TDWIDTH="25%"ALIGN="LEFT"VALIGN="TOP">Address in memory of "initrd"-style ramdisk - passed to Linux kernel.</TD><TDWIDTH="25%"ALIGN="LEFT"VALIGN="TOP"><SPANCLASS="emphasis"><ICLASS="EMPHASIS">None</I></SPAN></TD></TR><TR><TDWIDTH="25%"ALIGN="LEFT"VALIGN="TOP">-s <TTCLASS="REPLACEABLE"><I>ramdisk_length</I></TT></TD><TDWIDTH="25%"ALIGN="LEFT"VALIGN="TOP">Number</TD><TDWIDTH="25%"ALIGN="LEFT"VALIGN="TOP">Length of ramdisk image - passed to Linux kernel.</TD><TDWIDTH="25%"ALIGN="LEFT"VALIGN="TOP"><SPANCLASS="emphasis"><ICLASS="EMPHASIS">None</I></SPAN></TD></TR><TR><TDWIDTH="25%"ALIGN="LEFT"VALIGN="TOP">-b <TTCLASS="REPLACEABLE"><I>load_address</I></TT></TD><TDWIDTH="25%"ALIGN="LEFT"VALIGN="TOP">Number</TD><TDWIDTH="25%"ALIGN="LEFT"VALIGN="TOP">Address in memory of the Linux kernel image.</TD><TDWIDTH="25%"ALIGN="LEFT"VALIGN="TOP">Value set by <BCLASS="COMMAND">load</B> or <BCLASS="COMMAND">fis load</B></TD></TR><TR><TDWIDTH="25%"ALIGN="LEFT"VALIGN="TOP">-l <TTCLASS="REPLACEABLE"><I>load_length</I></TT></TD><TDWIDTH="25%"ALIGN="LEFT"VALIGN="TOP">Number</TD><TDWIDTH="25%"ALIGN="LEFT"VALIGN="TOP">Length of Linux kernel image.</TD><TDWIDTH="25%"ALIGN="LEFT"VALIGN="TOP"><SPANCLASS="emphasis"><ICLASS="EMPHASIS">none</I></SPAN></TD></TR><TR><TDWIDTH="25%"ALIGN="LEFT"VALIGN="TOP">-c <TTCLASS="REPLACEABLE"><I>kernel_command_line</I></TT></TD><TDWIDTH="25%"ALIGN="LEFT"VALIGN="TOP">String</TD><TDWIDTH="25%"ALIGN="LEFT"VALIGN="TOP">Command line to pass to the Linux kernel.</TD><TDWIDTH="25%"ALIGN="LEFT"VALIGN="TOP"><SPANCLASS="emphasis"><ICLASS="EMPHASIS">None</I></SPAN></TD></TR><TR><TDWIDTH="25%"ALIGN="LEFT"VALIGN="TOP"><TTCLASS="REPLACEABLE"><I>entry_address</I></TT></TD><TDWIDTH="25%"ALIGN="LEFT"VALIGN="TOP">Number</TD><TDWIDTH="25%"ALIGN="LEFT"VALIGN="TOP">Starting address for Linux kernel execution</TD><TDWIDTH="25%"ALIGN="LEFT"VALIGN="TOP">Implied by architecture</TD></TR></TBODY></TABLE><P></P></DIV></DIV><DIVCLASS="REFSECT1"><ANAME="AEN4653"></A><H2>Description</H2><P>The <BCLASS="COMMAND">exec</B> command is used to execute a non-eCos application, typically aLinux kernel. Additional information may be passed to the kernel at startuptime. This command is quite special (and unique from the <BCLASS="COMMAND">go</B> command) inthat the program being executed may expect certain environmental setups, forexample that the MMU is turned off, etc. </P><P>The Linux kernel expects to have been loaded to a particular memorylocation which is architecture dependent(0xC0008000 in the case of the SA1110). Since this memory is  usedby RedBoot internally, it is not possible to load the kernel to that locationdirectly. Thus the requirement for the "-b" option which tells the commandwhere the kernel has been loaded. When the <BCLASS="COMMAND">exec</B> command runs, the image willbe relocated to the appropriate location before being started. The "-r" and"-s" options are used to pass information to the kernel about where a staticallyloaded ramdisk (initrd) is located.</P><P>The "-c" option can be used to pass textual "command line" informationto the kernel.  If the command line data contains any punctuation (spaces,etc), then it must be quoted using the double-quote character '"'. If thequote character is required, it should be written as '\"'.      </P></DIV><DIVCLASS="REFSECT1"><ANAME="AEN4661"></A><H2>Examples</H2><P>Execute a Linux kernel, passing a command line, which needs relocation.The result from RedBoot is normally quiet, with the target platform beingpassed over to Linux immediately.<TABLEBORDER="5"BGCOLOR="#E0E0F0"WIDTH="70%"><TR><TD><PRECLASS="SCREEN">RedBoot&#62; <TTCLASS="USERINPUT"><B>exec -b 0x100000 -l 0x80000 -c "noinitrd root=/dev/mtdblock3 console=ttySA0"</B></TT></PRE></TD></TR></TABLE>       </P><P>Execute a Linux kernel, default entry address and no relocation required, with a timeout.  The <SPANCLASS="emphasis"><ICLASS="EMPHASIS"> emphasized lines</I></SPAN> are output from the loaded kernel.<TABLEBORDER="5"BGCOLOR="#E0E0F0"WIDTH="70%"><TR><TD><PRECLASS="SCREEN"> RedBoot&#62; exec <TTCLASS="USERINPUT"><B>-c "console=ttyS0,38400 ip=dhcp nfsroot=/export/elfs-sh" -w 5</B></TT>Now booting linux kernel:Base address 0x8c001000 Entry 0x8c210000Cmdline : console=ttyS0,38400 ip=dhcp nfsroot=/export/elfs-shAbout to start execution at 0x8x210000 - abort with ^C within 5 seconds<SPANCLASS="emphasis"><ICLASS="EMPHASIS">Linux version 2.4.10-pre6 (...) (gcc version 3.1-stdsh-010931) #3 Thu Sep 27 11:04:23 BST 2001</I></SPAN></PRE></TD></TR></TABLE>       </P></DIV><DIVCLASS="NAVFOOTER"><HRALIGN="LEFT"WIDTH="100%"><TABLESUMMARY="Footer navigation table"WIDTH="100%"BORDER="0"CELLPADDING="0"CELLSPACING="0"><TR><TDWIDTH="33%"ALIGN="left"VALIGN="top"><AHREF="go-command.html"ACCESSKEY="P">Prev</A></TD><TDWIDTH="34%"ALIGN="center"VALIGN="top"><AHREF="ecos-ref.html"ACCESSKEY="H">Home</A></TD><TDWIDTH="33%"ALIGN="right"VALIGN="top"><AHREF="rebuilding-redboot.html"ACCESSKEY="N">Next</A></TD></TR><TR><TDWIDTH="33%"ALIGN="left"VALIGN="top">go</TD><TDWIDTH="34%"ALIGN="center"VALIGN="top"><AHREF="executing-programs.html"ACCESSKEY="U">Up</A></TD><TDWIDTH="33%"ALIGN="right"VALIGN="top">Rebuilding RedBoot</TD></TR></TABLE></DIV></BODY></HTML>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -