Upload packaging folder
[platform/upstream/iotjs.git] / docs / build / Build-for-ARTIK.md
1 ## Build IoT.js for ARTIK
2
3 ### Tizen on ARTIK10 cross-compile
4
5 #### Prerequisites
6
7 * ARTIK10 with Tizen (https://wiki.tizen.org/wiki/Tizen_On_ARTIK)
8 * Tizen Studio with Native app development CLI tools
9   
10   This is required to get rootstrap for Tizen (set of native libraries).
11 * arm-linux-gnueabi-gcc cross compiler (can be found in Tizen Studio / Native toolchain)
12
13 #### Building
14 1. Make sure arm-linux-gnueabi-gcc is in path
15 2. Locate Tizen SDK. Default location is: ~/tizen-studio
16 3. In platforms/tizen-3.0/mobile there should be compatible rootstrap (eg. mobile-3.0-device)
17
18 Compile:
19 ``` bash
20 tools/build.py \
21   --target-arch=arm --target-os=tizen --target-board=artik10 \
22   --compile-flag="--sysroot=~/tizen-studio/platforms/tizen-3.0/mobile/rootstraps/mobile-3.0-device.core/"
23 ```
24
25 #### Testing
26 Transfer iotjs binary and test file to the device:
27 ``` bash
28 sdb push ./build/arm-tizen/debug/bin/iotjs /home/owner/iotjs/
29 sdb push ./test/run_pass/test_console.js /home/owner/iotjs/
30 ```
31
32 Run the test:
33 ``` bash
34 sdb shell
35 $ cd /home/owner/iotjs
36 $ ./iotjs test_console.js
37 ```
38