source: SVN/cambria/redboot/docs/redboot/html/configuring-the-redboot-environment.html @ 1

Last change on this file since 1 was 1, checked in by Tim Harvey, 2 years ago

restored latest version of files from server backup

Signed-off-by: Tim Harvey <tharvey@…>

File size: 16.5 KB
Line 
1<!-- Copyright (C) 2007 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.               -->
9<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
10<HTML
11><HEAD
12><TITLE
13>Configuring the RedBoot Environment</TITLE
14><meta name="MSSmartTagsPreventParsing" content="TRUE">
15<META
16NAME="GENERATOR"
17CONTENT="Modular DocBook HTML Stylesheet Version 1.79"><LINK
18REL="HOME"
19TITLE="RedBoot&#8482; User's Guide"
20HREF="redboot.html"><LINK
21REL="UP"
22TITLE="Getting Started with RedBoot"
23HREF="getting-started-with-redboot.html"><LINK
24REL="PREVIOUS"
25TITLE="User Interface"
26HREF="user-interface.html"><LINK
27REL="NEXT"
28TITLE="RedBoot Commands and Examples"
29HREF="redboot-commands-and-examples.html"></HEAD
30><BODY
31CLASS="SECT1"
32BGCOLOR="#FFFFFF"
33TEXT="#000000"
34LINK="#0000FF"
35VLINK="#840084"
36ALINK="#0000FF"
37><DIV
38CLASS="NAVHEADER"
39><TABLE
40SUMMARY="Header navigation table"
41WIDTH="100%"
42BORDER="0"
43CELLPADDING="0"
44CELLSPACING="0"
45><TR
46><TH
47COLSPAN="3"
48ALIGN="center"
49>RedBoot&#8482; User's Guide: Document Version 2.04, February 2007</TH
50></TR
51><TR
52><TD
53WIDTH="10%"
54ALIGN="left"
55VALIGN="bottom"
56><A
57HREF="user-interface.html"
58ACCESSKEY="P"
59>Prev</A
60></TD
61><TD
62WIDTH="80%"
63ALIGN="center"
64VALIGN="bottom"
65>Chapter 1. Getting Started with RedBoot</TD
66><TD
67WIDTH="10%"
68ALIGN="right"
69VALIGN="bottom"
70><A
71HREF="redboot-commands-and-examples.html"
72ACCESSKEY="N"
73>Next</A
74></TD
75></TR
76></TABLE
77><HR
78ALIGN="LEFT"
79WIDTH="100%"></DIV
80><DIV
81CLASS="SECT1"
82><H1
83CLASS="SECT1"
84><A
85NAME="CONFIGURING-THE-REDBOOT-ENVIRONMENT"
86>Configuring the RedBoot Environment</A
87></H1
88><P
89>Once installed, RedBoot will operate fairly generically. However,
90there are some features that can be configured for a particular installation.
91These depend primarily on whether flash and/or networking support are available. The remainder
92of this discussion assumes that support for both of these options is included
93in RedBoot.</P
94><DIV
95CLASS="SECT2"
96><H2
97CLASS="SECT2"
98><A
99NAME="TARGET-NETWORK-CONFIGURATION"
100>Target Network Configuration</A
101></H2
102><P
103>Each node in a networked
104system needs to have a unique address. Since the network support in RedBoot
105is based on TCP/IP, this address
106is an IP (Internet Protocol) address. There are two ways for a system to &#8220;know&#8221;
107its IP address. First, it can be stored locally on the platform. This is known
108as having a static IP address. Second, the system can use the network itself
109to discover its IP address. This is known as a dynamic IP address. RedBoot
110supports this dynamic IP address mode by use of the BOOTP (a subset of DHCP) protocol. In this case, RedBoot will ask the network (actually
111some generic server on the network) for the IP address to use.</P
112><DIV
113CLASS="NOTE"
114><BLOCKQUOTE
115CLASS="NOTE"
116><P
117><B
118>NOTE: </B
119>Currently, RedBoot only supports BOOTP. In future releases, DHCP may
120also be supported, but such support will be limited to additional data items,
121not lease-based address allocation.</P
122></BLOCKQUOTE
123></DIV
124><P
125>The choice of IP
126address type is made via the <B
127CLASS="COMMAND"
128>fconfig</B
129> command. Once a selection
130is made, it will be stored in flash memory. RedBoot only queries the flash
131configuration information at reset, so any changes will require restarting
132the platform.</P
133><P
134>Here is an example of the RedBoot <B
135CLASS="COMMAND"
136>fconfig</B
137>
138command, showing network addressing:    </P
139><TABLE
140BORDER="5"
141BGCOLOR="#E0E0F0"
142WIDTH="70%"
143><TR
144><TD
145><PRE
146CLASS="PROGRAMLISTING"
147>RedBoot&#62; <KBD
148CLASS="USERINPUT"
149>fconfig -l</KBD
150>
151Run script at boot: false
152Use BOOTP for network configuration: false
153Local IP address: 192.168.1.29
154Default server IP address: 192.168.1.101
155DNS server IP address: 192.168.1.1
156GDB connection port: 9000
157Network debug at boot time: false  </PRE
158></TD
159></TR
160></TABLE
161><P
162>In this case, the board has been configured with a static IP address
163listed as the Local IP address. The default server IP address specifies which
164network node to communicate with for TFTP service. This address can be overridden
165directly in the TFTP
166commands.</P
167><P
168>The <SAMP
169CLASS="COMPUTEROUTPUT"
170>DNS server IP address</SAMP
171> option
172controls where RedBoot should make DNS lookups. A setting of 0.0.0.0 will disable DNS
173lookups. The DNS server IP address can also be set at runtime.</P
174><P
175>If the selection for <SAMP
176CLASS="COMPUTEROUTPUT"
177>Use BOOTP for network configuration</SAMP
178> had been <SAMP
179CLASS="COMPUTEROUTPUT"
180>true</SAMP
181>, these IP
182addresses would be determined at boot time, via the BOOTP protocol. The final
183number which needs to be configured, regardless of IP address selection mode,
184is the <SAMP
185CLASS="COMPUTEROUTPUT"
186>GDB connection port</SAMP
187>. RedBoot allows for incoming commands
188on either the available serial ports or via the network. This port number
189is the TCP port that RedBoot will use to accept incoming connections.  </P
190><P
191>These connections can be used for GDB sessions, but they can also be
192used for generic RedBoot commands. In particular, it is possible to communicate
193with RedBoot via the telnet
194protocol. For example, on Linux&reg;: </P
195><TABLE
196BORDER="5"
197BGCOLOR="#E0E0F0"
198WIDTH="70%"
199><TR
200><TD
201><PRE
202CLASS="PROGRAMLISTING"
203>% telnet redboot_board 9000
204Connected to redboot_board
205Escape character is &#8216;^]&#8217;.
206RedBoot&#62;  </PRE
207></TD
208></TR
209></TABLE
210></DIV
211><DIV
212CLASS="SECT2"
213><H2
214CLASS="SECT2"
215><A
216NAME="AEN166"
217>Host Network Configuration</A
218></H2
219><P
220>RedBoot
221may require three different classes of service from a network host:   </P
222><P
223></P
224><UL
225><LI
226><P
227>dynamic IP address allocation, using BOOTP   </P
228></LI
229><LI
230><P
231>TFTP service for file downloading </P
232></LI
233><LI
234><P
235>DNS server for hostname lookups </P
236></LI
237></UL
238><P
239>Depending on the host system, these services may or may not be available
240or enabled by default. See your system documentation for more details.</P
241><P
242>In particular, on Red Hat Linux, neither of these services will be configured
243out of the box. The following will provide a limited explanation of how to
244set them up. These configuration setups must be done as <SAMP
245CLASS="COMPUTEROUTPUT"
246>root</SAMP
247> on the host or server machine.</P
248><DIV
249CLASS="SECT3"
250><H3
251CLASS="SECT3"
252><A
253NAME="AEN187"
254>Enable TFTP on Red Hat Linux 6.2</A
255></H3
256><DIV
257CLASS="PROCEDURE"
258><OL
259TYPE="1"
260><LI
261CLASS="STEP"
262><P
263>Ensure that
264you have the tftp-server RPM package installed. By default, this installs
265the TFTP server in a disabled state. These steps will enable it:</P
266></LI
267><LI
268CLASS="STEP"
269><P
270>Make sure that the following line is uncommented in the control
271file <TT
272CLASS="FILENAME"
273>/etc/inetd.conf</TT
274> <TABLE
275BORDER="5"
276BGCOLOR="#E0E0F0"
277WIDTH="70%"
278><TR
279><TD
280><PRE
281CLASS="SCREEN"
282>tftp dgram   udp     wait    root    /usr/sbin/tcpd      /usr/sbin/in.tftpd</PRE
283></TD
284></TR
285></TABLE
286></P
287><P
288></P
289></LI
290><LI
291CLASS="STEP"
292><P
293>If it was necessary to change the line in Step 2, then the inetd
294server must be restarted, which can be done via the command:    <TABLE
295BORDER="5"
296BGCOLOR="#E0E0F0"
297WIDTH="70%"
298><TR
299><TD
300><PRE
301CLASS="PROGRAMLISTING"
302># service inet reload</PRE
303></TD
304></TR
305></TABLE
306></P
307></LI
308></OL
309></DIV
310></DIV
311><DIV
312CLASS="SECT3"
313><H3
314CLASS="SECT3"
315><A
316NAME="AEN206"
317>Enable TFTP on Red Hat Linux 7</A
318></H3
319><DIV
320CLASS="PROCEDURE"
321><OL
322TYPE="1"
323><LI
324CLASS="STEP"
325><P
326>Ensure that the
327xinetd RPM is installed.</P
328></LI
329><LI
330CLASS="STEP"
331><P
332>Ensure that the tftp-server RPM is installed.</P
333></LI
334><LI
335CLASS="STEP"
336><P
337>Enable TFTP by means of the following: <TABLE
338BORDER="5"
339BGCOLOR="#E0E0F0"
340WIDTH="70%"
341><TR
342><TD
343><PRE
344CLASS="PROGRAMLISTING"
345>/sbin/chkconfig tftp on</PRE
346></TD
347></TR
348></TABLE
349>Reload the xinetd configuration using the command:<TABLE
350BORDER="5"
351BGCOLOR="#E0E0F0"
352WIDTH="70%"
353><TR
354><TD
355><PRE
356CLASS="PROGRAMLISTING"
357> /sbin/service xinetd reload </PRE
358></TD
359></TR
360></TABLE
361>Create the directory /tftpboot
362using the command <TABLE
363BORDER="5"
364BGCOLOR="#E0E0F0"
365WIDTH="70%"
366><TR
367><TD
368><PRE
369CLASS="PROGRAMLISTING"
370>mkdir /tftpboot</PRE
371></TD
372></TR
373></TABLE
374></P
375></LI
376></OL
377></DIV
378><DIV
379CLASS="NOTE"
380><BLOCKQUOTE
381CLASS="NOTE"
382><P
383><B
384>NOTE: </B
385>Under Red Hat 7 you must address files by absolute pathnames, for example: <TT
386CLASS="FILENAME"
387>/tftpboot/boot.img</TT
388> not <TT
389CLASS="FILENAME"
390>/boot.img</TT
391>, as you may have done with
392other implementations.</P
393></BLOCKQUOTE
394></DIV
395></DIV
396><DIV
397CLASS="SECT3"
398><H3
399CLASS="SECT3"
400><A
401NAME="AEN229"
402>Enable BOOTP/DHCP server on Red Hat Linux</A
403></H3
404><P
405>First, ensure that you have
406the proper package, <SAMP
407CLASS="COMPUTEROUTPUT"
408>dhcp</SAMP
409> (not <SAMP
410CLASS="COMPUTEROUTPUT"
411>dhcpd</SAMP
412>) installed. The DHCP server provides Dynamic Host Configuration,
413that is, IP address and other data to hosts on a network. It does this in
414different ways. Next, there can be a fixed relationship between a certain
415node and the data, based on that node&#8217;s unique Ethernet Station Address
416(ESA, sometimes called a MAC address). The other possibility is simply to
417assign addresses that are free. The sample DHCP configuration file shown does
418both. Refer to the DHCP documentation for more details.</P
419><DIV
420CLASS="EXAMPLE"
421><A
422NAME="AEN240"
423></A
424><P
425><B
426>Example 1-1. Sample DHCP configuration file</B
427></P
428><TABLE
429BORDER="5"
430BGCOLOR="#E0E0F0"
431WIDTH="70%"
432><TR
433><TD
434><PRE
435CLASS="PROGRAMLISTING"
436>--------------- /etc/dhcpd.conf -----------------------------
437default-lease-time 600;
438max-lease-time 7200;
439option subnet-mask 255.255.255.0;
440option broadcast-address 192.168.1.255;
441option domain-name-servers 198.41.0.4, 128.9.0.107;
442option domain-name &#8220;bogus.com&#8221;;
443allow bootp;
444shared-network BOGUS {
445subnet 192.168.1.0 netmask 255.255.255.0 {
446         option routers 192.168.1.101;
447         range 192.168.1.1 192.168.1.254;
448}
449 }
450host mbx {
451         hardware ethernet 08:00:3E:28:79:B8;
452         fixed-address 192.168.1.20;
453         filename &#8220;/tftpboot/192.168.1.21/zImage&#8221;;
454         default-lease-time -1;
455         server-name &#8220;srvr.bugus.com&#8221;;
456         server-identifier 192.168.1.101;
457         option host-name &#8220;mbx&#8221;;
458} </PRE
459></TD
460></TR
461></TABLE
462></DIV
463><P
464>Once the DHCP package has been installed and the configuration file
465set up, type:<TABLE
466BORDER="5"
467BGCOLOR="#E0E0F0"
468WIDTH="70%"
469><TR
470><TD
471><PRE
472CLASS="SCREEN"
473># <KBD
474CLASS="USERINPUT"
475>service dhcpd start</KBD
476></PRE
477></TD
478></TR
479></TABLE
480></P
481></DIV
482><DIV
483CLASS="SECT3"
484><H3
485CLASS="SECT3"
486><A
487NAME="AEN246"
488>Enable DNS server on Red Hat Linux</A
489></H3
490><P
491>First, ensure that you have the proper
492RPM package, <SAMP
493CLASS="COMPUTEROUTPUT"
494>caching-nameserver</SAMP
495>
496installed. Then change the configuration
497(in <TT
498CLASS="FILENAME"
499>/etc/named.conf</TT
500>) so that the
501<SAMP
502CLASS="COMPUTEROUTPUT"
503>forwarders</SAMP
504> point to the primary
505nameservers for your machine, normally using the nameservers listed in
506<TT
507CLASS="FILENAME"
508>/etc/resolv.conf</TT
509>.</P
510><DIV
511CLASS="EXAMPLE"
512><A
513NAME="AEN256"
514></A
515><P
516><B
517>Example 1-2. Sample <TT
518CLASS="FILENAME"
519>/etc/named.conf</TT
520> for Red Hat Linux 7.x</B
521></P
522><TABLE
523BORDER="5"
524BGCOLOR="#E0E0F0"
525WIDTH="70%"
526><TR
527><TD
528><PRE
529CLASS="PROGRAMLISTING"
530>--------------- /etc/named.conf -----------------------------
531// generated by named-bootconf.pl
532
533options {
534        directory "/var/named";
535        /*
536         * If there is a firewall between you and nameservers you want
537         * to talk to, you might need to uncomment the query-source
538         * directive below.  Previous versions of BIND always asked
539         * questions using port 53, but BIND 8.1 uses an unprivileged
540         * port by default.
541         */
542        // query-source address * port 53;
543
544
545        forward first;
546        forwarders {
547                212.242.40.3;
548                212.242.40.51;
549        };
550};
551
552//
553// a caching only nameserver config
554//
555// Uncomment the following for Red Hat Linux 7.2 or above:
556// controls {
557//         inet 127.0.0.1 allow { localhost; } keys { rndckey; };
558// };
559// include "/etc/rndc.key";
560zone "." IN {
561        type hint;
562        file "named.ca";
563};
564
565zone "localhost" IN {
566        type master;
567        file "localhost.zone";
568        allow-update { none; };
569};
570
571zone "0.0.127.in-addr.arpa" IN {
572        type master;
573        file "named.local";
574        allow-update { none; };
575};&#13;</PRE
576></TD
577></TR
578></TABLE
579></DIV
580><P
581>Make sure the server is started with the command:
582<TABLE
583BORDER="5"
584BGCOLOR="#E0E0F0"
585WIDTH="70%"
586><TR
587><TD
588><PRE
589CLASS="SCREEN"
590># <KBD
591CLASS="USERINPUT"
592>service named start</KBD
593></PRE
594></TD
595></TR
596></TABLE
597> and is
598started on next reboot with the command
599<TABLE
600BORDER="5"
601BGCOLOR="#E0E0F0"
602WIDTH="70%"
603><TR
604><TD
605><PRE
606CLASS="SCREEN"
607># <KBD
608CLASS="USERINPUT"
609>chkconfig named on</KBD
610></PRE
611></TD
612></TR
613></TABLE
614>
615Finally, you may wish to change
616<TT
617CLASS="FILENAME"
618>/etc/resolv.conf</TT
619> to use
620<SAMP
621CLASS="COMPUTEROUTPUT"
622>127.0.0.1</SAMP
623> as the nameserver for your
624local machine.</P
625></DIV
626><DIV
627CLASS="SECT3"
628><H3
629CLASS="SECT3"
630><A
631NAME="AEN267"
632>RedBoot network gateway</A
633></H3
634><P
635>RedBoot cannot communicate with
636machines on different subnets because it does not support routing. It always
637assumes that it can get to an address directly, therefore it always tries
638to ARP and then send packets directly to that unit. This means that whatever
639it talks to must be on the same subnet. If you need to talk to a host on a
640different subnet (even if it's on the same &#8216;wire&#8217;), you need to
641go through an ARP proxy, providing that there is a Linux box connected to
642the network which is able to route to the TFTP server. For example: <TT
643CLASS="FILENAME"
644>/proc/sys/net/ipv4/conf/<TT
645CLASS="REPLACEABLE"
646><I
647>&lt;interface&#62;</I
648></TT
649>/proxy_arp </TT
650>where <TT
651CLASS="REPLACEABLE"
652><I
653>&lt;interface&#62;</I
654></TT
655>should be replaced with whichever network interface
656is directly connected to the board.</P
657></DIV
658></DIV
659><DIV
660CLASS="SECT2"
661><H2
662CLASS="SECT2"
663><A
664NAME="AEN277"
665>Verification</A
666></H2
667><P
668>Once your network setup
669has been configured, perform simple verification tests as follows: <P
670></P
671><UL
672><LI
673><P
674>Reboot your system, to enable the setup, and then try to &#8216;ping&#8217;
675the target board from a host.</P
676></LI
677><LI
678><P
679>Once communication has been established, try to ping
680a host using the RedBoot ping command - both by IP address and hostname.</P
681></LI
682><LI
683><P
684>Try using the RedBoot load command to download a file
685from a host.</P
686></LI
687></UL
688></P
689></DIV
690><DIV
691CLASS="SECT2"
692><H2
693CLASS="SECT2"
694><A
695NAME="AEN291"
696>Multiple Network Devices</A
697></H2
698><P
699>&#13;RedBoot may support more than one network device. For instance a dual port
700NIC may be used or multiple PCI based NICs may be supported. RedBoot
701will only use one network device no matter how many are configured into
702the system. Preference for the device to use may be specified with the
703<B
704CLASS="COMMAND"
705>fconfig</B
706> command. Suppose that a RedBoot is configured
707for two i82559 based NICs. These devices will typically be named
708<SAMP
709CLASS="COMPUTEROUTPUT"
710>i82559_eth0</SAMP
711> and <SAMP
712CLASS="COMPUTEROUTPUT"
713>i82559_eth1</SAMP
714>. To tell RedBoot to try the eth1 device first, use:
715<TABLE
716BORDER="5"
717BGCOLOR="#E0E0F0"
718WIDTH="70%"
719><TR
720><TD
721><PRE
722CLASS="SCREEN"
723>RedBoot&#62; <KBD
724CLASS="USERINPUT"
725>fconfig net_device</KBD
726>
727net_device: <KBD
728CLASS="USERINPUT"
729>i82559_eth1</KBD
730>
731Update RedBoot non-volatile configuration - continue (y/n)? <KBD
732CLASS="USERINPUT"
733>y</KBD
734></PRE
735></TD
736></TR
737></TABLE
738>
739If the default network device is not found, RedBoot will search for other
740network devices and use the first one found. Please see the platform specific
741documentation sections of this manual for details on the network devices and
742their names supported by a specific platform.</P
743></DIV
744></DIV
745><DIV
746CLASS="NAVFOOTER"
747><HR
748ALIGN="LEFT"
749WIDTH="100%"><TABLE
750SUMMARY="Footer navigation table"
751WIDTH="100%"
752BORDER="0"
753CELLPADDING="0"
754CELLSPACING="0"
755><TR
756><TD
757WIDTH="33%"
758ALIGN="left"
759VALIGN="top"
760><A
761HREF="user-interface.html"
762ACCESSKEY="P"
763>Prev</A
764></TD
765><TD
766WIDTH="34%"
767ALIGN="center"
768VALIGN="top"
769><A
770HREF="redboot.html"
771ACCESSKEY="H"
772>Home</A
773></TD
774><TD
775WIDTH="33%"
776ALIGN="right"
777VALIGN="top"
778><A
779HREF="redboot-commands-and-examples.html"
780ACCESSKEY="N"
781>Next</A
782></TD
783></TR
784><TR
785><TD
786WIDTH="33%"
787ALIGN="left"
788VALIGN="top"
789>User Interface</TD
790><TD
791WIDTH="34%"
792ALIGN="center"
793VALIGN="top"
794><A
795HREF="getting-started-with-redboot.html"
796ACCESSKEY="U"
797>Up</A
798></TD
799><TD
800WIDTH="33%"
801ALIGN="right"
802VALIGN="top"
803>RedBoot Commands and Examples</TD
804></TR
805></TABLE
806></DIV
807></BODY
808></HTML
809>
Note: See TracBrowser for help on using the repository browser.