Skip to content
Hirokazu MORIKAWA edited this page Oct 9, 2018 · 19 revisions

Welcome to the openwrt-node-packages wiki!

Linkit Smart 7688 + node.js v6.x,v8.x + HomeKit HomeBrdige

MediaTek Build the firmware from source codes + add some modifications.

  1. Install prerequisite packages to build the firmware:
sudo apt-get install git g++ libncurses5-dev subversion libssl-dev gawk libxml-parser-perl unzip wget

1-1. Make working directory

mkdir Build_Path_Some_Where
cd Build_Path_Some_Where
  1. Download the OpenWrt CC source codes:
git clone https://github.com/openwrt/chaos_calmer.git
  1. Prepare the default configuration file for feeds:
cd chaos_calmer
cp feeds.conf.default feeds.conf
  1. 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

4-1. Add the node.js packages feed:

echo 'src-git node https://github.com/nxhack/openwrt-node-packages.git;for-15.05' >> feeds.conf

4-2. Add Intel® IoT Developer Kit packages feed:

echo 'src-git inteliot https://github.com/nxhack/openwrt-intel-iot-devkit.git;for-15.05' >> feeds.conf
  1. Update the feed information for all available packages to build the firmware:
./scripts/feeds update -a

5-1. Change the packages installed as default:

wget https://gist.githubusercontent.com/nxhack/7ced4d866a59ebc72737589b49a220f8/raw/1bebfe9f6091f55a5856bc4af00da456a4995b09/mtk-linkit.patch
patch -p1 < mtk-linkit.patch

5-2. Copy kernel objects for support kernel 3.18.45: (latest: 3.18.109)

see : https://github.com/MediaTek-Labs/linkit-smart-7688-feed/issues/37

cp ./feeds/linkit/mtk-sdk-wifi/wifi_binary/mt_wifi.ko_3.18.44 ./feeds/linkit/mtk-sdk-wifi/wifi_binary/mt_wifi.ko_3.18.109
cp ./feeds/linkit/mtk-sdk-wifi/wifi_binary/mt_wifi.ko_3.18.44_all ./feeds/linkit/mtk-sdk-wifi/wifi_binary/mt_wifi.ko_3.18.109_all

5-3. Prepare for building node.js(patch to toolchain)

patch -p1 < ./feeds/node/for_building_latest_node.patch

5-4. FIX: git submodule command not work properly.

wget https://gist.githubusercontent.com/nxhack/78fa1df0a1224a168191dd1ab5b3336e/raw/94b6ded945c61809103e529ddbc41cb4cb757792/fix-git-submodule.patch
patch -p1 < fix-git-submodule.patch
  1. Install all packages:
./scripts/feeds install -a

6-1. Use node.js custom packages:

rm ./package/feeds/packages/node
rm ./package/feeds/packages/node-*
./scripts/feeds install -a -p node

6-2. Use Intel® IoT Developer Kit custom packages:

rm ./package/feeds/packages/swig
rm ./package/feeds/packages/libmraa
rm ./package/feeds/packages/libupm
./scripts/feeds install -a -p inteliot
  1. Prepare the kernel configuration:
make menuconfig

Select the following options:

Target System: Ralink RT288x/RT3xxx

Subtarget: MT7688 based boards

Target Profile: LinkIt7688

7-1. Select optional packages of node.js custom feed.

You can select version of node.js and modules that you need.

Languages -> Node.js -> (Select module that you want)

Save and exit (use the default configuration file without any modification)

  1. Start the compilation process:
make V=s
Clone this wiki locally