summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
author이상규/동작제어Lab(SR)/Principal Engineer/삼성전자 <sg5.lee@samsung.com>2018-07-20 15:14:38 +0900
committer이춘석/동작제어Lab(SR)/Staff Engineer/삼성전자 <chunseok.lee@samsung.com>2018-07-20 15:14:38 +0900
commit5f915ca48ac96faf968243c482b3304cf07a02ee (patch)
tree41c36a3b84ad79f7db0bd3e8ad60a0248369fc29 /docs
parent8eb3790461e4a70175566fe3794aea8d2de98014 (diff)
downloadnnfw-5f915ca48ac96faf968243c482b3304cf07a02ee.tar.gz
nnfw-5f915ca48ac96faf968243c482b3304cf07a02ee.tar.bz2
nnfw-5f915ca48ac96faf968243c482b3304cf07a02ee.zip
Add explanation how to enable nn generated test (#2034)
Add explanation for installing g++ >= 6. Some subtitles are also changed. Related Issue: #2031 Signed-off-by: Sanggyu Lee <sg5.lee@samsung.com>
Diffstat (limited to 'docs')
-rw-r--r--docs/howto/CrossBuildForArm.md51
1 files changed, 39 insertions, 12 deletions
diff --git a/docs/howto/CrossBuildForArm.md b/docs/howto/CrossBuildForArm.md
index 25d0ead95..8f04530da 100644
--- a/docs/howto/CrossBuildForArm.md
+++ b/docs/howto/CrossBuildForArm.md
@@ -40,37 +40,64 @@ This will skip adding proxy settings to `apt` package manager.
sudo ./tools/cross/build_rootfs.sh arm --skipproxy
```
-## Cross build for ARM
+## Install Toolchain
+
+We recommend you have g++ >= 6 installed on your system because NN generated tests require it.
+
+On Ubuntu 18.04 LTS, you can install using `apt-get`.
+Choose g++ version whatever you prefer: 6, 7 or 8.
-Install cross compilers
```
-sudo apt-get install gcc-arm-linux-gnueabi g++-arm-linux-gnueabi
-sudo apt-get install gcc-arm-linux-gnueabihf g++-arm-linux-gnueabihf
+sudo apt-get install g++-{6,7,8}-arm-linux-gnueabi
```
-Build and install ARM Compute Library
+On Ubuntu 16.04 or older, follow the next steps:
+
+```
+cd ~/your/path
+wget https://releases.linaro.org/components/toolchain/binaries/7.2-2017.11/arm-linux-gnueabihf/gcc-linaro-7.2.1-2017.11-x86_64_arm-linux-gnueabihf.tar.xz
+tar xvf gcc-linaro-7.2.1-2017.11-x86_64_arm-linux-gnueabihf.tar.xz
+echo 'PATH=~/your/path/gcc-linaro-7.2.1-2017.11-x86_64_arm-linux-gnueabihf/bin:$PATH' >> ~/.bashrc
+```
+
+Make sure you get `libstdc++.so` updated on your target with your new toolchain's corresponding one.
+
+For exmaple, if you installed gcc-linaro-7.2.1-2017.11 above, do
+
+```
+wget https://releases.linaro.org/components/toolchain/binaries/7.2-2017.11/arm-linux-gnueabihf/runtime-gcc-linaro-7.2.1-2017.11-arm-linux-gnueabihf.tar.xz
+tar xvf runtime-gcc-linaro-7.2.1-2017.11-arm-linux-gnueabihf.tar.xz
```
+
+Then, copy `libstdc++.so.6.0.24` into `/usr/lib/arm-linux-gnueabihf`, and update symbolic links on your device.
+
+
+## Build and install ARM Compute Library
+
+```
+ROOTFS_ARM=/path/to/nnfw/tools/cross/rootfs/arm \
TARGET_ARCH=armv7l make acl
```
Mostly you only need once of ACL build. This will build and install to
`Product/(target_arch-os)/out/bin` folder.
- this is required for ARM on Ubuntu
+## Build nnfw
+
Give `TARGET_ARCH` variable to set the target architecture
```
-CROSS_BUILD=1 TARGET_ARCH=armv7l make
-CROSS_BUILD=1 TARGET_ARCH=armv7l make install
+ROOTFS_ARM=/path/to/nnfw/tools/cross/rootfs/arm \
+CROSS_BUILD=1 TARGET_ARCH=armv7l make all install
```
- supports `armv7l` and `aarch64` for now
If you used `ROOTFS_DIR` to prepare in alternative folder,
you should also give this to makefile.
```
-CROSS_BUILD=1 ROOTFS_DIR=/home/user/rootfs/arm-xenial TARGET_ARCH=armv7l make
-CROSS_BUILD=1 ROOTFS_DIR=/home/user/rootfs/arm-xenial TARGET_ARCH=armv7l make install
+CROSS_BUILD=1 ROOTFS_DIR=/home/user/rootfs/arm-xenial TARGET_ARCH=armv7l make all install
```
-## To run test
-Run the following:
+## Run test
+
```
./tools/test_driver/test_driver.sh --artifactpath=.
-``` \ No newline at end of file
+```