Building OpenWrt & Installing for the Gateworks Ventana Family

Gateworks Provides patches to OpenWrt for the Ventana Family that can be downloaded and applied. These patches are periodically updated to fit on top of recent OpenWrt snapshots. The Ventana Family currently is using Linux v4.4.0 and is provided with a host of userland tools built into the filesystem to do everything from mesh routing to mounting a hard drive on a read/write filesystem with room for plenty of additional tools/utilities provided by OpenWrt. A web GUI (LUCI) has also been provided on the boards that enables easy administration of the product.

To stay up to date on the efforts made by the Gateworks team, please monitor our maillist for activity.

OpenWrt Release Information

The following OpenWrt branches support the Ventana Family:

  • 16.02
    • See here for general information
    • For a list of default packages installed, please see here
    • Bump to linux 4.4.0 Kernel from 3.14.16
    • ~50% increased FEC driver performance
    • l2cache enabled
    • Hardware crypto support
    • squashfs+ubifs overlay for recovery
    • dsa/swconfig support for GW16083
    • HDMI out, no VPU/GPU
    • LVDS out, no VPU/GPU
    • Low-Latency RS485 support
  • 14.08
    • See here for general information
    • For a list of default packages installed, please see here
    • Add support for GW54xx/GW53xx/GW52xx/GW51xx/GW552x
    • Add gsc-daemon support for above boards
    • Add support for GW16081/GW16082/GW16082
    • Kernel: 3.14.16
    • Added sysupgrade support

Step 1. Acquiring Images

For a 'stable' pre-build, please visit this link and download the appropriate file. For reference, please see below on what each file is:

For nightly builds, please visit here.

If you prefer to grab the source code and build images yourself, please refer to this page for instructions.

Step 2. Installing Firmware

Customers may choose to compile their own firmware or use our prebuilt binaries Prebuilt OpenWrt Binaries

Installing Firmware on a Ventana board via JTAG - Easiest Option

Note: This method is only supported using Linux, Windows is not supported

The easiest method is using JTAG for a full-board update. Please visit this page for more information.

Every Ventana product is nearly the same and they can all use one universal prebuilt OpenWrt binary (ending in a .bin extension). For example, 'ventana_owrt_normal.bin' includes the SPL bootloader and uboot as well. (Exceptions include GW5400A with SPI flash and Ventana boards with larger amounts of flash such as a 2GB version, whereas 256mb is standard)

The binary files can be found in the link above. If running a custom build, here is out to create a JTAG binary image

An example using a Linux PC

> sudo rmmod ftdi_sio
> sudo jtag_usbv4 –p ventana_owrt_normal.bin
Gateworks JTAG Programmer v4.0 r311
Copyright (C) 2004-2014, Gateworks Corporation, All Rights Reserved
Built 12:32:04, Jul 10 2014
Using USB Port

Channel #      S01
USB Open Rev    r0
JTAG_ID #00    V7A
JTAG_ID #01    DMA
JTAG_ID #02    MXD
JTAG_ID #03    MSP
Boot Sane       OK
Load Debugger   OK
Flash Size     256
BAD Blocks       0
Flash Erase     OK
Flash Boot      OK
Flash Prog      OK

Please see more details about the JTAG firmware install here: JTAG Tutorial Page

While the JTAG method is the easiest, the TFTP method shown below will transfer faster.

Installing Firmware on a Ventana board via Serial/ENET(tftp) using the bootloader

The procedure for updating the OS (kernel+rootfs) via Serial/ENET and a tftp server depends on what type of FLASH the Ventana product has.

Please note, however, that while most Ventana boards have NAND flash, some do not. Please consult your datasheet to determine whether your board has NAND flash or not.

NAND Flash

To install firmware to a Ventana board using Serial/ENET once your kernel/rootfs are on a network attached tftpserver (tftpserver instructions->tftpserver) do the following:

  1. Connect your target board to your network, set ipaddress and serverip in uboot
    setenv ipaddr <localip>
    setenv serverip <serverip>
    i.e. Set localip to and serverip to
    setenv ipaddr
    setenv serverip
    • Note eth0 should be used which is natively supported. On special boards like the GW5520, both ports are ran off PCI, thus PCI needs to be enabled in the bootloader as shown here
  1. run the nand_update script (present in the default Ventana NAND bootloader) which will tftp the file defined in the image_rootfs u-boot variable
    1. Confirm the file in the variable image_rootfs is the one you want. To change it use the following command:
      # Note that the 'flash_layout' variable automatically populates whether the board has 'normal' or 'large' flash
      setenv image_rootfs gateworks-imx6-ventana-squashfs-nand_${flash_layout}.ubi
    2. Run the nand_update script:
      run nand_update
  1. boot:

If no changes have been made to the default environment variables, your board will boot to a OpenWrt prompt on your newly built kernel/filesystem.

If the bootloader environment was modified you may want to erase the u-boot env flash section to set the board back to factory defaults. This can be done by the following:

env default -f -a


  • NAND flash devices can contain bad blocks (to allow for a lower price/size) and also have ECC for error correction. The flash devices have a certain amount of 'out of band' (OOB) storage available for every block that can be used for things such as ECC and/or filesystems. The i.MX6 NAND controller has hardware ECC support but uses the entire OOB area for the flash devices we use. The JFFS2 filesystem requires OOB for NAND and thus will not work on i.MX6 NAND solutions therefore we use the UBIFS filesystem.
  • Standard Ventana product currently has 256MB NAND FLASH, however some custom boards have 2GB NAND. For boards with 2GB FLASH use gateworks-imx6-ventana-squashfs-nand_large.ubi
  • GW54xx-A had SPI flash and different instructions should be used by consulting the page history.
  • Note that for the Ventana GW5520, which has the ethernet ports off the PCI bus, it requires enabling PCI in the bootloader:
    setenv pcidisable; saveenv; reset;
  • Once complete with the GW5520, it is recommended PCI be disabled in the bootloader with the following command:
    setenv pcidisable 1; saveenv; reset;

Installing OpenWrt on a removable block storage device: MicroSD card / USB drive / mSATA device

The latest OpenWrt package and kernel configuration in the trunk BSP supports the necessary configuration for booting to a USB/micro-SD/mSATA based root filesystem (static kernel support for chipidea USB host controller, EHCI, and MXS phy) therefore all you need to do is create the storage device using the tarball of the root filesystem.

Starting with the OpenWrt 16.02 branch, we have decided to include a script (mkimage_blkdev) to make creating bootable block storage devices with various tarballs's easier. The usage is as follows:

# The system has 2x block devices currently connected
> ./gateworks/scripts/mkimage_blkdev
usage: mkimage_blkdev file1.tar[.gz|.bz2] [file2.tar[.gz|.bz2] ...] /dev/sdX

The following block devices were found:
 /dev/sdc: JetFlash Transcend 32GB 29.4219GB
 /dev/sdd: Kingston DataTraveler SE9 7.26727GB

An example execution of this may look as follows:

sudo ./gateworks/scripts/mkimage_blkdev bin/imx6/gateworks-imx6-ventana-*.tar.gz /dev/sdc

In the above example, we pass in several tarballs that match the gateworks-imx6-ventana-*.tar.gz expansion and flash it onto /dev/sdc. In the process, we re-partition /dev/sdc with a single ext4 partition where the contents of the tarballs are placed.

To flash an msata device, you may have to do the following:

sudo FORCE=1 ./gateworks/scripts/mkimage_blkdev bin/imx6/gateworks-imx6-ventana-*.tar.gz /dev/sde

The reason for this is that msata devices often don't look like a 'block storage device' to linux, but instead as a hard drive. There are protections built into the mkimage_blkdev script in order to avoid user error and accidentally wipe out their own hard disks, which is the reason for the FORCE=1 override. Please use this flag only while exercising extreme caution.

To see information on the manual steps for creating a bootable tarball, please visit the linux blockdev page.

Last modified 2 months ago Last modified on 06/06/17 12:12:29