Changes between Initial Version and Version 1 of laguna/bootloader


Ignore:
Timestamp:
10/22/2017 05:28:45 AM (2 years ago)
Author:
trac
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • laguna/bootloader

    v1 v1  
     1{{{#!html
     2          <div id="wikipage" class="trac-content"><p>
     3</p><div class="wiki-toc">
     4<ol>
     5  <li>
     6    <a href="#LagunaBootloader">Laguna Bootloader</a>
     7    <ol>
     8      <li>
     9        <a href="#BuildingU-BootbootloaderfortheGateworksLaguna">Building U-Boot bootloader for the Gateworks Laguna</a>
     10      </li>
     11      <li>
     12        <a href="#ProgrammingU-BootbootloaderfortheGateworksLaguna">Programming U-Boot bootloader for the Gateworks Laguna</a>
     13        <ol>
     14          <li>
     15            <a href="#updateviaJTAGprogrammer">update via JTAG programmer</a>
     16          </li>
     17          <li>
     18            <a href="#updateviaserialandEthernet">update via serial and Ethernet</a>
     19          </li>
     20        </ol>
     21      </li>
     22    </ol>
     23  </li>
     24</ol>
     25</div><p>
     26</p>
     27<h1 id="LagunaBootloader">Laguna Bootloader</h1>
     28<p>
     29<span class="wikianchor" id="building"></span>
     30</p>
     31<h2 id="BuildingU-BootbootloaderfortheGateworksLaguna">Building U-Boot bootloader for the Gateworks Laguna</h2>
     32<p>
     33Prerequisites:
     34</p>
     35<ul><li>A cross-compiler toolchain (one is provided with the <a class="wiki" href="/wiki/OpenWrt">OpenWrt</a> BSP for the Laguna Family by following the step-by-step instructions <a class="wiki" href="/wiki/laguna/openwrt">here</a>)
     36</li></ul><p>
     37Procedure:
     38</p>
     39<ol><li>Download u-Boot from Gateworks SVN
     40<div class="code"><pre><span class="nb">cd</span> /usr/src
     41svn co http://svn.gateworks.com/bsp/laguna/u-boot-2008.10
     42<span class="nb">cd </span>u-boot-2008.10
     43</pre></div></li><li>Configure Path of Toolchain (modify path below to contain the path from your <a class="wiki" href="/wiki/OpenWrt">OpenWrt</a> staging_dir that contains arm-openwrt-linux-gcc)
     44<div class="code"><pre><span class="nb">export </span><span class="nv">PATH</span><span class="o">=</span><span class="nv">$PATH</span>:/usr/src/openwrt/staging_dir/toolchain-arm_v6k_gcc-linaro_uClibc-0.9.32_eabi/bin/
     45</pre></div></li><li>Configure and build:
     46<ul><li>for SPI FLASH boards (GW2380/GW2382/GW2383):
     47<div class="code"><pre>make distclean
     48make cavium_cns3000_spi_config
     49make
     50cp u-boot.bin u-boot_spi.bin
     51</pre></div></li><li>for NOR FLASH boards (GW2387/GW2388/GW2391):
     52<div class="code"><pre>make distclean
     53make cavium_cns3000_config
     54make
     55cp u-boot.bin u-boot_nor.bin
     56</pre></div></li></ul></li></ol><p>
     57<span class="wikianchor" id="programming"></span>
     58</p>
     59<h2 id="ProgrammingU-BootbootloaderfortheGateworksLaguna">Programming U-Boot bootloader for the Gateworks Laguna</h2>
     60<p>
     61You have two options for programming the bootloader:
     62</p>
     63<ul><li>JTAG flash using JTAG programming adapter from the Dev Kit
     64</li><li>update within u-boot itself over serial and Ethernet
     65</li></ul><p>
     66The bootloader itself must be built from source (see <a class="wiki" href="/wiki/laguna/bootloader#building">above</a>) or downloaded from the <a class="ext-link" href="http://svn.gateworks.com"><span class="icon">​</span>Gateworks Laguna images</a>:
     67</p>
     68<pre class="wiki">wget http://svn.gateworks.com/laguna/images/u-boot_nor.bin
     69wget http://svn.gateworks.com/laguna/images/u-boot_spi.bin
     70</pre><h3 id="updateviaJTAGprogrammer">update via JTAG programmer</h3>
     71<p>
     72In order to update the Laguna bootloader via JTAG programming please see <a class="wiki" href="/wiki/jtag_instructions">JTAG instructions</a>
     73</p>
     74<h3 id="updateviaserialandEthernet">update via serial and Ethernet</h3>
     75<p>
     76In order to update the Laguna bootloader over Ethernet you need to be connected to the Laguna serial console and have the board connected to your Ethernet network where a TFTP server is accessible with the bootloader ('u-boot_nor.bin' or 'u-boot_spi.bin')
     77</p>
     78<ol><li>Power on the board and break into the bootloader by hitting a key when prompted with 'hit a key to enter into u-boot prompt'. This will drop you into the bootloader command shell with the laguna prompt (<tt>Laguna&gt;</tt>)
     79</li></ol><ol start="2"><li>Set your board's ip address and the ip address of the TFTP server:
     80<div class="code"><pre>setenv ipaddr 192.168.1.1
     81setenv serverip 192.168.1.146
     82</pre></div><ul><li>replace ipaddr and serverip above with numbers that make sense for your local network and server
     83</li></ul></li></ol><ol start="3"><li>Transfer the bootloader from the TFTP server to the board's RAM, erase flash, and program the new bootloader:
     84<ul><li>for SPI FLASH boards (GW2380/GW2382/GW2383):
     85<div class="code"><pre>tftpboot 0x800000 u-boot_spi.bin
     86erase 0x60000000 +<span class="k">$(</span>filesize<span class="k">)</span>
     87cp.b 0x800000 0x60000000 <span class="k">$(</span>filesize<span class="k">)</span>
     88</pre></div></li><li>for NOR FLASH boards (GW2387/GW2388/GW2391):
     89<div class="code"><pre>tftpboot 0x800000 u-boot_nor.bin
     90erase 0x10000000 +<span class="k">$(</span>filesize<span class="k">)</span>
     91cp.b 0x800000 0x10000000 <span class="k">$(</span>filesize<span class="k">)</span>
     92</pre></div></li></ul></li></ol><p>
     93You can now power-cycle or reset the board and will boot with the new bootloader.
     94</p>
     95}}}