<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://wiki.linux-xtensa.org/index.php?action=history&amp;feed=atom&amp;title=RedBoot_Example</id>
	<title>RedBoot Example - Revision history</title>
	<link rel="self" type="application/atom+xml" href="http://wiki.linux-xtensa.org/index.php?action=history&amp;feed=atom&amp;title=RedBoot_Example"/>
	<link rel="alternate" type="text/html" href="http://wiki.linux-xtensa.org/index.php?title=RedBoot_Example&amp;action=history"/>
	<updated>2026-05-05T01:08:40Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.39.3</generator>
	<entry>
		<id>http://wiki.linux-xtensa.org/index.php?title=RedBoot_Example&amp;diff=152&amp;oldid=prev</id>
		<title>Marc: Example RedBoot Setup for Booting Linux</title>
		<link rel="alternate" type="text/html" href="http://wiki.linux-xtensa.org/index.php?title=RedBoot_Example&amp;diff=152&amp;oldid=prev"/>
		<updated>2008-07-16T01:17:41Z</updated>

		<summary type="html">&lt;p&gt;Example RedBoot Setup for Booting Linux&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;= Booting Linux Using RedBoot =&lt;br /&gt;
&lt;br /&gt;
Here is an example series of steps that setup RedBoot to boot Linux on an&lt;br /&gt;
XT-AV60 (LX60) or XT-AV200 (LX200) board.&lt;br /&gt;
&lt;br /&gt;
*  Build Linux for the LX60 (see the [http://wiki.linux-xtensa.org/index.php/Buildroot_Build_Instructions Buildroot Build Instructions]).   &lt;br /&gt;
**  When configuring the kernel, include &amp;lt;tt&amp;gt;ip=bootp&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;ip=dhcp&amp;lt;/tt&amp;gt; in the kernel command line, as desired.&lt;br /&gt;
&lt;br /&gt;
*  Flash RedBoot on the board (see Tensilica XT-AV60 (LX60) docs for how).&lt;br /&gt;
** Reset the board.&lt;br /&gt;
** Wait for RedBoot to boot to its prompt.&lt;br /&gt;
*  The Tensilica docs show two methods of putting RedBoot into flash using OCD.  If you used RedBoot to flash itself, the flash filesystem is probably already initialized.  Otherwise you have to init the flash filesystem.  To check just do:&lt;br /&gt;
 RedBoot&amp;gt; fis list&lt;br /&gt;
and see whether you get a useful list of flash images.  If not, do:&lt;br /&gt;
 RedBoot&amp;gt; fis init -f&lt;br /&gt;
 y&lt;br /&gt;
 RedBoot&amp;gt; fconfig -i -l&lt;br /&gt;
 y&lt;br /&gt;
* Download the kernel image &amp;lt;tt&amp;gt;&amp;#039;&amp;#039;&amp;lt;build&amp;gt;&amp;#039;&amp;#039;/arch/xtensa/boot/zImage.redboot&amp;lt;/tt&amp;gt; to address &amp;lt;tt&amp;gt;0xd1000000&amp;lt;/tt&amp;gt;.  For example, put that file on a TFTP server, and load it using RedBoot like this:&lt;br /&gt;
 RedBoot&amp;gt; load -r -b 0xd1000000 zImage.redboot&lt;br /&gt;
(use the proper pathname for accessing the file over TFTP instead of &amp;lt;tt&amp;gt;zImage.redboot&amp;lt;/tt&amp;gt;, as needed).&lt;br /&gt;
* Now that the kernel image is in memory, you can execute it directly:&lt;br /&gt;
 RedBoot&amp;gt; exec -w 3 0xd1000000&lt;br /&gt;
* Or, you can instead put the image in flash so you can boot it multiple times without loading again:&lt;br /&gt;
 RedBoot&amp;gt; fis create -b 0xd1000000 -l 0xNNNNNN -e 0xd1000000 -r 0xd1000000 linux&lt;br /&gt;
where 0xNNNNNN is the size of the downloaded image&lt;br /&gt;
and &amp;quot;linux&amp;quot; is just some name for the image.  (You can have multiple&lt;br /&gt;
images with different names, as flash space allows;&lt;br /&gt;
use the same name in the &amp;lt;tt&amp;gt;fis load &amp;lt;name&amp;gt;&amp;lt;/tt&amp;gt; command below.)&lt;br /&gt;
* You might double check that the image is now there.  Something like:&lt;br /&gt;
 RedBoot&amp;gt; fis list&lt;br /&gt;
 Name              FLASH addr  Mem addr    Length      Entry point&lt;br /&gt;
 RedBoot           0xF8000000  0xF8000000  0x00020000  0x00000000&lt;br /&gt;
 RedBoot[backup]   0xF8020000  0xF8020000  0x00020000  0x00000000&lt;br /&gt;
 RedBoot config    0xF83E0000  0xF83E0000  0x00001000  0x00000000&lt;br /&gt;
 FIS directory     0xF83F0000  0xF83F0000  0x00010000  0x00000000&lt;br /&gt;
 linux             0xF8020000  0xD1000000  0x001C0000  0xD1000000&lt;br /&gt;
 RedBoot&amp;gt;&lt;br /&gt;
* You can reload the image from flash to memory using:&lt;br /&gt;
 RedBoot&amp;gt; fis load linux&lt;br /&gt;
* Now the fun part.  You can setup RedBoot with a script to load the image (from network or flash) and execute it, automatically at reset.  Here is an example that loads from flash, with a timeout set to 5 seconds so that you can Ctrl-C to avoid booting Linux if you want a boot prompt:&lt;br /&gt;
 RedBoot&amp;gt; fconfig&lt;br /&gt;
 Run script at boot: true&lt;br /&gt;
 Boot script:&lt;br /&gt;
 Enter script, terminate with empty line&lt;br /&gt;
  &amp;gt;&amp;gt; fis load linux&lt;br /&gt;
  &amp;gt;&amp;gt; exec -w 3 0xd1000000&lt;br /&gt;
  &amp;gt;&amp;gt;&lt;br /&gt;
 Boot script timeout (1000ms resolution): 5&lt;br /&gt;
 Use BOOTP for network configuration: true&lt;br /&gt;
 Console baud rate: 38400&lt;br /&gt;
 GDB connection port: 9000&lt;br /&gt;
 Network debug at boot time: false&lt;br /&gt;
 Update RedBoot non-volatile configuration - are you sure (y/n)? y&lt;br /&gt;
 ... Erase from 0xf83e0000-0xf83e1000: .&lt;br /&gt;
 ... Program from 0xd3f6e000-0xd3f6f000 at 0xf83e0000: .&lt;br /&gt;
 RedBoot&amp;gt;&lt;br /&gt;
(although I left BOOTP enabled above, you might not need it&lt;br /&gt;
if always loading from flash)&lt;br /&gt;
*  Now you should be able to reset the board, and see RedBoot booting, and see Linux automatically booting afterwards.&lt;br /&gt;
*  At the Linux login prompt, login as root as usual&lt;/div&gt;</summary>
		<author><name>Marc</name></author>
	</entry>
</feed>