Compile Firmware MS14

From Wiki for Dragino Project
Jump to: navigation, search

Build Environment

All compile method mention here are tested under Ubuntu 10.04 and Ubuntu 14.04 LTS . And you will need to install below packages before compile:

sudo apt-get update
sudo apt-get upgrade
sudo apt-get install build-essential git subversion libxml-parser-perl




Compile Mesh IoT firmware

Get source code from Github

git clone https://github.com/dragino/openwrt-bb-1407.git dragino2-BB-IoT


Set up build environment

cd dragino2-BB-IoT
./set_up_build_enviroment.sh


Build image

./build_image.sh -a IoT

You should be able to get the firmware in bin directory under image directory.

For more info how to debug if build fail or add customized a build. please refer Readme for Build



Compile Arduino Yun firmware

The Arduino Yun Firmware used in Dragino products are derived from OpenWrt Yun. The source and compile method are as below:

git clone https://github.com/dragino/openwrt-yun Dragino-Yun
cd Dragino-Yun
./set_up_build_enviroment.sh    //only need to run at the first time. 
./build_image.sh

After compile, user can see the image in Dragino-Yun/image folder.



Compile a native OpenWrt firmware base on Barrier Breaker 14.07

Dragino profile is supported in OpenWrt Barrier Breaker source, so build the firmware for Dragino is straight forward once use has select the match profile, as below:

build target for Dragino MS14 / HE
git clone git://git.openwrt.org/14.07/openwrt.git barrier_breaker
./scripts/feeds update
./scripts/feeds install -a
make menuconfig        // and select Dragino2 as target platform
make -j8

The firmware will be ready in the directory barrier_breaker/bin/ar71xx.

make sure you have the boot address at 0x9f040000 by running below commands in u-boot:

dr_boot> setenv bootcmd bootm 0x9f040000
dr_boot> saveenv
Saving environment to FLASH...

Then use the sysupgrade firmware to upgrade in WebSafe U-Boot



Compile a native OpenWrt firmware base on OpenWrt Trunk -- Chaos_Calme

Dragino profile is supported in OpenWrt Trunk, so build the firmware for Dragino is straight forward once use has select the match profile, as below:

build target for Dragino MS14 / HE
git clone git://git.openwrt.org/openwrt.git Chaos_Calme
./scripts/feeds update
./scripts/feeds install -a
make menuconfig        // and select Dragino2 as target platform
make -j8

The firmware will be ready in the directory Chaos_Calme/bin/ar71xx.

make sure you have the boot address at 0x9f040000 by running below commands in u-boot:

dr_boot> setenv bootcmd bootm 0x9f040000
dr_boot> saveenv
Saving environment to FLASH...

Then use the sysupgrade firmware to upgrade in WebSafe U-Boot



Trouble Shooting

If there is error in compiling, user can run single thread with verbose make under the OPENWRT_DIR. the command is:

make V=s

Most errors we have seen during build is the fail of downloading for the source of some packages, in such case, user can manually download the source and place it into the OPENWRT_DIR/dl folder and compile the image again.