wiki:laguna/bootloader

Laguna Bootloader

Building U-Boot bootloader for the Gateworks Laguna

Prerequisites:

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

Procedure:

  1. Download u-Boot from Gateworks SVN
    cd /usr/src
    svn co http://svn.gateworks.com/bsp/laguna/u-boot-2008.10
    cd u-boot-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
      make
      cp u-boot.bin u-boot_spi.bin
      
    • for NOR FLASH boards (GW2387/GW2388/GW2391):
      make distclean
      make cavium_cns3000_config
      make
      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:

wget http://svn.gateworks.com/laguna/images/u-boot_nor.bin
wget http://svn.gateworks.com/laguna/images/u-boot_spi.bin

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>)
  1. Set your board's ip address and the ip address of the TFTP server:
    setenv ipaddr 192.168.1.1
    setenv serverip 192.168.1.146
    
    • replace ipaddr and serverip above with numbers that make sense for your local network and server
  1. 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.

Last modified 14 months ago Last modified on 05/05/16 08:52:25