📄 download-command.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>load</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="Common Commands"HREF="common-commands.html"><LINKREL="PREVIOUS"TITLE="ip_address"HREF="ip-address-command.html"><LINKREL="NEXT"TITLE="mcmp"HREF="mcmp-command.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="ip-address-command.html"ACCESSKEY="P">Prev</A></TD><TDWIDTH="80%"ALIGN="center"VALIGN="bottom"></TD><TDWIDTH="10%"ALIGN="right"VALIGN="bottom"><AHREF="mcmp-command.html"ACCESSKEY="N">Next</A></TD></TR></TABLE><HRALIGN="LEFT"WIDTH="100%"></DIV><H1><ANAME="DOWNLOAD-COMMAND">load</H1><DIVCLASS="REFNAMEDIV"><ANAME="AEN3433"></A><H2>Name</H2>load -- Download programs or data to the RedBoot platform</DIV><DIVCLASS="REFSYNOPSISDIV"><ANAME="AEN3436"><H2>Synopsis</H2><P><BCLASS="COMMAND">load</B> [-v ] [-d ] [-r ] [-m [[xmodem | ymodem] | tftp | disk] ] [-h <TTCLASS="REPLACEABLE"><I> server_IP_address</I></TT>] [-b <TTCLASS="REPLACEABLE"><I> location</I></TT>] [-c <TTCLASS="REPLACEABLE"><I> channel</I></TT>] [<TTCLASS="REPLACEABLE"><I>file_name</I></TT>]</P></DIV><DIVCLASS="REFSECT1"><ANAME="AEN3458"></A><H2>Arguments</H2><DIVCLASS="INFORMALTABLE"><ANAME="AEN3460"><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">-v</TD><TDWIDTH="25%"ALIGN="LEFT"VALIGN="TOP">Boolean</TD><TDWIDTH="25%"ALIGN="LEFT"VALIGN="TOP">Display a small spinner (indicator)while the download is in progress. This is just for feedback, especiallyduring long loads. Note that the option has no effect when using aserial download method since it would interfere with the protocol.</TD><TDWIDTH="25%"ALIGN="LEFT"VALIGN="TOP"><SPANCLASS="emphasis"><ICLASS="EMPHASIS">quiet</I></SPAN></TD></TR><TR><TDWIDTH="25%"ALIGN="LEFT"VALIGN="TOP">-d</TD><TDWIDTH="25%"ALIGN="LEFT"VALIGN="TOP">Boolean</TD><TDWIDTH="25%"ALIGN="LEFT"VALIGN="TOP">Decompress data stream (gzip data)</TD><TDWIDTH="25%"ALIGN="LEFT"VALIGN="TOP"><SPANCLASS="emphasis"><ICLASS="EMPHASIS">non-compressed data</I></SPAN></TD></TR><TR><TDWIDTH="25%"ALIGN="LEFT"VALIGN="TOP">-r</TD><TDWIDTH="25%"ALIGN="LEFT"VALIGN="TOP">Boolean</TD><TDWIDTH="25%"ALIGN="LEFT"VALIGN="TOP">Raw (or binary) data</TD><TDWIDTH="25%"ALIGN="LEFT"VALIGN="TOP"><SPANCLASS="emphasis"><ICLASS="EMPHASIS">formatted (S-records, ELF image, etc)</I></SPAN></TD></TR><TR><TDWIDTH="25%"ALIGN="LEFT"VALIGN="TOP">-m tftp</TD><TDWIDTH="25%"ALIGN="LEFT"VALIGN="TOP"> </TD><TDWIDTH="25%"ALIGN="LEFT"VALIGN="TOP">Transfer data via the network using <SPANCLASS="ACRONYM">TFTP</SPAN> protocol.</TD><TDWIDTH="25%"ALIGN="LEFT"VALIGN="TOP"><SPANCLASS="ACRONYM">TFTP</SPAN></TD></TR><TR><TDWIDTH="25%"ALIGN="LEFT"VALIGN="TOP">-m http</TD><TDWIDTH="25%"ALIGN="LEFT"VALIGN="TOP"> </TD><TDWIDTH="25%"ALIGN="LEFT"VALIGN="TOP">Transfer data via the network using <SPANCLASS="ACRONYM">HTTP</SPAN> protocol.</TD><TDWIDTH="25%"ALIGN="LEFT"VALIGN="TOP"><SPANCLASS="ACRONYM">TFTP</SPAN></TD></TR><TR><TDWIDTH="25%"ALIGN="LEFT"VALIGN="TOP">-m xmodem</TD><TDWIDTH="25%"ALIGN="LEFT"VALIGN="TOP"> </TD><TDWIDTH="25%"ALIGN="LEFT"VALIGN="TOP">Transfer data using <SPANCLASS="emphasis"><ICLASS="EMPHASIS">X-modem</I></SPAN> protocol.</TD><TDWIDTH="25%"ALIGN="LEFT"VALIGN="TOP"><SPANCLASS="ACRONYM">TFTP</SPAN></TD></TR><TR><TDWIDTH="25%"ALIGN="LEFT"VALIGN="TOP">-m ymodem</TD><TDWIDTH="25%"ALIGN="LEFT"VALIGN="TOP"> </TD><TDWIDTH="25%"ALIGN="LEFT"VALIGN="TOP">Transfer data using <SPANCLASS="emphasis"><ICLASS="EMPHASIS">Y-modem</I></SPAN> protocol.</TD><TDWIDTH="25%"ALIGN="LEFT"VALIGN="TOP"><SPANCLASS="ACRONYM">TFTP</SPAN></TD></TR><TR><TDWIDTH="25%"ALIGN="LEFT"VALIGN="TOP">-m disk</TD><TDWIDTH="25%"ALIGN="LEFT"VALIGN="TOP"> </TD><TDWIDTH="25%"ALIGN="LEFT"VALIGN="TOP">Transfer data from a local disk.</TD><TDWIDTH="25%"ALIGN="LEFT"VALIGN="TOP"><SPANCLASS="ACRONYM">TFTP</SPAN></TD></TR><TR><TDWIDTH="25%"ALIGN="LEFT"VALIGN="TOP">-h <TTCLASS="REPLACEABLE"><I>server_IP_address</I></TT></TD><TDWIDTH="25%"ALIGN="LEFT"VALIGN="TOP">Numeric IP or DNS name</TD><TDWIDTH="25%"ALIGN="LEFT"VALIGN="TOP">The IP address of the <SPANCLASS="ACRONYM">TFTP</SPAN> or <SPANCLASS="ACRONYM">HTTP</SPAN> server.</TD><TDWIDTH="25%"ALIGN="LEFT"VALIGN="TOP">Value set by <BCLASS="COMMAND">ip_address</B></TD></TR><TR><TDWIDTH="25%"ALIGN="LEFT"VALIGN="TOP">-b <TTCLASS="REPLACEABLE"><I>location</I></TT></TD><TDWIDTH="25%"ALIGN="LEFT"VALIGN="TOP">Number</TD><TDWIDTH="25%"ALIGN="LEFT"VALIGN="TOP">Address in memory to load the data. Formatted data streams will havean implied load address which this option may override.</TD><TDWIDTH="25%"ALIGN="LEFT"VALIGN="TOP"><SPANCLASS="emphasis"><ICLASS="EMPHASIS">Depends on data format</I></SPAN></TD></TR><TR><TDWIDTH="25%"ALIGN="LEFT"VALIGN="TOP">-c <TTCLASS="REPLACEABLE"><I>channel</I></TT></TD><TDWIDTH="25%"ALIGN="LEFT"VALIGN="TOP">Number</TD><TDWIDTH="25%"ALIGN="LEFT"VALIGN="TOP">Specify which I/O channel touse for download. This option is only supported when using eitherxmodem or ymodem protocol.</TD><TDWIDTH="25%"ALIGN="LEFT"VALIGN="TOP"><SPANCLASS="emphasis"><ICLASS="EMPHASIS">Depends on data format</I></SPAN></TD></TR><TR><TDWIDTH="25%"ALIGN="LEFT"VALIGN="TOP"><TTCLASS="REPLACEABLE"><I>file_name</I></TT></TD><TDWIDTH="25%"ALIGN="LEFT"VALIGN="TOP">String</TD><TDWIDTH="25%"ALIGN="LEFT"VALIGN="TOP">The name of the file on the <SPANCLASS="ACRONYM">TFTP</SPAN> or <SPANCLASS="ACRONYM">HTTP</SPAN>server or the local disk. Details of how this is specified for <SPANCLASS="ACRONYM">TFTP</SPAN> arehost-specific. For local disk files, the name must be in <SPANCLASS="emphasis"><ICLASS="EMPHASIS">disk</I></SPAN>:<SPANCLASS="emphasis"><ICLASS="EMPHASIS">filename</I></SPAN> format. The disk portion must match one of the disknames listed by the <BCLASS="COMMAND">disks</B> command.</TD><TDWIDTH="25%"ALIGN="LEFT"VALIGN="TOP"><SPANCLASS="emphasis"><ICLASS="EMPHASIS">None</I></SPAN></TD></TR></TBODY></TABLE><P></P></DIV></DIV><DIVCLASS="REFSECT1"><ANAME="AEN3561"></A><H2>Description</H2><P>The <BCLASS="COMMAND">load</B> command is used to downloaddata into the target system. Data can be loaded via a network connection,using either the <SPANCLASS="ACRONYM">TFTP</SPAN> or <SPANCLASS="ACRONYM">HTTP</SPAN> protocols, or the console serial connection using theX/Y modem protocol. Files may also be loaded directly from local filesystemson disk. Files to be downloaded may either be executable images in ELF executable program format,Motorola S-record (SREC)format or raw data. </P></DIV><DIVCLASS="REFSECT1"><ANAME="AEN3567"></A><H2>Examples</H2><P>Download a Motorola S-record (or ELF) image, using <SPANCLASS="ACRONYM">TFTP</SPAN>, specifying the base memory address.<TABLEBORDER="5"BGCOLOR="#E0E0F0"WIDTH="70%"><TR><TD><PRECLASS="SCREEN">RedBoot> <TTCLASS="USERINPUT"><B>load redboot.ROM -b 0x8c400000</B></TT>Address offset = 0x0c400000Entry point: 0x80000000, address range: 0x80000000-0x8000fe80</PRE></TD></TR></TABLE> </P><P>Download a Motorola S-record (or ELF) image, using <SPANCLASS="ACRONYM">HTTP</SPAN>, specifying thehost [server] address.<TABLEBORDER="5"BGCOLOR="#E0E0F0"WIDTH="70%"><TR><TD><PRECLASS="SCREEN">RedBoot> <TTCLASS="USERINPUT"><B>load /redboot.ROM -m HTTP -h 192.168.1.104</B></TT>Address offset = 0x0c400000Entry point: 0x80000000, address range: 0x80000000-0x8000fe80</PRE></TD></TR></TABLE> </P><P>Load an ELF file from /dev/hda1 which should be an EXT2 partition:<TABLEBORDER="5"BGCOLOR="#E0E0F0"WIDTH="70%"><TR><TD><PRECLASS="SCREEN">RedBoot> <TTCLASS="USERINPUT"><B>load -mode disk hda1:hello.elf</B></TT>Entry point: 0x00020000, address range: 0x00020000-0x0002fd70</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="ip-address-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="mcmp-command.html"ACCESSKEY="N">Next</A></TD></TR><TR><TDWIDTH="33%"ALIGN="left"VALIGN="top">ip_address</TD><TDWIDTH="34%"ALIGN="center"VALIGN="top"><AHREF="common-commands.html"ACCESSKEY="U">Up</A></TD><TDWIDTH="33%"ALIGN="right"VALIGN="top">mcmp</TD></TR></TABLE></DIV></BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -