?? configuring-the-redboot-environment.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
>Configuring the RedBoot Environment</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="Getting Started with RedBoot"
HREF="getting-started-with-redboot.html"><LINK
REL="PREVIOUS"
TITLE="RedBoot Resource Usage"
HREF="resource-usage.html"><LINK
REL="NEXT"
TITLE="RedBoot Commands and Examples"
HREF="redboot-commands-and-examples.html"></HEAD
><BODY
CLASS="SECT1"
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="resource-usage.html"
ACCESSKEY="P"
>Prev</A
></TD
><TD
WIDTH="80%"
ALIGN="center"
VALIGN="bottom"
>Chapter 1. Getting Started with RedBoot</TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="redboot-commands-and-examples.html"
ACCESSKEY="N"
>Next</A
></TD
></TR
></TABLE
><HR
ALIGN="LEFT"
WIDTH="100%"></DIV
><DIV
CLASS="SECT1"
><H1
CLASS="SECT1"
><A
NAME="CONFIGURING-THE-REDBOOT-ENVIRONMENT">Configuring the RedBoot Environment</H1
><P
>Once installed, RedBoot will operate fairly generically. However,
there are some features that can be configured for a particular installation.
These depend primarily on whether flash and/or networking support are available. The remainder
of this discussion assumes that support for both of these options is included
in RedBoot.</P
><DIV
CLASS="SECT2"
><H2
CLASS="SECT2"
><A
NAME="TARGET-NETWORK-CONFIGURATION">Target Network Configuration</H2
><P
>Each node in a networked
system needs to have a unique address. Since the network support in RedBoot
is based on TCP/IP, this address
is an IP (Internet Protocol) address. There are two ways for a system to “know”
its IP address. First, it can be stored locally on the platform. This is known
as having a static IP address. Second, the system can use the network itself
to discover its IP address. This is known as a dynamic IP address. RedBoot
supports this dynamic IP address mode by use of the BOOTP (a subset of DHCP) protocol. In this case, RedBoot will ask the network (actually
some generic server on the network) for the IP address to use.</P
><DIV
CLASS="NOTE"
><BLOCKQUOTE
CLASS="NOTE"
><P
><B
>NOTE: </B
>Currently, RedBoot only supports BOOTP. In future releases, DHCP may
also be supported, but such support will be limited to additional data items,
not lease-based address allocation.</P
></BLOCKQUOTE
></DIV
><P
>The choice of IP
address type is made via the <B
CLASS="COMMAND"
>fconfig</B
> command. Once a selection
is made, it will be stored in flash memory. RedBoot only queries the flash
configuration information at reset, so any changes will require restarting
the platform.</P
><P
>Here is an example of the RedBoot <B
CLASS="COMMAND"
>fconfig</B
>
command, showing network addressing: </P
><TABLE
BORDER="5"
BGCOLOR="#E0E0F0"
WIDTH="70%"
><TR
><TD
><PRE
CLASS="PROGRAMLISTING"
>RedBoot> <TT
CLASS="USERINPUT"
><B
>fconfig -l</B
></TT
>
Run script at boot: false
Use BOOTP for network configuration: false
Local IP address: 192.168.1.29
Default server IP address: 192.168.1.101
DNS server IP address: 192.168.1.1
GDB connection port: 9000
Network debug at boot time: false </PRE
></TD
></TR
></TABLE
><P
>In this case, the board has been configured with a static IP address
listed as the Local IP address. The default server IP address specifies which
network node to communicate with for TFTP service. This address can be overridden
directly in the TFTP
commands.</P
><P
>The <TT
CLASS="COMPUTEROUTPUT"
>DNS server IP address</TT
> option
controls where RedBoot should make DNS lookups. A setting of 0.0.0.0 will disable DNS
lookups. The DNS server IP address can also be set at runtime.</P
><P
>If the selection for <TT
CLASS="COMPUTEROUTPUT"
>Use BOOTP for network configuration</TT
> had been <TT
CLASS="COMPUTEROUTPUT"
>true</TT
>, these IP
addresses would be determined at boot time, via the BOOTP protocol. The final
number which needs to be configured, regardless of IP address selection mode,
is the <TT
CLASS="COMPUTEROUTPUT"
>GDB connection port</TT
>. RedBoot allows for incoming commands
on either the available serial ports or via the network. This port number
is the TCP port that RedBoot will use to accept incoming connections. </P
><P
>These connections can be used for GDB sessions, but they can also be
used for generic RedBoot commands. In particular, it is possible to communicate
with RedBoot via the telnet
protocol. For example, on Linux®: </P
><TABLE
BORDER="5"
BGCOLOR="#E0E0F0"
WIDTH="70%"
><TR
><TD
><PRE
CLASS="PROGRAMLISTING"
>% telnet redboot_board 9000
Connected to redboot_board
Escape character is ‘^]’.
RedBoot> </PRE
></TD
></TR
></TABLE
></DIV
><DIV
CLASS="SECT2"
><H2
CLASS="SECT2"
><A
NAME="AEN2722">Host Network Configuration</H2
><P
>RedBoot
may require three different classes of service from a network host: </P
><P
></P
><UL
><LI
><P
>dynamic IP address allocation, using BOOTP </P
></LI
><LI
><P
>TFTP service for file downloading </P
></LI
><LI
><P
>DNS server for hostname lookups </P
></LI
></UL
><P
>Depending on the host system, these services may or may not be available
or enabled by default. See your system documentation for more details.</P
><P
>In particular, on Red Hat Linux, neither of these services will be configured
out of the box. The following will provide a limited explanation of how to
set them up. These configuration setups must be done as <TT
CLASS="COMPUTEROUTPUT"
>root</TT
> on the host or server machine.</P
><DIV
CLASS="SECT3"
><H3
CLASS="SECT3"
><A
NAME="AEN2743">Enable TFTP on Red Hat Linux 6.2</H3
><DIV
CLASS="PROCEDURE"
><OL
TYPE="1"
><LI
><P
>Ensure that
you have the tftp-server RPM package installed. By default, this installs
the TFTP server in a disabled state. These steps will enable it:</P
></LI
><LI
><P
>Make sure that the following line is uncommented in the control
file <TT
CLASS="FILENAME"
>/etc/inetd.conf</TT
> <TABLE
BORDER="5"
BGCOLOR="#E0E0F0"
WIDTH="70%"
><TR
><TD
><PRE
CLASS="SCREEN"
>tftp dgram udp wait root /usr/sbin/tcpd /usr/sbin/in.tftpd</PRE
></TD
></TR
></TABLE
></P
><P
></P
></LI
><LI
><P
>If it was necessary to change the line in Step 2, then the inetd
server must be restarted, which can be done via the command: <TABLE
BORDER="5"
BGCOLOR="#E0E0F0"
WIDTH="70%"
><TR
><TD
><PRE
CLASS="PROGRAMLISTING"
># service inet reload</PRE
></TD
></TR
></TABLE
></P
></LI
></OL
></DIV
></DIV
><DIV
CLASS="SECT3"
><H3
CLASS="SECT3"
><A
NAME="AEN2762">Enable TFTP on Red Hat Linux 7 (or newer)</H3
><DIV
CLASS="PROCEDURE"
><OL
TYPE="1"
><LI
><P
>Ensure that the
xinetd RPM is installed.</P
></LI
><LI
><P
>Ensure that the tftp-server RPM is installed.</P
></LI
><LI
><P
>Enable TFTP by means of the following: <TABLE
BORDER="5"
BGCOLOR="#E0E0F0"
WIDTH="70%"
><TR
><TD
><PRE
CLASS="PROGRAMLISTING"
>/sbin/chkconfig tftp on</PRE
></TD
></TR
></TABLE
>Reload the xinetd configuration using the command:<TABLE
BORDER="5"
BGCOLOR="#E0E0F0"
WIDTH="70%"
><TR
><TD
><PRE
CLASS="PROGRAMLISTING"
> /sbin/service xinetd reload </PRE
></TD
></TR
></TABLE
>Create the directory /tftpboot
using the command <TABLE
BORDER="5"
BGCOLOR="#E0E0F0"
WIDTH="70%"
><TR
><TD
><PRE
CLASS="PROGRAMLISTING"
>mkdir /tftpboot</PRE
></TD
></TR
></TABLE
></P
></LI
></OL
></DIV
><DIV
CLASS="NOTE"
><BLOCKQUOTE
CLASS="NOTE"
><P
><B
>NOTE: </B
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -