Avaota f1 (#195)

This commit is contained in:
nihui
2025-05-11 11:55:07 +08:00
committed by GitHub
parent 80b7cc0432
commit dcbba23797
3 changed files with 58 additions and 1 deletions

View File

@@ -1872,6 +1872,18 @@ jobs:
export STAGING_DIR=$GITHUB_WORKSPACE/toolchain
cmake-options: -DWITH_AW=ON
- name: avaota-f1
single-core: true
cmake-toolchain: riscv32-linux-musl.toolchain.cmake
setup-toolchain-cmd: |
wget -q https://github.com/AvaotaSBC/toolchains/releases/download/v821-toolchains/nds32le-linux-musl-v5d.tar.xz
tar -xf nds32le-linux-musl-v5d.tar.xz
setup-env-cmd: |
export RISCV_ROOT_PATH=$GITHUB_WORKSPACE/nds32le-linux-musl-v5d
setup-test-env-cmd: |
export RISCV_ROOT_PATH=$GITHUB_WORKSPACE/nds32le-linux-musl-v5d
cmake-options: -DWITH_AW=ON
- name: purple-pi
single-core: false
cmake-toolchain: arm-linux-gnueabihf.toolchain.cmake

View File

@@ -410,6 +410,16 @@ https://github.com/nihui/opencv-mobile/releases/latest
</td>
</tr>
<tr>
<td>
<a href="https://github.com/AvaotaSBC/AvaotaF1">
<img alt="avaota-f1" src="https://github.com/user-attachments/assets/2f67508c-4f9f-4fe1-8155-ca97e8a12001" width="auto" height="120">
<br /><b>avaota-f1</b>
</a>
<br />riscv32-linux-musl<br />
<a href="https://github.com/nihui/opencv-mobile/releases/latest/download/opencv-mobile-4.11.0-avaota-f1.zip">
<img alt="opencv4-avaota-f1" src="https://img.shields.io/badge/download-4.11.0-blue?style=for-the-badge">
</a>
</td>
<td>
<a href="http://www.industio.cn/product-item-5.html">
<img alt="purple-pi" src="https://img01.71360.com/file/read/www2/M00/38/09/wKj2K2MMbSKAXKhHAAJMw0S-VfY400.jpg" width="auto" height="120">
@@ -432,6 +442,8 @@ https://github.com/nihui/opencv-mobile/releases/latest
<img alt="opencv4-myir-t113i" src="https://img.shields.io/badge/download-4.11.0-blue?style=for-the-badge">
</a>
</td>
</tr>
<tr>
<td>
<a href="https://www.loongson.cn/news/show?id=673">
<img alt="2k0300-fengniao" src="https://github.com/user-attachments/assets/3ff9048d-a2b7-46a4-8534-e8bf5b85a2e1" width="auto" height="120">
@@ -442,7 +454,6 @@ https://github.com/nihui/opencv-mobile/releases/latest
<img alt="opencv4-2k0300-fengniao" src="https://img.shields.io/badge/download-4.11.0-blue?style=for-the-badge">
</a>
</td>
</tr>
<td>
<a href="https://gitee.com/LockzhinerAI/LockzhinerVisionModule">
<img alt="lockzhiner-vision-module" src="https://github.com/user-attachments/assets/67252677-a336-4a88-9c65-f10d34c6c1f2" width="auto" height="120">
@@ -456,6 +467,7 @@ https://github.com/nihui/opencv-mobile/releases/latest
<img alt="opencv4-lockzhiner-vision-module" src="https://img.shields.io/badge/download-4.11.0-blue?style=for-the-badge">
</a>
</td>
</tr>
</table>
# Usage Android

View File

@@ -0,0 +1,33 @@
set(CMAKE_SYSTEM_NAME Linux)
set(CMAKE_SYSTEM_PROCESSOR riscv32)
if(DEFINED ENV{RISCV_ROOT_PATH})
file(TO_CMAKE_PATH $ENV{RISCV_ROOT_PATH} RISCV_ROOT_PATH)
else()
message(FATAL_ERROR "RISCV_ROOT_PATH env must be defined")
endif()
set(RISCV_ROOT_PATH ${RISCV_ROOT_PATH} CACHE STRING "root path to riscv toolchain")
set(CMAKE_C_COMPILER "${RISCV_ROOT_PATH}/bin/riscv32-linux-musl-gcc")
set(CMAKE_CXX_COMPILER "${RISCV_ROOT_PATH}/bin/riscv32-linux-musl-g++")
set(CMAKE_FIND_ROOT_PATH "${RISCV_ROOT_PATH}/riscv32-linux-musl")
set(CMAKE_SYSROOT "${RISCV_ROOT_PATH}/sysroot")
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)
set(CMAKE_C_FLAGS "-march=rv32imafdc")
set(CMAKE_CXX_FLAGS "-march=rv32imafdc")
# cache flags
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS}" CACHE STRING "c flags")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}" CACHE STRING "c++ flags")
# export RISCV_ROOT_PATH=/home/nihui/osd/nds32le-linux-musl-v5d
# cmake -DCMAKE_TOOLCHAIN_FILE=../../toolchains/riscv32-linux-musl.toolchain.cmake -DCMAKE_C_FLAGS="-fno-rtti -fno-exceptions" -DCMAKE_CXX_FLAGS="-fno-rtti -fno-exceptions" -DCMAKE_INSTALL_PREFIX=install -DCMAKE_BUILD_TYPE=Release `cat ../../opencv4_cmake_options.txt` -DBUILD_opencv_world=OFF -DOPENCV_DISABLE_FILESYSTEM_SUPPORT=ON ..