Difference between revisions of "Compile Firmware MS14"
(→Compile the Mesh IoT firmware) |
(→Compile the Mesh IoT firmware) |
||
Line 4: | Line 4: | ||
<br> | <br> | ||
<br> | <br> | ||
− | =Compile | + | =Compile Mesh IoT firmware= |
<span CLASS=subtitle>Get source code from Github</span> | <span CLASS=subtitle>Get source code from Github</span> | ||
git clone https://github.com/dragino/dragino2.git dragino2-AA-IoT | git clone https://github.com/dragino/dragino2.git dragino2-AA-IoT |
Revision as of 05:32, 16 November 2014
Contents
Build Environment
All compile method mention here are tested under Ubuntu 10.04 and Ubuntu 14.04 LTS .
Compile Mesh IoT firmware
Get source code from Github
git clone https://github.com/dragino/dragino2.git dragino2-AA-IoT
Set up build environment
cd dragino2-AA-IoT ./set_up_build_enviroment.sh ms14
Build image
./build_image.sh ms14
You should be able to get the firmware in bin directory under image directory.
Customized Selected Modules
The ./build_image.sh ms14 will generated the firmware base on the default .config file. If user has changed the package selection. they can run below command in the ms14 directory (build directory) to select their preferable modules and build the firmware:
make menuconfig
Select modules and then run
make -j8
This command will generate the customized firmware in the ms14/bin directory. User can test this firmware by this way. After testing is ok, user can set up their own customized build by:
- cp ms14/.config to dragino2-AA-IoT/.config.YOUR_APP
- cp dragino2-AA-IoT/files-IoT to dragino2-AA-IoT/files-YOUR_APP
- run ./build_image.sh ms14 YOUR_APP to build the firmware and get the files in dragino2-AA-IoT/image folder
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
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 targe 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
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.