1 <!-- Copyright (C) 2003 Red Hat, Inc. -->
2 <!-- This material may be distributed only subject to the terms -->
3 <!-- and conditions set forth in the Open Publication License, v1.0 -->
4 <!-- or later (the latest version is presently available at -->
5 <!-- http://www.opencontent.org/openpub/). -->
6 <!-- Distribution of the work or derivative of the work in any -->
7 <!-- standard (paper) book form is prohibited unless prior -->
8 <!-- permission is obtained from the copyright holder. -->
12 >Configuring the RedBoot Environment</TITLE
13 ><meta name="MSSmartTagsPreventParsing" content="TRUE">
16 CONTENT="Modular DocBook HTML Stylesheet Version 1.76b+
19 TITLE="eCos Reference Manual"
20 HREF="ecos-ref.html"><LINK
22 TITLE="Getting Started with RedBoot"
23 HREF="getting-started-with-redboot.html"><LINK
25 TITLE="RedBoot Resource Usage"
26 HREF="resource-usage.html"><LINK
28 TITLE="RedBoot Commands and Examples"
29 HREF="redboot-commands-and-examples.html"></HEAD
40 SUMMARY="Header navigation table"
49 >eCos Reference Manual</TH
57 HREF="resource-usage.html"
65 >Chapter 1. Getting Started with RedBoot</TD
71 HREF="redboot-commands-and-examples.html"
85 NAME="CONFIGURING-THE-REDBOOT-ENVIRONMENT">Configuring the RedBoot Environment</H1
87 >Once installed, RedBoot will operate fairly generically. However,
88 there are some features that can be configured for a particular installation.
89 These depend primarily on whether flash and/or networking support are available. The remainder
90 of this discussion assumes that support for both of these options is included
97 NAME="TARGET-NETWORK-CONFIGURATION">Target Network Configuration</H2
99 >Each node in a networked
100 system needs to have a unique address. Since the network support in RedBoot
101 is based on TCP/IP, this address
102 is an IP (Internet Protocol) address. There are two ways for a system to “know”
103 its IP address. First, it can be stored locally on the platform. This is known
104 as having a static IP address. Second, the system can use the network itself
105 to discover its IP address. This is known as a dynamic IP address. RedBoot
106 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
107 some generic server on the network) for the IP address to use.</P
115 >Currently, RedBoot only supports BOOTP. In future releases, DHCP may
116 also be supported, but such support will be limited to additional data items,
117 not lease-based address allocation.</P
122 address type is made via the <B
125 > command. Once a selection
126 is made, it will be stored in flash memory. RedBoot only queries the flash
127 configuration information at reset, so any changes will require restarting
130 >Here is an example of the RedBoot <B
134 command, showing network addressing: </P
142 CLASS="PROGRAMLISTING"
149 Run script at boot: false
150 Use BOOTP for network configuration: false
151 Local IP address: 192.168.1.29
152 Default server IP address: 192.168.1.101
153 DNS server IP address: 192.168.1.1
154 GDB connection port: 9000
155 Network debug at boot time: false </PRE
160 >In this case, the board has been configured with a static IP address
161 listed as the Local IP address. The default server IP address specifies which
162 network node to communicate with for TFTP service. This address can be overridden
167 CLASS="COMPUTEROUTPUT"
168 >DNS server IP address</TT
170 controls where RedBoot should make DNS lookups. A setting of 0.0.0.0 will disable DNS
171 lookups. The DNS server IP address can also be set at runtime.</P
173 >If the selection for <TT
174 CLASS="COMPUTEROUTPUT"
175 >Use BOOTP for network configuration</TT
177 CLASS="COMPUTEROUTPUT"
180 addresses would be determined at boot time, via the BOOTP protocol. The final
181 number which needs to be configured, regardless of IP address selection mode,
183 CLASS="COMPUTEROUTPUT"
184 >GDB connection port</TT
185 >. RedBoot allows for incoming commands
186 on either the available serial ports or via the network. This port number
187 is the TCP port that RedBoot will use to accept incoming connections. </P
189 >These connections can be used for GDB sessions, but they can also be
190 used for generic RedBoot commands. In particular, it is possible to communicate
191 with RedBoot via the telnet
192 protocol. For example, on Linux®: </P
200 CLASS="PROGRAMLISTING"
201 >% telnet redboot_board 9000
202 Connected to redboot_board
203 Escape character is ‘^]’.
214 NAME="AEN2722">Host Network Configuration</H2
217 may require three different classes of service from a network host: </P
223 >dynamic IP address allocation, using BOOTP </P
227 >TFTP service for file downloading </P
231 >DNS server for hostname lookups </P
235 >Depending on the host system, these services may or may not be available
236 or enabled by default. See your system documentation for more details.</P
238 >In particular, on Red Hat Linux, neither of these services will be configured
239 out of the box. The following will provide a limited explanation of how to
240 set them up. These configuration setups must be done as <TT
241 CLASS="COMPUTEROUTPUT"
243 > on the host or server machine.</P
249 NAME="AEN2743">Enable TFTP on Red Hat Linux 6.2</H3
257 you have the tftp-server RPM package installed. By default, this installs
258 the TFTP server in a disabled state. These steps will enable it:</P
262 >Make sure that the following line is uncommented in the control
274 >tftp dgram udp wait root /usr/sbin/tcpd /usr/sbin/in.tftpd</PRE
284 >If it was necessary to change the line in Step 2, then the inetd
285 server must be restarted, which can be done via the command: <TABLE
292 CLASS="PROGRAMLISTING"
293 ># service inet reload</PRE
307 NAME="AEN2762">Enable TFTP on Red Hat Linux 7 (or newer)</H3
315 xinetd RPM is installed.</P
319 >Ensure that the tftp-server RPM is installed.</P
323 >Enable TFTP by means of the following: <TABLE
330 CLASS="PROGRAMLISTING"
331 >/sbin/chkconfig tftp on</PRE
335 >Reload the xinetd configuration using the command:<TABLE
342 CLASS="PROGRAMLISTING"
343 > /sbin/service xinetd reload </PRE
347 >Create the directory /tftpboot
348 using the command <TABLE
355 CLASS="PROGRAMLISTING"
356 >mkdir /tftpboot</PRE
371 >Under Red Hat 7 you must address files by absolute pathnames, for example: <TT
373 >/tftpboot/boot.img</TT
377 >, as you may have done with
378 other implementations.
379 On systems newer than Red Hat 7 (7.1 and beyond), filenames are once again relative to the
392 NAME="AEN2786">Enable BOOTP/DHCP server on Red Hat Linux</H3
394 >First, ensure that you have
395 the proper package, <TT
396 CLASS="COMPUTEROUTPUT"
399 CLASS="COMPUTEROUTPUT"
401 >) installed. The DHCP server provides Dynamic Host Configuration,
402 that is, IP address and other data to hosts on a network. It does this in
403 different ways. Next, there can be a fixed relationship between a certain
404 node and the data, based on that node’s unique Ethernet Station Address
405 (ESA, sometimes called a MAC address). The other possibility is simply to
406 assign addresses that are free. The sample DHCP configuration file shown does
407 both. Refer to the DHCP documentation for more details.</P
413 >Example 1-1. Sample DHCP configuration file</B
422 CLASS="PROGRAMLISTING"
423 >--------------- /etc/dhcpd.conf -----------------------------
424 default-lease-time 600;
426 option subnet-mask 255.255.255.0;
427 option broadcast-address 192.168.1.255;
428 option domain-name-servers 198.41.0.4, 128.9.0.107;
429 option domain-name “bogus.com”;
431 shared-network BOGUS {
432 subnet 192.168.1.0 netmask 255.255.255.0 {
433 option routers 192.168.1.101;
434 range 192.168.1.1 192.168.1.254;
438 hardware ethernet 08:00:3E:28:79:B8;
439 fixed-address 192.168.1.20;
440 filename “/tftpboot/192.168.1.21/zImage”;
441 default-lease-time -1;
442 server-name “srvr.bugus.com”;
443 server-identifier 192.168.1.101;
444 option host-name “mbx”;
451 >Once the DHCP package has been installed and the configuration file
463 >service dhcpd start</B
476 NAME="AEN2803">Enable DNS server on Red Hat Linux</H3
478 >First, ensure that you have the proper
480 CLASS="COMPUTEROUTPUT"
481 >caching-nameserver</TT
483 installed. Then change the configuration
489 CLASS="COMPUTEROUTPUT"
491 > point to the primary
492 nameservers for your machine, normally using the nameservers listed in
495 >/etc/resolv.conf</TT
502 >Example 1-2. Sample <TT
505 > for Red Hat Linux 7.x</B
514 CLASS="PROGRAMLISTING"
515 >--------------- /etc/named.conf -----------------------------
516 // generated by named-bootconf.pl
519 directory "/var/named";
521 * If there is a firewall between you and nameservers you want
522 * to talk to, you might need to uncomment the query-source
523 * directive below. Previous versions of BIND always asked
524 * questions using port 53, but BIND 8.1 uses an unprivileged
527 // query-source address * port 53;
538 // a caching only nameserver config
540 // Uncomment the following for Red Hat Linux 7.2 or above:
542 // inet 127.0.0.1 allow { localhost; } keys { rndckey; };
544 // include "/etc/rndc.key";
550 zone "localhost" IN {
552 file "localhost.zone";
553 allow-update { none; };
556 zone "0.0.127.in-addr.arpa" IN {
559 allow-update { none; };
566 >Make sure the server is started with the command:
578 >service named start</B
585 started on next reboot with the command
597 >chkconfig named on</B
604 Finally, you may wish to change
607 >/etc/resolv.conf</TT
610 CLASS="COMPUTEROUTPUT"
612 > as the nameserver for your
620 NAME="AEN2824">RedBoot network gateway</H3
622 >RedBoot cannot communicate with
623 machines on different subnets because it does not support routing. It always
624 assumes that it can get to an address directly, therefore it always tries
625 to ARP and then send packets directly to that unit. This means that whatever
626 it talks to must be on the same subnet. If you need to talk to a host on a
627 different subnet (even if it's on the same ‘wire’), you need to
628 go through an ARP proxy, providing that there is a Linux box connected to
629 the network which is able to route to the TFTP server. For example: <TT
631 >/proc/sys/net/ipv4/conf/<TT
634 ><interface></I
640 ><interface></I
642 >should be replaced with whichever network interface
643 is directly connected to the board.</P
651 NAME="AEN2834">Verification</H2
653 >Once your network setup
654 has been configured, perform simple verification tests as follows: <P
659 >Reboot your system, to enable the setup, and then try to ‘ping’
660 the target board from a host.</P
664 >Once communication has been established, try to ping
665 a host using the RedBoot ping command - both by IP address and hostname.</P
669 >Try using the RedBoot load command to download a file
681 SUMMARY="Footer navigation table"
692 HREF="resource-usage.html"
710 HREF="redboot-commands-and-examples.html"
720 >RedBoot Resource Usage</TD
726 HREF="getting-started-with-redboot.html"
734 >RedBoot Commands and Examples</TD