Changes between Initial Version and Version 1 of laguna/bootloader

10/22/2017 05:28:45 AM (2 years ago)



  • laguna/bootloader

    v1 v1  
     2          <div id="wikipage" class="trac-content"><p>
     3</p><div class="wiki-toc">
     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>
     27<h1 id="LagunaBootloader">Laguna Bootloader</h1>
     29<span class="wikianchor" id="building"></span>
     31<h2 id="BuildingU-BootbootloaderfortheGateworksLaguna">Building U-Boot bootloader for the Gateworks Laguna</h2>
     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>)
     39<ol><li>Download u-Boot from Gateworks SVN
     40<div class="code"><pre><span class="nb">cd</span> /usr/src
     41svn co
     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
     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
     55cp u-boot.bin u-boot_nor.bin
     57<span class="wikianchor" id="programming"></span>
     59<h2 id="ProgrammingU-BootbootloaderfortheGateworksLaguna">Programming U-Boot bootloader for the Gateworks Laguna</h2>
     61You have two options for programming the bootloader:
     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
     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=""><span class="icon">​</span>Gateworks Laguna images</a>:
     68<pre class="wiki">wget
     70</pre><h3 id="updateviaJTAGprogrammer">update via JTAG programmer</h3>
     72In order to update the Laguna bootloader via JTAG programming please see <a class="wiki" href="/wiki/jtag_instructions">JTAG instructions</a>
     74<h3 id="updateviaserialandEthernet">update via serial and Ethernet</h3>
     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')
     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
     81setenv serverip
     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>
     93You can now power-cycle or reset the board and will boot with the new bootloader.