Changes between Version 1 and Version 2 of laguna/bootloader


Ignore:
Timestamp:
10/31/2017 01:07:16 PM (12 months ago)
Author:
Tim Harvey
Comment:

convert restored html to wiki markup

Legend:

Unmodified
Added
Removed
Modified
  • laguna/bootloader

    v1 v2  
    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>
     1[[PageOutline]]
     2
     3= Laguna Bootloader =
     4
     5== Building U-Boot bootloader for the Gateworks Laguna ==
     6
    337Prerequisites:
    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>
     8 * A cross-compiler toolchain (one is provided with the OpenWrt BSP for the Laguna Family by following the step-by-step instructions [wiki:laguna/openwrt here])
     9
    3710Procedure:
    38 </p>
    39 <ol><li>Download u-Boot from Gateworks SVN
    40 <div class="code"><pre><span class="nb">cd</span> /usr/src
     11 1. Download u-Boot from Gateworks SVN:
     12{{{#!bash
     13cd /usr/src
    4114svn 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
     15cd u-boot-2008.10
     16}}}
     17 1. Configure Path of Toolchain (modify path below to contain the path from your OpenWrt staging_dir that contains arm-openwrt-linux-gcc):
     18{{{#!bash
     19export PATH=$PATH:/usr/src/openwrt/staging_dir/toolchain-arm_v6k_gcc-linaro_uClibc-0.9.32_eabi/bin/
     20}}}
     21 1. Configure and build:
     22  * for SPI FLASH boards (GW2380/GW2382/GW2383):
     23{{{#!bash
     24make distclean
    4825make cavium_cns3000_spi_config
    4926make
    5027cp 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
     28}}}
     29  * for NOR FLASH boards (GW2387/GW2388/GW2391):
     30{{{#!bash
     31make distclean
    5332make cavium_cns3000_config
    5433make
    5534cp 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>
     35}}}
     36
     37[=#programming]
     38== Programming U-Boot bootloader for the Gateworks Laguna ==
     39
    6140You 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>
    66 The 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
     41 * JTAG flash using JTAG programming adapter from the Dev Kit
     42 * update within u-boot itself over serial and Ethernet
     43
     44The bootloader itself must be built from source (see [#building above]) or downloaded from the [http://svn.gateworks.com/laguna/images ​Gateworks Laguna images]:
     45{{{#!bash
     46wget http://svn.gateworks.com/laguna/images/u-boot_nor.bin
    6947wget http://svn.gateworks.com/laguna/images/u-boot_spi.bin
    70 </pre><h3 id="updateviaJTAGprogrammer">update via JTAG programmer</h3>
    71 <p>
    72 In 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>
     48}}}
     49
     50
     51[=#jtag]
     52=== update via JTAG programmer ===
     53In order to update the Laguna bootloader via JTAG programming please see [wiki:jtag_instructions JTAG instructions]
     54
     55
     56[=#serialenet]
     57=== update via serial and Ethernet ===
    7658In 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
     59
     601. 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 (Laguna>)
     611. Set your board's ip address and the ip address of the TFTP server:
     62{{{#!bash
     63setenv ipaddr 192.168.1.1
    8164setenv 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
    86 erase 0x60000000 +<span class="k">$(</span>filesize<span class="k">)</span>
    87 cp.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
    90 erase 0x10000000 +<span class="k">$(</span>filesize<span class="k">)</span>
    91 cp.b 0x800000 0x10000000 <span class="k">$(</span>filesize<span class="k">)</span>
    92 </pre></div></li></ul></li></ol><p>
     65}}}
     66 * replace ipaddr and serverip above with numbers that make sense for your local network and server
     671. Transfer the bootloader from the TFTP server to the board's RAM, erase flash, and program the new bootloader:
     68{{{#!bash
     69for SPI FLASH boards (GW2380/GW2382/GW2383):
     70tftpboot 0x800000 u-boot_spi.bin
     71erase 0x60000000 +$(filesize)
     72cp.b 0x800000 0x60000000 $(filesize)
     73for NOR FLASH boards (GW2387/GW2388/GW2391):
     74tftpboot 0x800000 u-boot_nor.bin
     75erase 0x10000000 +$(filesize)
     76cp.b 0x800000 0x10000000 $(filesize)
     77}}}
     78
    9379You can now power-cycle or reset the board and will boot with the new bootloader.
    94 </p>
    95 }}}