Version 5 (modified by Tim Harvey, 15 months ago) (diff)

use github vs svn repo

Laguna Bootloader

Building U-Boot bootloader for the Gateworks Laguna


  • A cross-compiler toolchain (one is provided with the OpenWrt BSP for the Laguna Family by following the step-by-step instructions here)


  1. Download u-Boot from Gateworks github:
    cd /usr/src
    git clone -b gateworks_2008.10
    cd gateworks_2008.10
  2. Configure Path of Toolchain (modify path below to contain the path from your OpenWrt staging_dir that contains arm-openwrt-linux-gcc):
    export PATH=$PATH:/usr/src/openwrt/staging_dir/toolchain-arm_v6k_gcc-linaro_uClibc-0.9.32_eabi/bin/
  3. Configure and build:
    • for SPI FLASH boards (GW2380/GW2382/GW2383):
      make distclean
      make cavium_cns3000_spi_config
      cp u-boot.bin u-boot_spi.bin
    • for NOR FLASH boards (GW2387/GW2388/GW2391):
      make distclean
      make cavium_cns3000_config
      cp u-boot.bin u-boot_nor.bin

Programming U-Boot bootloader for the Gateworks Laguna

You have two options for programming the bootloader:

  • JTAG flash using JTAG programming adapter from the Dev Kit
  • update within u-boot itself over serial and Ethernet

The bootloader itself must be built from source (see above) or downloaded from the Gateworks Laguna images:


update via JTAG programmer

In order to update the Laguna bootloader via JTAG programming please see JTAG instructions

update via serial and Ethernet

In 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')

  1. 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>)
  2. Set your board's ip address and the ip address of the TFTP server:
    setenv ipaddr
    setenv serverip
    • replace ipaddr and serverip above with numbers that make sense for your local network and server
  3. Transfer the bootloader from the TFTP server to the board's RAM, erase flash, and program the new bootloader:
    for SPI FLASH boards (GW2380/GW2382/GW2383):
    tftpboot 0x800000 u-boot_spi.bin
    erase 0x60000000 +$(filesize)
    cp.b 0x800000 0x60000000 $(filesize)
    for NOR FLASH boards (GW2387/GW2388/GW2391):
    tftpboot 0x800000 u-boot_nor.bin
    erase 0x10000000 +$(filesize)
    cp.b 0x800000 0x10000000 $(filesize)

You can now power-cycle or reset the board and will boot with the new bootloader.