summaryrefslogtreecommitdiff
path: root/README.md
blob: 0e838fe557e58b07de1ab3e15d1d92f6ea927796 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
# nnfw

# How to use (simple) NNAPI Binding

This repo provides a T/F Lite Model loader(named ``tflite_run``), and simple NNAPI binding.

Let's type the following commands, and see what happens!
```
$ make install
$ USE_NNAPI=1 LD_LIBRARY_PATH="$(pwd)/Product/obj/tools/nnapi_bindings/bindings/logging" Product/out/bin/tflite_run [T/F Lite Flatbuffer Model Path]
```

# How to get pre-built T/F Lite models?
Google provides several pre-built T/F Lite models. Please check [this article](externals/tensorflow/tensorflow/contrib/lite/g3doc/models.md)

# Cross building for ARM

## Prepare Ubuntu RootFS

Use `build_rootfs.sh` script to prepare Root File System. You should have `sudo`

```
sudo ./tools/cross/build_rootfs.sh arm
```
- only supports `arm` architecutre for now
- supports `xenial`(default) and `trusty` release

To see the options,
```
./tools/cross/build_rootfs.sh -h
```

RootFS will be prepared at `tools/cross/rootfs/arm` folder.

## Prepare RootFS at alternative folder

Use `ROOTFS_DIR` to a full path to prepare at alternative path.

```
ROOTFS_DIR=/home/user/rootfs/arm-xenial sudo ./tools/cross/build_rootfs.sh arm
```

## Disable Seoul R&D Campus proxy

If you don't need to use corporate proxy, use `--skipproxy` option.
This will skip adding proxy settings to `apt` package manager.

```
sudo ./tools/cross/build_rootfs.sh arm --skipproxy
```

## Cross build for ARM

Give `HOST_ARCH` variable to set the host architecture
```
HOST_ARCH=armv7l make
HOST_ARCH=armv7l make install
```
- supports only `armv7l` for now

If you used `ROOTFS_DIR` to prepare in alternative folder,
you should also give this to makefile.
```
ROOTFS_DIR=/home/user/rootfs/arm-xenial BUILD_HOST=armv7l make
ROOTFS_DIR=/home/user/rootfs/arm-xenial BUILD_HOST=armv7l make install
```