Skip to content

Commit

Permalink
WIP: Complete rk356x
Browse files Browse the repository at this point in the history
  • Loading branch information
tunmx committed Jan 8, 2025
1 parent 16b0b39 commit 89b1692
Show file tree
Hide file tree
Showing 9 changed files with 130 additions and 611 deletions.
49 changes: 49 additions & 0 deletions .github/workflows/linux-armv7-rk356x-aarch64.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Build Linux-Ubuntu-AArch64-rk356x

on:
push:
branches: ["dev/rk356x"]

# Set the global GitHub token environment variable
env:
GITHUB_TOKEN: ${{ secrets.MY_GITHUB_TOKEN }}

jobs:
build:
name: Compile Linux-AArch64 RK356X
runs-on: ubuntu-latest

steps:
# Step 1: Checkout the repository
- name: Checkout Repository
uses: actions/checkout@v4

# Step 2: Synchronize and update submodules recursively
- name: Update submodules
run: |
git clone --recurse-submodules https://github.com/tunmx/inspireface-3rdparty.git 3rdparty
# Step 3: Install wget and xz-utils
- name: Install wget and xz-utils
run: |
sudo apt-get update
sudo apt-get install -y wget xz-utils
# Step 4: Download Toolchain
- name: Download and Extract Linaro Toolchain
run: |
mkdir -p /opt/linaro-toolchain
wget -qO- https://releases.linaro.org/components/toolchain/binaries/6.3-2017.05/aarch64-linux-gnu/gcc-linaro-6.3.1-2017.05-x86_64_aarch64-linux-gnu.tar.xz | tar -xJ -C /opt/linaro-toolchain --strip-components=1
# Step 5: Install Toolchain
- name: Set environment variables
run: |
echo "ARM_CROSS_COMPILE_TOOLCHAIN=/opt/linaro-toolchain" >> $GITHUB_ENV
echo "PATH=/opt/linaro-toolchain/bin:${PATH}" >> $GITHUB_ENV
# Step 6: Start building the SDK
- name: Start Building the InspireFace-Linux-AArch64-rk356x
run: |
bash command/build_cross_rk356x_aarch64.sh
ls build
36 changes: 3 additions & 33 deletions command/build_cross_rk356x_aarch64.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,36 +32,6 @@ fi

SCRIPT_DIR=$(pwd) # Project dir

# # Create .rknpu2_cache directory if it doesn't exist
# CACHE_DIR="$(pwd)/.rknpu2_cache"
# mkdir -p "$CACHE_DIR"

# # Check if MNN-2.3.0 directory already exists
# if [ ! -d "$CACHE_DIR/MNN-2.3.0" ]; then
# echo "Downloading MNN 2.3.0..."
# # Download MNN 2.3.0
# if ! wget -P "$CACHE_DIR" https://github.com/alibaba/MNN/archive/refs/tags/2.3.0.zip; then
# echo "Error: Failed to download MNN 2.3.0"
# exit 1
# fi

# # Extract the zip file
# cd "$CACHE_DIR"
# if ! unzip 2.3.0.zip; then
# echo "Error: Failed to extract MNN 2.3.0"
# exit 1
# fi

# # Remove the zip file
# rm 2.3.0.zip

# echo "MNN 2.3.0 downloaded and extracted"
# else
# echo "MNN-2.3.0 already exists in cache"
# fi

# # Set absolute path to MNN source
# export MNN_CUSTOM_SOURCE="$CACHE_DIR/MNN-2.3.0"

echo "MNN_CUSTOM_SOURCE: ${MNN_CUSTOM_SOURCE}"
cd ${SCRIPT_DIR}
Expand Down Expand Up @@ -93,14 +63,14 @@ cmake -DCMAKE_SYSTEM_NAME=Linux \
-DISF_RK_COMPILER_TYPE=aarch64 \
-DISF_ENABLE_RGA=ON \
-DISF_ENABLE_COST_TIME=OFF \
-DISF_BUILD_WITH_SAMPLE=ON \
-DISF_BUILD_WITH_SAMPLE=OFF \
-DISF_BUILD_WITH_TEST=OFF \
-DISF_ENABLE_BENCHMARK=OFF \
-DISF_ENABLE_USE_LFW_DATA=OFF \
-DISF_ENABLE_TEST_EVALUATION=OFF \
-DISF_BUILD_SHARED_LIBS=OFF ${SCRIPT_DIR}

make -j4
# make install
make install

# move_install_files "$(pwd)"
move_install_files "$(pwd)"
1 change: 1 addition & 0 deletions cpp/inspireface/c_api/intypedef.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

#ifndef INSPIREFACE_INTYPEDEF_H
#define INSPIREFACE_INTYPEDEF_H
#include <stdint.h>

// clang-format off
typedef void* HPVoid; ///< Pointer to Void.
Expand Down
Loading

0 comments on commit 89b1692

Please sign in to comment.