URL
https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk
Subversion Repositories openrisc_me
[/] [openrisc/] [trunk/] [rtos/] [ecos-2.0/] [doc/] [html/] [ref/] [exec-command.html] - Rev 472
Go to most recent revision | Compare with Previous | Blame | View Log
<!-- 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"> <META NAME="GENERATOR" CONTENT="Modular DocBook HTML Stylesheet Version 1.76b+ "><LINK REL="HOME" TITLE="eCos Reference Manual" HREF="ecos-ref.html"><LINK REL="UP" TITLE="Executing Programs from RedBoot" HREF="executing-programs.html"><LINK REL="PREVIOUS" TITLE="go" HREF="go-command.html"><LINK REL="NEXT" TITLE="Rebuilding RedBoot" HREF="rebuilding-redboot.html"></HEAD ><BODY CLASS="REFENTRY" BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#840084" ALINK="#0000FF" ><DIV CLASS="NAVHEADER" ><TABLE SUMMARY="Header navigation table" WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0" ><TR ><TH COLSPAN="3" ALIGN="center" >eCos Reference Manual</TH ></TR ><TR ><TD WIDTH="10%" ALIGN="left" VALIGN="bottom" ><A HREF="go-command.html" ACCESSKEY="P" >Prev</A ></TD ><TD WIDTH="80%" ALIGN="center" VALIGN="bottom" ></TD ><TD WIDTH="10%" ALIGN="right" VALIGN="bottom" ><A HREF="rebuilding-redboot.html" ACCESSKEY="N" >Next</A ></TD ></TR ></TABLE ><HR ALIGN="LEFT" WIDTH="100%"></DIV ><H1 ><A NAME="EXEC-COMMAND">exec</H1 ><DIV CLASS="REFNAMEDIV" ><A NAME="AEN4570" ></A ><H2 >Name</H2 >exec -- Execute a Linux kernel</DIV ><DIV CLASS="REFSYNOPSISDIV" ><A NAME="AEN4573"><H2 >Synopsis</H2 ><P ><B CLASS="COMMAND" >exec</B > [-w <TT CLASS="REPLACEABLE" ><I > timeout</I ></TT >] [-r <TT CLASS="REPLACEABLE" ><I > ramdisk_address</I ></TT >] [-s <TT CLASS="REPLACEABLE" ><I > ramdisk_length</I ></TT >] [-b <TT CLASS="REPLACEABLE" ><I > load_address</I ></TT > {-l <TT CLASS="REPLACEABLE" ><I > load_length</I ></TT >} ] [-c <TT CLASS="REPLACEABLE" ><I > kernel_command_line</I ></TT >] [<TT CLASS="REPLACEABLE" ><I > entry_point</I ></TT >]</P ></DIV ><DIV CLASS="REFSECT1" ><A NAME="AEN4590" ></A ><H2 >Arguments</H2 ><DIV CLASS="INFORMALTABLE" ><A NAME="AEN4592"><P ></P ><TABLE BORDER="1" CLASS="CALSTABLE" ><THEAD ><TR ><TH WIDTH="25%" ALIGN="LEFT" VALIGN="TOP" >Name</TH ><TH WIDTH="25%" ALIGN="LEFT" VALIGN="TOP" >Type</TH ><TH WIDTH="25%" ALIGN="LEFT" VALIGN="TOP" >Description</TH ><TH WIDTH="25%" ALIGN="LEFT" VALIGN="TOP" >Default</TH ></TR ></THEAD ><TBODY ><TR ><TD WIDTH="25%" ALIGN="LEFT" VALIGN="TOP" >-w <TT CLASS="REPLACEABLE" ><I >timeout</I ></TT ></TD ><TD WIDTH="25%" ALIGN="LEFT" VALIGN="TOP" >Number</TD ><TD WIDTH="25%" ALIGN="LEFT" VALIGN="TOP" >Time to wait before starting execution.</TD ><TD WIDTH="25%" ALIGN="LEFT" VALIGN="TOP" >0</TD ></TR ><TR ><TD WIDTH="25%" ALIGN="LEFT" VALIGN="TOP" >-r <TT CLASS="REPLACEABLE" ><I >ramdisk_address</I ></TT ></TD ><TD WIDTH="25%" ALIGN="LEFT" VALIGN="TOP" >Number</TD ><TD WIDTH="25%" ALIGN="LEFT" VALIGN="TOP" >Address in memory of "initrd"-style ramdisk - passed to Linux kernel.</TD ><TD WIDTH="25%" ALIGN="LEFT" VALIGN="TOP" ><SPAN CLASS="emphasis" ><I CLASS="EMPHASIS" >None</I ></SPAN ></TD ></TR ><TR ><TD WIDTH="25%" ALIGN="LEFT" VALIGN="TOP" >-s <TT CLASS="REPLACEABLE" ><I >ramdisk_length</I ></TT ></TD ><TD WIDTH="25%" ALIGN="LEFT" VALIGN="TOP" >Number</TD ><TD WIDTH="25%" ALIGN="LEFT" VALIGN="TOP" >Length of ramdisk image - passed to Linux kernel.</TD ><TD WIDTH="25%" ALIGN="LEFT" VALIGN="TOP" ><SPAN CLASS="emphasis" ><I CLASS="EMPHASIS" >None</I ></SPAN ></TD ></TR ><TR ><TD WIDTH="25%" ALIGN="LEFT" VALIGN="TOP" >-b <TT CLASS="REPLACEABLE" ><I >load_address</I ></TT ></TD ><TD WIDTH="25%" ALIGN="LEFT" VALIGN="TOP" >Number</TD ><TD WIDTH="25%" ALIGN="LEFT" VALIGN="TOP" >Address in memory of the Linux kernel image.</TD ><TD WIDTH="25%" ALIGN="LEFT" VALIGN="TOP" >Value set by <B CLASS="COMMAND" >load</B > or <B CLASS="COMMAND" >fis load</B ></TD ></TR ><TR ><TD WIDTH="25%" ALIGN="LEFT" VALIGN="TOP" >-l <TT CLASS="REPLACEABLE" ><I >load_length</I ></TT ></TD ><TD WIDTH="25%" ALIGN="LEFT" VALIGN="TOP" >Number</TD ><TD WIDTH="25%" ALIGN="LEFT" VALIGN="TOP" >Length of Linux kernel image.</TD ><TD WIDTH="25%" ALIGN="LEFT" VALIGN="TOP" ><SPAN CLASS="emphasis" ><I CLASS="EMPHASIS" >none</I ></SPAN ></TD ></TR ><TR ><TD WIDTH="25%" ALIGN="LEFT" VALIGN="TOP" >-c <TT CLASS="REPLACEABLE" ><I >kernel_command_line</I ></TT ></TD ><TD WIDTH="25%" ALIGN="LEFT" VALIGN="TOP" >String</TD ><TD WIDTH="25%" ALIGN="LEFT" VALIGN="TOP" >Command line to pass to the Linux kernel.</TD ><TD WIDTH="25%" ALIGN="LEFT" VALIGN="TOP" ><SPAN CLASS="emphasis" ><I CLASS="EMPHASIS" >None</I ></SPAN ></TD ></TR ><TR ><TD WIDTH="25%" ALIGN="LEFT" VALIGN="TOP" ><TT CLASS="REPLACEABLE" ><I >entry_address</I ></TT ></TD ><TD WIDTH="25%" ALIGN="LEFT" VALIGN="TOP" >Number</TD ><TD WIDTH="25%" ALIGN="LEFT" VALIGN="TOP" >Starting address for Linux kernel execution</TD ><TD WIDTH="25%" ALIGN="LEFT" VALIGN="TOP" >Implied by architecture</TD ></TR ></TBODY ></TABLE ><P ></P ></DIV ></DIV ><DIV CLASS="REFSECT1" ><A NAME="AEN4653" ></A ><H2 >Description</H2 ><P >The <B CLASS="COMMAND" >exec</B > command is used to execute a non-eCos application, typically a Linux kernel. Additional information may be passed to the kernel at startup time. This command is quite special (and unique from the <B CLASS="COMMAND" >go</B > command) in that the program being executed may expect certain environmental setups, for example that the MMU is turned off, etc. </P ><P >The Linux kernel expects to have been loaded to a particular memory location which is architecture dependent(0xC0008000 in the case of the SA1110). Since this memory is used by RedBoot internally, it is not possible to load the kernel to that location directly. Thus the requirement for the "-b" option which tells the command where the kernel has been loaded. When the <B CLASS="COMMAND" >exec</B > command runs, the image will be relocated to the appropriate location before being started. The "-r" and "-s" options are used to pass information to the kernel about where a statically loaded ramdisk (initrd) is located.</P ><P >The "-c" option can be used to pass textual "command line" information to the kernel. If the command line data contains any punctuation (spaces, etc), then it must be quoted using the double-quote character '"'. If the quote character is required, it should be written as '\"'. </P ></DIV ><DIV CLASS="REFSECT1" ><A NAME="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 being passed over to Linux immediately. <TABLE BORDER="5" BGCOLOR="#E0E0F0" WIDTH="70%" ><TR ><TD ><PRE CLASS="SCREEN" >RedBoot> <TT CLASS="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 <SPAN CLASS="emphasis" ><I CLASS="EMPHASIS" > emphasized lines</I ></SPAN > are output from the loaded kernel. <TABLE BORDER="5" BGCOLOR="#E0E0F0" WIDTH="70%" ><TR ><TD ><PRE CLASS="SCREEN" > RedBoot> exec <TT CLASS="USERINPUT" ><B >-c "console=ttyS0,38400 ip=dhcp nfsroot=/export/elfs-sh" -w 5</B ></TT > Now booting linux kernel: Base address 0x8c001000 Entry 0x8c210000 Cmdline : console=ttyS0,38400 ip=dhcp nfsroot=/export/elfs-sh About to start execution at 0x8x210000 - abort with ^C within 5 seconds <SPAN CLASS="emphasis" ><I CLASS="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 ><DIV CLASS="NAVFOOTER" ><HR ALIGN="LEFT" WIDTH="100%"><TABLE SUMMARY="Footer navigation table" WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0" ><TR ><TD WIDTH="33%" ALIGN="left" VALIGN="top" ><A HREF="go-command.html" ACCESSKEY="P" >Prev</A ></TD ><TD WIDTH="34%" ALIGN="center" VALIGN="top" ><A HREF="ecos-ref.html" ACCESSKEY="H" >Home</A ></TD ><TD WIDTH="33%" ALIGN="right" VALIGN="top" ><A HREF="rebuilding-redboot.html" ACCESSKEY="N" >Next</A ></TD ></TR ><TR ><TD WIDTH="33%" ALIGN="left" VALIGN="top" >go</TD ><TD WIDTH="34%" ALIGN="center" VALIGN="top" ><A HREF="executing-programs.html" ACCESSKEY="U" >Up</A ></TD ><TD WIDTH="33%" ALIGN="right" VALIGN="top" >Rebuilding RedBoot</TD ></TR ></TABLE ></DIV ></BODY ></HTML >
Go to most recent revision | Compare with Previous | Blame | View Log