{{{#!html
Gateworks uses the OpenWrt Linux Distribution for its Board Support Package (BSP). From time to time, Gateworks may have patches against upstream OpenWrt to support some features which have not made it upstream or perhaps are not suitable for upstream OpenWrt. Additionally Gateworks provides a Makefile wrapper around OpenWrt to aid in pinning versions of Opensource tree's to versions that Gateworks has tested with.
For more information about the OpenWrt SDK and other features, visit Gateworks OpenWrt Wiki Page
The Gateworks OpenWrt repository consist of a snapshot of upstream OpenWrt at specific points, with a few additional patches added on top that either had not made it upstream by that time, or add a gateworks directory consisting of Gateworks tested config files and JTAG flash image creation scripts. The repository can be found on the Gateworks GitHub openwrt page.
Our branch naming policy is as follows:
Our Git branches currently include:
If you are looking for our old OpenWrt BSP's such as the 13.06 or 12.08 from our old SVN repository please see on older revision of this page
You can see a revision history using the Github web interface:
To get an already built image to flash onto the SBC, please visit the following:
Gateworks has tested with LTS Ubuntu Releases. The suggested Ubuntu releases are 14.04 or 16.04. At the time of this writing, Gateworks does not recommend using Ubuntu 16.10.
On an Ubuntu (11.10, 14.04, 16.04) system for example the following should install all necessary pre-requisites:
sudo apt-get install subversion build-essential ;# std dev tools sudo apt-get install zlib1g-dev libncurses5-dev gawk flex git-core gettext quilt libssl-dev ;# other libs/tools needed by OpenWrt Buildroot
Note: Ubuntu 14.04 There is a known bug with Ubuntu 14.04 when building Python 2.7. that may occur. Because the system Python is used during this build, you may encounter the following error:
ImportError: No module named _sysconfigdata_nd configure: error: python2.7 interpreter not found make[3]: *** [~/openwrt-next/build_dir/target-arm_cortex-a9+neon_musl-1.1.11_eabi/Python-2.7.11/.configured_yy yyyyyyy] Error 1
In order to fix it, please execute the following:
sudo ln -s /usr/lib/python2.7/plat-*/_sysconfigdata_nd.py /usr/lib/python2.7/
Please ensure your development box has all of the listed packages installed before proceeding and note that your development box will need access to the internet in order to download the files for the development tree.
WARNING! Building with GCC 4.7.x is not fully supported. Please use 4.8.2+ or 4.6.x and below. We have also found 6.2+ to have some issues
Note The following pre-requisites must be met in order to build OpenWrt firmware for the Gateworks product families:
OpenWrt uses a Linux build system called buildroot. Like all Linux build systems it consists of recipes that go through the process of fetching, patching, compiling, packaging various applications. The 'fetching' process involves downloading source tarballs from the Internet (which is why an Internet connection is required). OpenWrt will fetch all sources into the 'dl' directory in the OpenWrt tree (ie 14.08/dl from the Gateworks directory). To avoid downloading sources each time you do a clean build it is recommended that you create a static location on your development host to store downloaded packages and symlink this to the dl directory. The Gateworks Makefile which fetches OpenWrt and patches it, will create this link for you if the /usr/src/dl directory exists on your development host, so if you create that and make it writable by your development user all downloads will go there automatically and be able to be used for subsequent builds. This not only helps reduce build time but it can also help if a package's source isn't available because of a site or mirror being down.
To support OpenWrt for the Gateworks products, we maintain a patchset that is generic to all our standard product families.
There are multiple code branches (see above for recommended branch per product), please checkout the one you prefer with the following commands:
git clone https://github.com/Gateworks/openwrt/ gateworks-openwrt -b 16.02
cd gateworks-openwrt
git clone https://github.com/Gateworks/openwrt/ gateworks-openwrt -b 14.08
cd gateworks-openwrt
Our OpenWrt Git repository has a 'gateworks' directory added consisting of a Makefile providing targets that aim to simplify the entire process of:
Once the branch has been checked out from the Gateworks GitHub account, you are ready to build. The Gateworks Makefile provides the following targets:
# Build the imx6 target, using the configuration from gateworks/configs/imx6/.config.
# This will take a while
make -C gateworks/ imx6
# Build the cns3xxx target, using the configuration from gateworks/configs/cns3xxx/.config.
# This will take a while
make -C gateworks/ cns3xxx
The build process will take some time depending on your Internet connection and host system. On an Intel Quad Core @ 3.10GHz the build takes a couple of hours to build all product families and takes appx 15GB of disk space.
The resulting kernel/rootfs files will be in the bin/<target> directory. For Example, a 256MB flash Ventana image is located at:
bin/imx6/gateworks-imx6-ventana-squashfs-nand_normal.ubi
For information about loading the resulting firmware onto a board see the per-board instructions:
To install the OpenWrt image onto the Gateworks SBC, please follow the instructions:
Creating JTAG Binaries to flash with the GW16042 is easily done with the targets in the makefile within the gateworks directory:
# Make a 'jtagable' images for Ventana make -C gateworks/ images/ventana # Make a 'jtagable' image for Laguna make -C gateworks/ images/laguna # Make both Ventana and Laguna 'jtagable' images make -C gateworks/ images
The resulting flash firmware image will be gateworks/images/.
To flash the file to the board, please see this link: JTAG Programming Instructions
Once a target has been built using the above instructions, a user may customize their image.
OpenWrt can be customized by running the make menuconfig command. In this new window, you can select/deselect packages you want installed. If kernel customization is required, a make kernel_menuconfig will open the make menu for the kernel.
Once complete, a simple make -j8 V=s will re-run the make command to re-create the rootfs.
Please read more at this page here.
The steps to update your current project to the latest Gateworks patches varies depending on the branch you're trying to update. Please see the below two sections that help to detail this out. However, please note that using Git is the most developer friendly.
# Make sure you have latest ref's git remote update # This will update the current working branch to the latest upstream, # then attempt to rebase any local patches on top. git pull --rebase
# Make sure you have latest ref's git remote update # Checkout upstream branch 16.02 and create local branch named 16.02 git checkout remotes/origin/16.02 -b 16.02
After this is complete, please continue to build as normal. For more detail on working with git, please refer to this site. For information on git pull, please refer to this page. For information about git rebase, please refer to this page.
One of the most commonly occurring errors that we have run into are source URL's disappearing which causes the source files to not be there during build-time. To help alleviate this, Gateworks has put up source tarballs at our development site. Our build environment takes advantage of this by uploading files for feeds that we require and automatically selecting them if all other options fail. In general, it will 1: look for the tarball locally; 2: try the original source URL; and 3: try our dev site. Below are other issues that may crop up:
make -j1 V=s