feat: Introduce clean-android-all.sh and refine Android build documentation and scripts for AMLNN SDK dependency.
This commit is contained in:
parent
21105e3db7
commit
b285b41a98
13 changed files with 53 additions and 153 deletions
|
|
@ -72,7 +72,7 @@ else
|
|||
echo " ./build-android-all.sh"
|
||||
echo ""
|
||||
echo " Option B – clone amlnn-toolkit as a sibling directory:"
|
||||
echo " git clone git@github.com:Amlogic-NN/amlnn-toolkit.git ../../../amlnn-toolkit"
|
||||
echo " git clone https://github.com/Amlogic-NN/amlnn-toolkit.git ../../amlnn-toolkit"
|
||||
echo " ./build-android-all.sh"
|
||||
echo ""
|
||||
exit 1
|
||||
|
|
|
|||
28
examples/clean-android-all.sh
Executable file
28
examples/clean-android-all.sh
Executable file
|
|
@ -0,0 +1,28 @@
|
|||
#!/bin/bash
|
||||
|
||||
#
|
||||
# Copyright (C) 2024–2025 Amlogic, Inc. All rights reserved.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
SCRIPT_DIR=$(cd "$(dirname $0)" && pwd)
|
||||
|
||||
echo "Cleaning all Android build directories..."
|
||||
|
||||
find "${SCRIPT_DIR}" -type d -name "build" | while read dir; do
|
||||
echo " rm -rf ${dir}"
|
||||
rm -rf "${dir}"
|
||||
done
|
||||
|
||||
echo "Done."
|
||||
|
|
@ -18,20 +18,6 @@ TO DO
|
|||
|
||||
#### 1. Compile
|
||||
|
||||
#### AMLNN SDK Setup
|
||||
|
||||
Resolve the AMLNN nnsdk dependency using one of the following methods:
|
||||
|
||||
- **Priority 1 – Environment variable (recommended)**
|
||||
```bash
|
||||
export AMLNN_HOME=/path/to/amlnn-toolkit
|
||||
```
|
||||
- **Priority 3 – Sibling directory fallback** *(automatic)*
|
||||
Place `amlnn-toolkit` as a sibling to `amlnn-model-playground`:
|
||||
```bash
|
||||
git clone git@github.com:Amlogic-NN/amlnn-toolkit.git ../amlnn-toolkit
|
||||
```
|
||||
|
||||
**Prerequisites:**
|
||||
- Android NDK (r25e recommended)
|
||||
- `ANDROID_NDK_PATH` environment variable set
|
||||
|
|
@ -40,7 +26,7 @@ Resolve the AMLNN nnsdk dependency using one of the following methods:
|
|||
```bash
|
||||
# Build for arm64-v8a
|
||||
cd examples/clip/cpp
|
||||
./build-android.sh -a arm64-v8a
|
||||
AMLNN_HOME=/path/to/amlnn-toolkit ./build-android.sh -a arm64-v8a
|
||||
```
|
||||
|
||||
The executable will be generated at `build/android_arm64-v8a/clip_demo`.
|
||||
|
|
|
|||
|
|
@ -16,20 +16,6 @@ for deployment on Amlogic NPU platforms.
|
|||
|
||||
#### 1. Compile
|
||||
|
||||
#### AMLNN SDK Setup
|
||||
|
||||
Resolve the AMLNN nnsdk dependency using one of the following methods:
|
||||
|
||||
- **Priority 1 – Environment variable (recommended)**
|
||||
```bash
|
||||
export AMLNN_HOME=/path/to/amlnn-toolkit
|
||||
```
|
||||
- **Priority 3 – Sibling directory fallback** *(automatic)*
|
||||
Place `amlnn-toolkit` as a sibling to `amlnn-model-playground`:
|
||||
```bash
|
||||
git clone git@github.com:Amlogic-NN/amlnn-toolkit.git ../amlnn-toolkit
|
||||
```
|
||||
|
||||
**Prerequisites:**
|
||||
- Android NDK (r25e recommended)
|
||||
- `ANDROID_NDK_PATH` environment variable set
|
||||
|
|
@ -38,7 +24,7 @@ Resolve the AMLNN nnsdk dependency using one of the following methods:
|
|||
```bash
|
||||
# Build for arm64-v8a
|
||||
cd examples/mobilenet/cpp
|
||||
./build-android.sh -a arm64-v8a
|
||||
AMLNN_HOME=/path/to/amlnn-toolkit ./build-android.sh -a arm64-v8a
|
||||
```
|
||||
|
||||
The executable will be generated at `build/android/mobilenet_v2_demo` (Note: executable name may vary, verify in build folder).
|
||||
|
|
|
|||
|
|
@ -6,20 +6,6 @@
|
|||
|
||||
#### 1. Compile
|
||||
|
||||
#### AMLNN SDK Setup
|
||||
|
||||
Resolve the AMLNN nnsdk dependency using one of the following methods:
|
||||
|
||||
- **Priority 1 – Environment variable (recommended)**
|
||||
```bash
|
||||
export AMLNN_HOME=/path/to/amlnn-toolkit
|
||||
```
|
||||
- **Priority 3 – Sibling directory fallback** *(automatic)*
|
||||
Place `amlnn-toolkit` as a sibling to `amlnn-model-playground`:
|
||||
```bash
|
||||
git clone git@github.com:Amlogic-NN/amlnn-toolkit.git ../amlnn-toolkit
|
||||
```
|
||||
|
||||
**Prerequisites:**
|
||||
- Android NDK r25c
|
||||
- `ANDROID_NDK_PATH` environment variable set
|
||||
|
|
@ -28,7 +14,7 @@ Resolve the AMLNN nnsdk dependency using one of the following methods:
|
|||
```bash
|
||||
# Build for arm64-v8a
|
||||
cd examples/ppocr-det/cpp
|
||||
./build-android.sh -a arm64-v8a
|
||||
AMLNN_HOME=/path/to/amlnn-toolkit ./build-android.sh -a arm64-v8a
|
||||
```
|
||||
|
||||
The executable will be generated in `build/android/`.
|
||||
|
|
|
|||
|
|
@ -61,20 +61,6 @@ example
|
|||
|
||||
#### 1. Compile
|
||||
|
||||
#### AMLNN SDK Setup
|
||||
|
||||
Resolve the AMLNN nnsdk dependency using one of the following methods:
|
||||
|
||||
- **Priority 1 – Environment variable (recommended)**
|
||||
```bash
|
||||
export AMLNN_HOME=/path/to/amlnn-toolkit
|
||||
```
|
||||
- **Priority 3 – Sibling directory fallback** *(automatic)*
|
||||
Place `amlnn-toolkit` as a sibling to `amlnn-model-playground`:
|
||||
```bash
|
||||
git clone git@github.com:Amlogic-NN/amlnn-toolkit.git ../amlnn-toolkit
|
||||
```
|
||||
|
||||
**Prerequisites:**
|
||||
- Android NDK (r25e recommended)
|
||||
- `ANDROID_NDK_PATH` environment variable set
|
||||
|
|
@ -83,7 +69,7 @@ Resolve the AMLNN nnsdk dependency using one of the following methods:
|
|||
```bash
|
||||
# Build for arm64-v8a
|
||||
cd examples/resnet/cpp
|
||||
./build-android.sh -a arm64-v8a
|
||||
AMLNN_HOME=/path/to/amlnn-toolkit ./build-android.sh -a arm64-v8a
|
||||
```
|
||||
|
||||
The executable will be generated at `build/android/resnet_demo` (Note: executable name may vary, verify in build folder).
|
||||
|
|
|
|||
|
|
@ -58,20 +58,6 @@ example
|
|||
|
||||
#### 1. Compile
|
||||
|
||||
#### AMLNN SDK Setup
|
||||
|
||||
Resolve the AMLNN nnsdk dependency using one of the following methods:
|
||||
|
||||
- **Priority 1 – Environment variable (recommended)**
|
||||
```bash
|
||||
export AMLNN_HOME=/path/to/amlnn-toolkit
|
||||
```
|
||||
- **Priority 3 – Sibling directory fallback** *(automatic)*
|
||||
Place `amlnn-toolkit` as a sibling to `amlnn-model-playground`:
|
||||
```bash
|
||||
git clone git@github.com:Amlogic-NN/amlnn-toolkit.git ../amlnn-toolkit
|
||||
```
|
||||
|
||||
**Prerequisites:**
|
||||
- Android NDK (r25e recommended)
|
||||
- `ANDROID_NDK_PATH` environment variable set
|
||||
|
|
@ -80,7 +66,7 @@ Resolve the AMLNN nnsdk dependency using one of the following methods:
|
|||
```bash
|
||||
# Build for arm64-v8a
|
||||
cd examples/retinaface/cpp
|
||||
./build-android.sh -a arm64-v8a
|
||||
AMLNN_HOME=/path/to/amlnn-toolkit ./build-android.sh -a arm64-v8a
|
||||
```
|
||||
|
||||
The executable will be generated at `build/android/retinaface_demo` (Note: executable name may vary, verify in build folder).
|
||||
|
|
|
|||
|
|
@ -6,20 +6,6 @@
|
|||
|
||||
#### 1. Compile
|
||||
|
||||
#### AMLNN SDK Setup
|
||||
|
||||
Resolve the AMLNN nnsdk dependency using one of the following methods:
|
||||
|
||||
- **Priority 1 – Environment variable (recommended)**
|
||||
```bash
|
||||
export AMLNN_HOME=/path/to/amlnn-toolkit
|
||||
```
|
||||
- **Priority 3 – Sibling directory fallback** *(automatic)*
|
||||
Place `amlnn-toolkit` as a sibling to `amlnn-model-playground`:
|
||||
```bash
|
||||
git clone git@github.com:Amlogic-NN/amlnn-toolkit.git ../amlnn-toolkit
|
||||
```
|
||||
|
||||
**Prerequisites:**
|
||||
- Android NDK r25c
|
||||
- `ANDROID_NDK_PATH` environment variable set
|
||||
|
|
@ -28,7 +14,7 @@ Resolve the AMLNN nnsdk dependency using one of the following methods:
|
|||
```bash
|
||||
# Build for arm64-v8a
|
||||
cd examples/whisper/cpp
|
||||
./build-android.sh -a arm64-v8a
|
||||
AMLNN_HOME=/path/to/amlnn-toolkit ./build-android.sh -a arm64-v8a
|
||||
```
|
||||
|
||||
The executable will be generated in `build/android/`.
|
||||
|
|
|
|||
|
|
@ -6,20 +6,6 @@
|
|||
|
||||
#### 1. Compile
|
||||
|
||||
#### AMLNN SDK Setup
|
||||
|
||||
Resolve the AMLNN nnsdk dependency using one of the following methods:
|
||||
|
||||
- **Priority 1 – Environment variable (recommended)**
|
||||
```bash
|
||||
export AMLNN_HOME=/path/to/amlnn-toolkit
|
||||
```
|
||||
- **Priority 3 – Sibling directory fallback** *(automatic)*
|
||||
Place `amlnn-toolkit` as a sibling to `amlnn-model-playground`:
|
||||
```bash
|
||||
git clone git@github.com:Amlogic-NN/amlnn-toolkit.git ../amlnn-toolkit
|
||||
```
|
||||
|
||||
**Prerequisites:**
|
||||
- Android NDK r25c
|
||||
- `ANDROID_NDK_PATH` environment variable set
|
||||
|
|
@ -28,7 +14,7 @@ Resolve the AMLNN nnsdk dependency using one of the following methods:
|
|||
```bash
|
||||
# Build for arm64-v8a
|
||||
cd examples/yoloe/cpp
|
||||
./build-android.sh -a arm64-v8a
|
||||
AMLNN_HOME=/path/to/amlnn-toolkit ./build-android.sh -a arm64-v8a
|
||||
```
|
||||
|
||||
The executable will be generated in `build/android/`.
|
||||
|
|
|
|||
|
|
@ -70,20 +70,6 @@ example
|
|||
|
||||
#### 1. Compile
|
||||
|
||||
#### AMLNN SDK Setup
|
||||
|
||||
Resolve the AMLNN nnsdk dependency using one of the following methods:
|
||||
|
||||
- **Priority 1 – Environment variable (recommended)**
|
||||
```bash
|
||||
export AMLNN_HOME=/path/to/amlnn-toolkit
|
||||
```
|
||||
- **Priority 3 – Sibling directory fallback** *(automatic)*
|
||||
Place `amlnn-toolkit` as a sibling to `amlnn-model-playground`:
|
||||
```bash
|
||||
git clone git@github.com:Amlogic-NN/amlnn-toolkit.git ../amlnn-toolkit
|
||||
```
|
||||
|
||||
**Prerequisites:**
|
||||
- Android NDK (r25e recommended)
|
||||
- `ANDROID_NDK_PATH` environment variable set
|
||||
|
|
@ -92,7 +78,7 @@ Resolve the AMLNN nnsdk dependency using one of the following methods:
|
|||
```bash
|
||||
# Build for arm64-v8a
|
||||
cd examples/yolov11/cpp
|
||||
./build-android.sh -a arm64-v8a
|
||||
AMLNN_HOME=/path/to/amlnn-toolkit ./build-android.sh -a arm64-v8a
|
||||
```
|
||||
|
||||
The executable will be generated at `build/android/yolo11_demo` (Note: executable name may vary, verify in build folder).
|
||||
|
|
|
|||
|
|
@ -70,20 +70,6 @@ example
|
|||
|
||||
#### 1. Compile
|
||||
|
||||
#### AMLNN SDK Setup
|
||||
|
||||
Resolve the AMLNN nnsdk dependency using one of the following methods:
|
||||
|
||||
- **Priority 1 – Environment variable (recommended)**
|
||||
```bash
|
||||
export AMLNN_HOME=/path/to/amlnn-toolkit
|
||||
```
|
||||
- **Priority 3 – Sibling directory fallback** *(automatic)*
|
||||
Place `amlnn-toolkit` as a sibling to `amlnn-model-playground`:
|
||||
```bash
|
||||
git clone git@github.com:Amlogic-NN/amlnn-toolkit.git ../amlnn-toolkit
|
||||
```
|
||||
|
||||
**Prerequisites:**
|
||||
- Android NDK (r25e recommended)
|
||||
- `ANDROID_NDK_PATH` environment variable set
|
||||
|
|
@ -92,7 +78,7 @@ Resolve the AMLNN nnsdk dependency using one of the following methods:
|
|||
```bash
|
||||
# Build for arm64-v8a
|
||||
cd examples/yolov8/cpp
|
||||
./build-android.sh -a arm64-v8a
|
||||
AMLNN_HOME=/path/to/amlnn-toolkit ./build-android.sh -a arm64-v8a
|
||||
```
|
||||
|
||||
The executable will be generated at `build/android/yolov8_demo` (Note: executable name may vary, verify in build folder).
|
||||
|
|
|
|||
|
|
@ -4,20 +4,6 @@
|
|||
|
||||
#### 1. Compile
|
||||
|
||||
#### AMLNN SDK Setup
|
||||
|
||||
Resolve the AMLNN nnsdk dependency using one of the following methods:
|
||||
|
||||
- **Priority 1 – Environment variable (recommended)**
|
||||
```bash
|
||||
export AMLNN_HOME=/path/to/amlnn-toolkit
|
||||
```
|
||||
- **Priority 3 – Sibling directory fallback** *(automatic)*
|
||||
Place `amlnn-toolkit` as a sibling to `amlnn-model-playground`:
|
||||
```bash
|
||||
git clone git@github.com:Amlogic-NN/amlnn-toolkit.git ../amlnn-toolkit
|
||||
```
|
||||
|
||||
**Prerequisites:**
|
||||
- Android NDK (r25e recommended)
|
||||
- `ANDROID_NDK_PATH` environment variable set
|
||||
|
|
@ -26,7 +12,7 @@ Resolve the AMLNN nnsdk dependency using one of the following methods:
|
|||
```bash
|
||||
# Build for arm64-v8a
|
||||
cd examples/yoloworld/cpp
|
||||
./build-android.sh -a arm64-v8a
|
||||
AMLNN_HOME=/path/to/amlnn-toolkit ./build-android.sh -a arm64-v8a
|
||||
```
|
||||
|
||||
The executable will be generated at `build/android/yolo_world_demo` (Note: executable name may vary, verify in build folder).
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue