[U-Boot] [RFC 3/3] xpedite5370: Add uboot-doc support

John Schmoller
2009-07-28T16:34:03Z

Add uboot-doc support to the XPedite5370. Incorporates
templates to override the defaults and includes memory
maps.

Signed-off-by: John Schmoller <jschmoller@xes-inc.com>
---
board/xes/xpedite5370/manual/book_info.tmpl | 52 ++++++
board/xes/xpedite5370/manual/booting_linux.tmpl | 179 ++++++++++++++++++++
board/xes/xpedite5370/manual/booting_vxworks.tmpl | 166 ++++++++++++++++++
board/xes/xpedite5370/manual/manual.tmpl | 30 ++++
board/xes/xpedite5370/manual/redundant_images.tmpl | 50 ++++++
board/xes/xpedite5370/manual/scripting.tmpl | 168 ++++++++++++++++++
include/configs/XPEDITE5370.h | 47 +++++
7 files changed, 692 insertions(+), 0 deletions(-)
create mode 100644 board/xes/xpedite5370/manual/book_info.tmpl
create mode 100644 board/xes/xpedite5370/manual/booting_linux.tmpl
create mode 100644 board/xes/xpedite5370/manual/booting_vxworks.tmpl
create mode 100644 board/xes/xpedite5370/manual/manual.tmpl
create mode 100644 board/xes/xpedite5370/manual/redundant_images.tmpl
create mode 100644 board/xes/xpedite5370/manual/scripting.tmpl

diff --git a/board/xes/xpedite5370/manual/book_info.tmpl b/board/xes/xpedite5370/manual/book_info.tmpl
new file mode 100644
index 0000000..3e6ec85
--- /dev/null
+++ b/board/xes/xpedite5370/manual/book_info.tmpl
@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<info>
+ ${BOARD} U-Boot Manual
+ <subtitle>U-Boot User&apos;s Manual</subtitle>
+ <releaseinfo>U-Boot version: ${VERSION}</releaseinfo>
+ <titleabbrev>${BOARD}</titleabbrev>
+ <pubdate>${DATE}</pubdate>
+
+ <personname>Extreme Engineering Solutions, Inc.</personname>
+ <street>3225 Demming Way, Suite 120</street>
+ <city>Middleton, </city>
+ <state>WI </state>
+ <postcode>53562-1408 </postcode>
+ <country>USA</country>
+ <phone>Phone: (608) 833-1155</phone>
+ <fax>Fax: (608) 827-6171</fax>
+ <uri>Web: http://xes-inc.com</uri>
+ <email>E-mail: sales at xes-inc.com</email>
+
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="/home/jschmoller/trunk/share/src/images/xes_logo_with_name_left.svg"/>
+ </imageobject>
+ </mediaobject>
+ <legalnotice>
+
+ U-Boot is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public License as
+ published by the Free Software Foundation; either version 2 of
+ the License, or (at your option) any later version.
+
+
+
+ U-Boot is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the
+ <orgname>Free Software Foundation, Inc.</orgname>,
+ <street>59 Temple Place, Suite 330</street>
+ <city>Boston</city>, <state>MA</state> <postcode>02111-1307</postcode>
+ <country>USA</country>
+
+
+ </legalnotice>
+</info>
+
diff --git a/board/xes/xpedite5370/manual/booting_linux.tmpl b/board/xes/xpedite5370/manual/booting_linux.tmpl
new file mode 100644
index 0000000..d026d1b
--- /dev/null
+++ b/board/xes/xpedite5370/manual/booting_linux.tmpl
@@ -0,0 +1,179 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<chapter version="5.0" xml:id="uboot_booting_linux_chapter"
+ xmlns="http://docbook.org/ns/docbook"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ Booting Linux
+
+
+ <sect1 xml:id="uboot_booting_linux">
+ Booting Linux with U-Boot
+ <sect2 xml:id="uboot_booting_linux_intro">
+ Booting Linux
+ The following is intended to be a Quick Start guide for booting a
+ Linux kernel. More information can be found in your Linux Manual.
+
+
+ Your Linux kernel can be booted from either RAM or from Flash.
+ Images booted from RAM will need to be downloaded from the network
+ using tftp
+ on every reset. Images booted from Flash will be copied from Flash to
+ RAM automatically.
+
+
+ <sect3 xml:id="uboot_booting_linux_ram">
+ Booting from RAM
+ To boot an image from RAM, you will need to have your Linux
+ kernel and Flat Device Tree image on a TFTP server. See
+
+ Networking for more information about
+ TFTP and TFTP servers. Next, you will need to set up your
+
+ network environment variables to point to
+ your TFTP server.
+#ifdef CONFIG_CMD_DHCP
+ You can use a DHCP server to accomplish this if
+ your network has one set up using the
+ dhcp command.
+#endif
+ Set osfile
+ to the path to your Linux kernel on your TFTP server and set
+ fdtfile
+ to the path to your Flat Device Tree image on your TFTP server.
+ Finally,
+ type run
+
+ bootcmd_net to download and boot your
+ Linux kernel. This option assumes you are booting an NFS file system.
+
+
+ Your console input/output should look something like this.
+ <screen>
+=> run bootcmd_net
+Enet starting in 1000BT/FD
+Speed: 1000, full duplex
+Using eTSEC1 device
+TFTP from server 10.52.0.33; our IP address is 10.52.250.134; sending through gateway 10.52.0.1
+Filename &apos;/home/jschmoller/uImage-XPedite5370-S2.6.23.17-fsl_r1&apos;.
+Load address: 0x1000000
+Loading: *###############################################################
+ #################################################################
+ #################################################################
+ #################################################################
+ ######
+done
+Bytes transferred = 3901275 (3b875b hex)
+Enet starting in 1000BT/FD
+Speed: 1000, full duplex
+Using eTSEC1 device
+TFTP from server 10.52.0.33; our IP address is 10.52.250.134; sending through gateway 10.52.0.1
+Filename &apos;/home/jschmoller/xpedite5370.dtb-XPedite5370-S2.6.23.17-fsl_r1&apos;.
+Load address: 0xc00000
+Loading: *##
+done
+Bytes transferred = 16384 (4000 hex)
+## Booting kernel from Legacy Image at 01000000 ...
+ Image Name: Linux-2.6.23.17-fsl_r1
+ Created: 2008-08-06 16:46:04 UTC
+ Image Type: PowerPC Linux Kernel Image (gzip compressed)
+ Data Size: 3901211 Bytes = 3.7 MB
+ Load Address: 00000000
+ Entry Point: 00000000
+ Verifying Checksum ... OK
+ Uncompressing Kernel Image ... OK
+ </screen>
+
+ </sect3>
+
+ <sect3 xml:id="uboot_booting_linux_flash">
+ Booting from Flash
+ To boot an image from Flash, you will need to follow a similar
+ procedure to load the Kernel and FDT for the first time. Make sure
+ you have your Kernel and FDT on your TFTP server. Set your
+
+ network environment variables to point to
+ your TFTP server. Set
+ osfile to
+ the path to your Linux kernel on your TFTP server and set
+ fdtfile
+ to the path to your Flat Device Tree image on your TFTP server. Then,
+ type run
+ prog_os1
+ to load the Primary OS, or type
+ run
+ prog_os2 to load the Secondary OS. Next,
+ you&apos;ll need to load the FDT by running either
+
+ prog_fdt1 or
+ prog_fdt2 . Once the image and FDT are
+ loaded into Flash, you can boot the Primary Image by typing
+ run
+
+ bootcmd_flash1 at the prompt or you can
+ boot the Secondary Image by typing
+ run
+
+ bootcmd_flash2 at the prompt.
+
+
+ Your console input/output should look something like this.
+ <screen>
+=> setenv gatewayip 10.52.0.1
+=> setenv netmask 255.255.255.0
+=> setenv ipaddr 10.52.250.134
+=> setenv serverip 10.52.0.33
+=> setenv osfile /home/jschmoller/uImage-XPedite5370-S2.6.23.17-fsl_r1
+=> setenv fdtfile /home/jschmoller/xpedite5370.dtb-XPedite5370-S2.6.23.17-fsl_r1
+=> run prog_os1
+Enet starting in 1000BT/FD
+Speed: 1000, full duplex
+Using eTSEC1 device
+TFTP from server 10.52.0.33; our IP address is 10.52.254.15
+Filename &apos;/home/jschmoller/uImage-XPedite5370-S2.6.23.17-fsl_r1&apos;.
+Load address: 0x1000000
+Loading: #################################################################
+ #################################################################
+ #################################################################
+ #################################################################
+ ######
+done
+Bytes transferred = 3901275 (3b875b hex)
+
+.............................. done
+Erased 30 sectors
+Copy to Flash... done
+Total of 3901275 bytes were the same
+OS PROGRAM SUCCEEDED
+
+=> run prog_fdt1
+Enet starting in 1000BT/FD
+Speed: 1000, full duplex
+Using eTSEC1 device
+TFTP from server 10.52.0.33; our IP address is 10.52.250.134
+Filename &apos;/home/jschmoller/xpedite5370.dtb-XPedite5370-S2.6.23.17-fsl_r1&apos;.
+Load address: 0xc00000
+Loading: ##
+done
+Bytes transferred = 16384 (4000 hex)
+
+. done
+Erased 1 sectors
+Copy to Flash... done
+Total of 16384 bytes were the same
+FDT PROGRAM SUCCEEDED
+=> run bootcmd_flash1
+## Booting kernel from Legacy Image at fef00000 ...
+ Image Name: Linux-2.6.23.17-fsl_r1
+ Created: 2008-08-06 16:46:04 UTC
+ Image Type: PowerPC Linux Kernel Image (gzip compressed)
+ Data Size: 3901211 Bytes = 3.7 MB
+ Load Address: 00000000
+ Entry Point: 00000000
+ Verifying Checksum ... OK
+ Uncompressing Kernel Image ... OK
+ </screen>
+
+ </sect3>
+ </sect2>
+ </sect1>
+</chapter>
diff --git a/board/xes/xpedite5370/manual/booting_vxworks.tmpl b/board/xes/xpedite5370/manual/booting_vxworks.tmpl
new file mode 100644
index 0000000..c10ba6f
--- /dev/null
+++ b/board/xes/xpedite5370/manual/booting_vxworks.tmpl
@@ -0,0 +1,166 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<chapter version="5.0" xml:id="uboot_booting_vxworks_chapter"
+ xmlns="http://docbook.org/ns/docbook"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ Booting VxWorks
+
+ <sect1 xml:id="uboot_booting_vxworks">
+ Booting VxWorks with U-Boot
+ <sect2 os="vxworks" xml:id="uboot_booting_vxworks_intro">
+ VxWorks
+
+ The following is intended to be a Quick Start guide for booting a
+ VxWorks image. More information can be found in your VxWorks Manual.
+
+
+ VxWorks images can be booted from either RAM or Flash. VxWorks
+ images also come in a uImage format and an ELF format. The boot
+ command for an ELF image is
+ bootvx and the boot command for a uImage is
+ bootm .
+
+
+ <sect3 xml:id="uboot_booting_vxworks_ram">
+ Booting from RAM
+ VxWorks requires a string of arguments to be passed to it in
+ order to function properly. To boot from RAM, begin by setting the
+
+ root_args string to something like the
+ following: motetsec(0,0)host:<Path to VxWorks image>
+ h=&lt;Host IP&gt; e=&lt;Board IP&gt;:&lt;Netmask&gt; u=drives
+ pw=drives and the
+ misc_args to f=0x0 .
+ Replace the items in &lt;&gt;&apos;s with the appropriate values.
+ Next, configure your
+ network environment variables to point to
+ your TFTP server. Download the VxWorks image by typing
+ tftpboot
+ 0x1000000 <Path to VxWorks image> . Finally,
+ use the boot command specified above and type
+ <Boot Command> 0x1000000 at the prompt to
+ finish booting your VxWorks image.
+
+
+ Your console input/output should look something like this.
+ <screen>
+=> setenv root_args motetsec(0,0)host:/home/mstarzewski/xes8572-vxWorks.st
+h=10.52.0.33 e=10.52.250.134:ffff0000 u=drives pw=drives
+=> setenv misc_args f=0x0
+=> setenv gatewayip 10.52.0.1
+=> setenv netmask 255.255.255.0
+=> setenv ipaddr 10.52.250.134
+=> setenv serverip 10.52.0.33
+=> tftp 1000000 /home/mstarzewski/xes8572-vxWorks.st
+Enet starting in 1000BT/FD
+
+Speed: 1000, full duplex
+Using eTSEC1 device
+TFTP from server 10.52.0.33; our IP address is 10.52.250.134; sending through gateway 10.52.0.1
+Filename &apos;/home/mstarzewski/xes8572-vxWorks.st&apos;.
+Load address: 0x1000000
+Loading: #################################################################
+ ######################################################
+done
+Bytes transferred = 1740761 (1a8fd9 hex)
+=> bootvx 1000000
+## Ethernet MAC address not copied to NV RAM
+Loading .text @ 0x00100000 (1263808 bytes)
+Loading .sdata2 @ 0x002348c0 (432 bytes)
+Loading .data @ 0x00234a70 (128320 bytes)
+Loading .sdata @ 0x00253fb0 (2752 bytes)
+Clearing .sbss @ 0x00254a70 (2144 bytes)
+Clearing .bss @ 0x002552d0 (252128 bytes)
+## Using bootline (@ 0x4200): motetsec(0,0)host:/home/mstarzewski/xes8572-vxWorks.st
+h=10.52.0.33 e=10.52.250.134:ffff0000 u=drives pw=drives f=0x0
+## Starting vxWorks at 0x00100000 ...
+Target Name: vxTarget
+...
+ </screen>
+
+ </sect3>
+
+ <sect3>
+ Booting from Flash
+ VxWorks requires a string of arguments to be passed to it in
+ order to function properly. To boot from Flash, begin by setting the
+
+ root_args string to something like the
+ following: motetsec(0,0)host:
+ &lt;Path to VxWorks image&gt; h=&lt;Host IP&gt; e=&lt;Board IP&gt;:
+ <Netmask> u=drives pw=drives and the
+
+ misc_args to f=0x0 .
+ Replace the items in &lt;&gt;&apos;s with the appropriate values.
+ Next, configure your
+ network environment variables to point to
+ your TFTP server. Download the VxWorks image by typing
+ tftpboot
+ 1000000 <Path to VxWorks image> . To program
+ the image to Flash, start by clearing space for it. For the Primary
+ image, type erase
+ fef00000 +&
+ filesize
+ and for the Secondary image, type
+ erase f6f00000
+
+ +$filesize . Next, copy the image from RAM
+ to Flash. Type
+ cp.b
+ 1000000 fef00000 $filesize for the Primary image
+ and cp.b
+ 1000000 f6f00000 $filesize for the Secondary image.
+ Finally, use the boot command specified above and type
+ <Boot Command> fef00000 or
+ <Boot Command> f6f00000 at the prompt to
+ finish booting your VxWorks image.
+
+
+ Your console input/output should look something like this.
+ <screen>
+=> setenv root_args motetsec(0,0)host:/home/mstarzewski/xes8572-vxWorks.st
+h=10.52.0.33 e=10.52.250.134:ffff0000 u=drives pw=drives
+=> setenv misc_args f=0x0
+=> setenv gatewayip 10.52.0.1
+=> setenv netmask 255.255.255.0
+=> setenv ipaddr 10.52.250.134
+=> setenv serverip 10.52.0.33
+=> tftp 1000000 /home/mstarzewski/xes8572-vxWorks.st
+Enet starting in 1000BT/FD
+Speed: 1000, full duplex
+Using eTSEC1 device
+TFTP from server 10.52.0.33; our IP address is 10.52.250.134; sending through gateway 10.52.0.1
+Filename &apos;/home/mstarzewski/xes8572-vxWorks.st&apos;.
+Load address: 0x1000000
+Loading: #################################################################
+ ######################################################
+done
+Bytes transferred = 1740761 (1a8fd9 hex)
+=> erase fef00000 +$filesize
+
+.............. done
+Erased 14 sectors
+=> cp.b 1000000 fef00000 $filesize
+
+Copy to Flash... done
+=> bootvx fef00000
+## Ethernet MAC address not copied to NV RAM
+Loading .text @ 0x00100000 (1296720 bytes)
+Loading .sdata2 @ 0x0023c950 (192 bytes)
+Loading .data @ 0x0023ca20 (136656 bytes)
+Loading .sdata @ 0x0025dff0 (2384 bytes)
+Clearing .sbss @ 0x0025e940 (2240 bytes)
+Clearing .bss @ 0x0025f200 (251184 bytes)
+## Using bootline (@ 0x4200): motetsec(0,0)host:/home/mstarzewski/xes8572-vxWorks.st
+h=10.52.0.33 e=10.52.250.134:ffff0000 u=drives pw=drives f=0x0
+## Starting vxWorks at 0x00100000 ...
+Target Name: vxTarget
+...
+ </screen>
+
+ </sect3>
+ </sect2>
+ </sect1>
+</chapter>
+
+
diff --git a/board/xes/xpedite5370/manual/manual.tmpl b/board/xes/xpedite5370/manual/manual.tmpl
new file mode 100644
index 0000000..dfac2e6
--- /dev/null
+++ b/board/xes/xpedite5370/manual/manual.tmpl
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<book xmlns="http://docbook.org/ns/docbook"
+ xmlns:xi="http://www.w3.org/2001/XInclude"
+ version="5.0"
+ xml:id="uboot_manual">
+
+ <xi:include href="${TOPDIR}/doc/manual/book_info.xml"/>
+
+ <xi:include href="${TOPDIR}/doc/manual/introduction.xml"/>
+
+ <xi:include href="${TOPDIR}/doc/manual/setup.xml"/>
+
+ <xi:include href="${TOPDIR}/doc/manual/booting_linux.xml"/>
+
+ <xi:include href="${TOPDIR}/doc/manual/booting_vxworks.xml"/>
+
+ <xi:include href="${TOPDIR}/doc/manual/memory_resources.xml"/>
+
+ <xi:include href="${TOPDIR}/doc/manual/redundant_images.xml"/>
+
+ <xi:include href="${TOPDIR}/doc/manual/posts.xml"/>
+
+ <xi:include href="${TOPDIR}/doc/manual/environment_variables.xml"/>
+
+ <xi:include href="${TOPDIR}/doc/manual/commands.xml"/>
+
+ <xi:include href="${TOPDIR}/doc/manual/scripting.xml"/>
+
+</book>
diff --git a/board/xes/xpedite5370/manual/redundant_images.tmpl b/board/xes/xpedite5370/manual/redundant_images.tmpl
new file mode 100644
index 0000000..af6000c
--- /dev/null
+++ b/board/xes/xpedite5370/manual/redundant_images.tmpl
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<chapter version="5.0" xml:id="uboot_redundant_images_chapter"
+ xmlns="http://docbook.org/ns/docbook"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ Redundant Images
+
+ <sect1 xml:id="uboot_redundant_images">
+ Using Redundant Images with U-Boot
+ The ${BOARD} has two Flash banks, which can be used to hold dual or
+ redundant images. The board is configured with dual U-Boot images (see
+
+ U-Boot Recommended Memory Regions ). It can
+ also be configured with dual or redundant OS images. Sometimes it is
+ advantageous to store two different kernels in the primary and secondary
+ partitions. For example, the most recent version of the user&apos;s kernel
+ image could be stored in one partition, while a previous stable version
+ is kept in the other.
+
+
+ Or, one kernel could be compiled with debug enabled
+ and the other without. Or the two OS partitions can also be used for
+ redundancy. The U-Boot uImage file has support for checksumming and can
+ be used to verify the integrity of an image. If the checksum fails on one
+ partition, U-Boot can be configured to boot the other partition&apos;s
+ image. This fallback image could be a carbon copy of the first, or could
+ send out notification of the first image&apos;s failure. Fallback is
+ easily configured; the fallback image does not necessarily need to be
+ from the same boot device.
+
+
+ For example, if the checksum fails on an
+ image in flash, the fallback image could be downloaded over Ethernet.
+ For example, a simple script for booting one uImage and failing over to
+ the second could be written as
+ setenv
+ bootcmd
+ bootm
+ 0xfef00000\;
+ bootm
+ 0xf6f00000 . In this example, U-Boot will attempt to
+ boot the Primary OS and will not return if the checksum is valid so
+ Secondary OS will not be called. If the Primary OS is corrupt, U-Boot
+ will return to a prompt where the Secondary OS will be executed.
+
+ </sect1>
+</chapter>
+
+
+
diff --git a/board/xes/xpedite5370/manual/scripting.tmpl b/board/xes/xpedite5370/manual/scripting.tmpl
new file mode 100644
index 0000000..f5e8a43
--- /dev/null
+++ b/board/xes/xpedite5370/manual/scripting.tmpl
@@ -0,0 +1,168 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<chapter version="5.0" xml:id="uboot_scripting_chapter"
+ xmlns="http://docbook.org/ns/docbook"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ Scripting
+
+ <sect1 xml:id="uboot_scripting">
+ Scripting in U-Boot
+ <sect2 xml:id="uboot_scripting_dollar_sign">
+ Variable Expansion with $
+ Variable substitution can be done with the $ character. For
+ instance,
+ printenv
+ bootargs could also be executed with
+ echo
+ $bootargs .
+ More powerfully, this variable substitution can be used in scripting.
+ See the example in the next section.
+
+ </sect2>
+
+ <sect2 xml:id="uboot_scripting_conditionals">
+ Conditionals
+ U-Boot has a scripting language which can be used to customize
+ command execution. It contains if..then..else..fi, for..do..done,
+ while..do..done and until..do..done control flow operations.
+
+
+ As an example, take the X-ES environment variable
+
+ bootcmd_net .
+ <screen>
+bootcmd_net=run set_bootargs; $download_cmd $osaddr $osfile; if test $? -eq 0;
+then if test -n $fdtaddr; then $download_cmd $fdtaddr $fdtfile;
+if test $? -eq 0; then bootm $osaddr - $fdtaddr; else; echo FDT DOWNLOAD FAILED;
+fi; else; bootm $osaddr; fi; else; echo OS DOWNLOAD FAILED; fi;
+ </screen>
+ To walk through the script, we start with
+ run
+
+ set_bootargs , which executes the commands
+ stored in
+ set_bootargs . Next, we execute the command
+ stored in
+ download_cmd which in most cases is
+ dhcp or
+ tftp and
+ download the file stored in
+ osfile to the address stored in
+ osaddr . The
+ next step is interesting. We start an if conditional,
+ and use the
+ test command to check to see if the return
+ value ( $? ) of the
+
+ download_cmd is 0 . If it
+ isn&apos;t, meaning the download failed, we find the matching
+ then and see that we echo
+ DOWNLOAD FAILED . If it is 0
+ meaning the download completed successfully, we start a new
+ if conditional and test to see if
+ fdtaddr is
+ defined. If it is, use
+ download_cmd to download the file stored in
+ fdtfile to
+ the address stored in
+ fdtaddr . Again, we verify that the download
+ completed successfully. If everything has worked up until now, we
+ complete the script with
+ bootm
+ osaddr
+ -
+ fdtaddr and boot the image we just downloaded.
+ If fdtaddr
+ had been undefined, we would have executed
+ bootm
+ osaddr
+ instead.
+
+ </sect2>
+
+ <sect2 xml:id="uboot_scripting_and_or">
+ && and ||
+ Another feature of the U-Boot scripting language are the
+ && and || functions. The
+ && is an if and only if command. For
+ instance, the command
+ echo
+ $do_stuff &&
+ run
+ $do_stuff would run do_stuff
+ only if the
+ echo command returned successfully, meaning
+ that do_stuff is defined. If
+ do_stuff was not defined, the
+ run command
+ would not be executed. Similarly, the || command will
+ execute the second command only if the first command fails. For
+ instance, if bank1 stored the location of the OS in
+ flash bank 1 and bank2 stored the location of the
+ OS in flash bank 2, the following command would try to boot the image
+ in bank 1. If unsuccessful it would boot the image in bank 2. If that
+ failed, it would attempt to download the file over the network, and if
+ that succeeded, it would boot the image.
+ <screen>
+ bootm $bank1 || bootm $bank2 || tftp $osaddr $osfile && bootm
+ </screen>
+
+ </sect2>
+
+ <sect2 xml:id="uboot_scripting_quotes_and_ticks">
+ Quotes and tick marks
+ Quotation marks and tick marks also have a special meaning in
+ U-Boot scripting. Let&apos;s say you wanted to create an environment
+ variable called do_stuff and this variable was going
+ to run
+ set_bootargs then run
+ bootcmd .
+ Depending on how you format the command, it&apos;s execution will
+ change. You could save the command as
+ <screen>
+setenv do_stuff &quot;run $set_bootargs; run $bootcmd&quot;
+ </screen>
+ When you
+ printenv do_stuff you
+ should see something like
+ <screen>
+do_stuff=run setenv bootargs ${console_args} ${root_args} ${misc_args}; run run bootcmd_flash1
+ </screen>
+ Notice how the variables specified with the $ were expanded. Now, if
+ you do the same thing, replacing the quotation marks with tick marks,
+ <screen>
+setenv do_stuff &apos;run $set_bootargs; run $bootcmd&apos;
+ </screen>
+ you will see different behavior.
+ <screen>
+do_stuff=run $set_bootargs; run $bootcmd
+ </screen>
+ Notice how the variables specified with the $ were not expanded. In
+ most cases, this would be the desired behavior as these variables
+ would be expanded when they are executed. Then, any changes made to
+
+ set_bootargs and
+ bootcmd
+ between the time that do_stuff was set and it was
+ run would change the functionality of do_stuff .
+ For example,
+ <screen>
+setenv printscript print
+setenv do_stuff &quot;$printscript&quot;
+setenv printscript echo do nothing
+run do_stuff
+ </screen>
+ would result in printing all the environment variables, rather than
+ printing &quot;do nothing&quot;, whereas
+ <screen>
+setenv printscript print
+setenv do_stuff &apos;$printscript&apos;
+setenv printscript echo do nothing
+run do_stuff
+ </screen>
+ would result in printing &quot;do nothing&quot;.
+
+ </sect2>
+ </sect1>
+</chapter>
+
diff --git a/include/configs/XPEDITE5370.h b/include/configs/XPEDITE5370.h
index acb62ad..9322789 100644
--- a/include/configs/XPEDITE5370.h
+++ b/include/configs/XPEDITE5370.h
@@ -70,6 +70,15 @@
#define CONFIG_SYS_SDRAM_BASE CONFIG_SYS_DDR_SDRAM_BASE
#define CONFIG_VERY_BIG_RAM

+/**
+ * @memmap: EEPROM Memory Map
+ * @entry: 0x2000: 0x3fff: Unused/Customer Available
+ * @entry: 0x1000: 0x1fff: Backup U-Boot Environment
+ * @entry: 0x0200: 0x0fff: Board Specific Information (SPD, etc.)
+ * @entry: 0x0100: 0x01ff: VxWorks Bootline (Optional)
+ * @entry: 0x0000: 0x00ff: Reset Configuration Data (Optional)
+ */
+
#ifndef __ASSEMBLY__
extern unsigned long get_board_sys_clk(unsigned long dummy);
extern unsigned long get_board_ddr_clk(unsigned long dummy);
@@ -117,6 +126,24 @@ extern unsigned long get_board_ddr_clk(unsigned long dummy);
* 0xf800_0000 0xffff_ffff NOR Flash 1 128M non-cacheable
*/

+/**
+ * @memmap: System Memory Map
+ * @entry: 0xf800_0000: 0xffff_ffff: NOR Flash 1
+ * @entry: 0xf000_0000: 0xf7ff_ffff: NOR Flash 2
+ * @entry: 0xef90_0000: 0xefff_ffff: Reserved
+ * @entry: 0xef80_0000: 0xef8f_ffff: NAND Flash
+ * @entry: 0xef10_0000: 0xef7f_ffff: Reserved
+ * @entry: 0xef00_0000: 0xef0f_ffff: CCSR/IMMR
+ * @entry: 0xe900_0000: 0xeeff_ffff: Reserved
+ * @entry: 0xe880_0000: 0xe8ff_ffff: PCI Express 2 I/O
+ * @entry: 0xe800_0000: 0xe87f_ffff: PCI Express 1 I/O
+ * @entry: 0xe000_0000: 0xe7ff_ffff: SRAM/SSRAM/L1 Cache
+ * @entry: 0xd000_0000: 0xdfff_ffff: Reserved
+ * @entry: 0xc000_0000: 0xcfff_ffff: PCI Express 2 Memory
+ * @entry: 0x8000_0000: 0xbfff_ffff: PCI Express 1 Memory
+ * @entry: 0x0000_0000: 0x7fff_ffff: DDR2 SDRAM
+ */
+
#define CONFIG_SYS_LBC_LCRR (LCRR_CLKDIV_4 | LCRR_EADC_3)

/*
@@ -147,6 +174,7 @@ extern unsigned long get_board_ddr_clk(unsigned long dummy);
#define CONFIG_SYS_FLASH_AUTOPROTECT_LIST { {0xfff40000, 0xc0000}, \
{0xf7f40000, 0xc0000} }
#define CONFIG_SYS_MONITOR_BASE TEXT_BASE /* start of monitor */
+#define CONFIG_REDUNDANT_MONITORS

/*
* Chip select configuration
@@ -435,6 +463,10 @@ extern unsigned long get_board_ddr_clk(unsigned long dummy);
#define CONFIG_ENV_SECT_SIZE 0x20000 /* 128k (one sector) for env */
#define CONFIG_ENV_SIZE 0x8000
#define CONFIG_ENV_ADDR (CONFIG_SYS_MONITOR_BASE - (256 * 1024))
+#define CONFIG_IPADDR 0.0.0.0
+#define CONFIG_SERVERIP 0.0.0.0
+#define CONFIG_GATEWAYIP 0.0.0.0
+#define CONFIG_NETMASK 255.255.0.0

/*
* Flash memory map:
@@ -450,6 +482,21 @@ extern unsigned long get_board_ddr_clk(unsigned long dummy);
* f6f00000 - f7efffff Sec OS image (16MB)
* f0000000 - f6efffff Sec OS Use/Filesystem (111MB)
*/
+
+/**
+ * @memmap: Recommended Flash Memory Map
+ * @entry: 0xfff8_0000: 0xffff_ffff: Primary U-Boot Image
+ * @entry: 0xfff4_0000: 0xfff7_ffff: Primary U-Boot Environment
+ * @entry: 0xfff0_0000: 0xfff3_ffff: Primary Flat-Device Tree
+ * @entry: 0xfef0_0000: 0xffef_ffff: Primary Operating System Image
+ * @entry: 0xf800_0000: 0xfeef_ffff: Primary Operating System Use/Filesystem
+ * @entry: 0xf7f8_0000: 0xf7ff_ffff: Secondary U-Boot Image
+ * @entry: 0xf7f4_0000: 0xf7f7_ffff: Secondary U-Boot Environment
+ * @entry: 0xf7f0_0000: 0xf7f3_ffff: Secondary Flat-Device Tree
+ * @entry: 0xf6f0_0000: 0xf7ef_ffff: Secondary Operating System Image
+ * @entry: 0xf000_0000: 0xf6ef_ffff: Secondary Operating System Use/Filesystem
+ */
+
#define CONFIG_UBOOT1_ENV_ADDR MK_STR(0xfff80000)
#define CONFIG_UBOOT2_ENV_ADDR MK_STR(0xf7f80000)
#define CONFIG_FDT1_ENV_ADDR MK_STR(0xfff00000)
--
1.6.0.4