Build the firmware from source codes

This section describes how to build the firmware for LinkIt Smart 7688 and LinkIt Smart 7688 Duo development boards from a source code.

Environment

The following operations are performed under a Ubuntu LTS 14.04.3 environment. For a Windows or a Mac OS X host computer, you can install a virtual machine to have the same environment: 

Steps

In the Ubuntu system, open the Terminal application and enter the following commands:

  1. Install prerequisite packages to build the firmware:

    $ sudo apt-get install git g++ libncurses5-dev subversion libssl-dev gawk libxml-parser-perl unzip  
  2. Download the OpenWrt CC source codes:

    $ git clone git://git.openwrt.org/15.05/openwrt.git 
  3. Prepare the default configuration file for feeds:

    $ cd openwrt   
    $ cp feeds.conf.default feeds.conf  
  4. Add the LinkIt Smart 7688 development board's feed:

    $ echo src-git linkit https://github.com/MediaTek-Labs/linkit-smart-7688-feed.git >> feeds.conf  
  5. Update the feed information for all available packages to build the firmware:

    $ ./scripts/feeds update  
  6. Install all packages:

    $ ./scripts/feeds install -a  
  7. Prepare the kernel configuration:

    $ make menuconfig  

    • Select the following options:
      • Target System: Ralink RT288x/RT3xxx
      • Subtarget: MT7688 based boards
      • Target Profile: LinkIt7688
    • Save and exit (use the default configuration file without any modification)

  8. Start the compilation process:

    $ make V=99 
  9. After the build process is finished, the resulted firmware file will be under "bin/ramips/openwrt-ramips-mt7688-LinkIt7688-squashfs-sysupgrade.bin". Depending on the hardware resources of the host environment, the build process may take more than 2 hours.
  10. You can use this file to update the firmware through Web UI or rename it to lks7688.img to update through a USB drive.