Upload packaging folder
[platform/upstream/iotjs.git] / tools / targets / tizenrt-artik05x / app / README.md
1 ### About
2
3 This directory contains files to run IoT.js on [TizenRT](https://github.com/Samsung/TizenRT).
4
5 WARNING: **This document is not 100% accurate since Artik05x board with tooling is not available yet**
6
7 ### How to build
8
9 #### 1. Set up the build environment for Artik05x board
10
11 Clone IoT.js and TizenRT into iotjs-tizenrt directory
12
13 ```bash
14 $ mkdir iotjs-tizenrt
15 $ cd iotjs-tizenrt
16 $ git clone https://github.com/Samsung/iotjs.git
17 $ git clone https://github.com/Samsung/TizenRT.git tizenrt
18 ```
19 The following directory structure is created after these commands
20
21 ```bash
22 iotjs-tizenrt
23   + iotjs
24   |  + targets
25   |      + tizenrt-artik05x
26   + tizenrt
27 ```
28
29 #### 2. Add IoT.js as a builtin application for TizenRT
30
31 ```bash
32 $ cd tizenrt/apps/system
33 $ mkdir iotjs
34 $ cp ../../../iotjs/targets/tizenrt-artik05x/app/* ./iotjs/
35 ```
36
37 **WARNING: Manual modification is required**
38
39 **WARNING: Below two bullet points are subject to change**
40
41 * change tizenrt/apps/system/Kconfig to include iotjs folder
42     ```
43     menu "IoT.js node.js like Javascript runtime"
44     source "$APPSDIR/system/iotjs/Kconfig"
45     endmenu
46     ```
47 * Libraries required to link iotjs have to be supplied in some way
48     ```
49     EXTRA_LIBS = -lhttpparser -liotjs -ljerrycore -ltuv -ljerry-libm
50     ```
51
52
53 #### 3. Configure TizenRT
54
55 ```bash
56 $ cd tizenrt/os/tools
57 $ ./configure.sh sidk_s5jt200/hello_with_tash
58
59 $ cd ..
60 # might require to run "make menuconfig" twice
61 $ make menuconfig
62 ```
63
64 #### 4. Build IoT.js for TizenRT
65
66 ```bash
67 $ cd iotjs
68 $ ./tools/build.py --target-arch=arm --target-os=tizenrt --target-board=artik05x --sysroot=../tizenrt/os
69
70 ```
71
72 #### 5. Build TizenRT
73
74 ```bash
75 $ cd tizenrt/os
76 IOTJS_LIB_DIR=../iotjs/build/arm-tizenrt/debug/lib make
77 ```
78 Binaries are available in `tizenrt/build/output/bin`
79
80 #### 6. Flashing
81
82 Yet to be announced on [TizenRT page](https://github.com/Samsung/TizenRT#board)