diff --git a/.github/images/k230_unsip_board.png b/.github/images/k230_unsip_board.png new file mode 100644 index 000000000..9708b8b44 Binary files /dev/null and b/.github/images/k230_unsip_board.png differ diff --git a/.github/images/k230_unsip_canmv_board.png b/.github/images/k230_unsip_canmv_board.png new file mode 100644 index 000000000..fac9b8bee Binary files /dev/null and b/.github/images/k230_unsip_canmv_board.png differ diff --git a/.github/images/software_arch.png b/.github/images/software_arch.png new file mode 100644 index 000000000..17c072c87 Binary files /dev/null and b/.github/images/software_arch.png differ diff --git a/.github/workflows/docker_build.yml b/.github/workflows/docker_build.yml deleted file mode 100755 index f9580334b..000000000 --- a/.github/workflows/docker_build.yml +++ /dev/null @@ -1,63 +0,0 @@ -# https://docs.github.com/en/packages/managing-github-packages-using-github-actions-workflows/publishing-and-installing-a-package-with-github-actions -# https://github.com/marketplace/actions/build-and-push-docker-images - - -#on: -# push: -# branches: ['main'] -# paths: ['tools/docker/**'] -# pull_request: -# branches: ['main'] -# paths: ['tools/docker/**'] - -on: - release: - types: [released] - -env: - REGISTRY: ghcr.io - NAMESPACE: kendryte - IMAGE_NAME: k230_sdk - -jobs: - docker_build: - runs-on: ubuntu-latest - steps: - - - name: Checkout - uses: actions/checkout@v3 - - - name: Login to GitHub Container Registry - uses: docker/login-action@v2 - with: - registry: ${{ env.REGISTRY }} - username: ${{ secrets.CR_USER }} - password: ${{ secrets.CR_PAT }} - - - name: Build docker and test - run: | - docker build -f tools/docker/Dockerfile -t ${{ env.IMAGE_NAME }} tools/docker --label "runnumber=${GITHUB_RUN_ID}" - docker run --rm ${{ env.IMAGE_NAME }} - - - name: Push image - run: | - IMAGE_ID=${{ env.REGISTRY }}/${{ env.NAMESPACE }}/${{ env.IMAGE_NAME }} - # Change all uppercase to lowercase - IMAGE_ID=$(echo $IMAGE_ID | tr '[A-Z]' '[a-z]') - # Strip git ref prefix from version - VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,') - # Strip "v" prefix from tag name - #[[ "${{ github.ref }}" == "refs/tags/"* ]] && VERSION=$(echo $VERSION | sed -e 's/^v//') - # Use Docker `latest` tag convention - # [ "$VERSION" == "main" ] && VERSION=latest - echo IMAGE_ID=$IMAGE_ID - echo VERSION=$VERSION - echo "start to tag docker image with ver $VERSION" - docker tag $IMAGE_NAME $IMAGE_ID:$VERSION - echo "start to tag docker image with latest tag" - docker tag $IMAGE_NAME $IMAGE_ID:latest - echo "start to push docker image with ver $VERSION" - docker push $IMAGE_ID:$VERSION - echo "start to push docker image with latest tag" - docker push $IMAGE_ID:latest - echo "finished to push docker image" diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100755 index 000000000..db1dd6589 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,169 @@ +on: + release: + types: [released] + +env: + REGISTRY: ghcr.io + NAMESPACE: kendryte + IMAGE_NAME: k230_sdk + +jobs: + build_docker: + name: Build-Docker + runs-on: ubuntu-latest + steps: + - + name: Checkout + uses: actions/checkout@v4 + - + name: Login to GitHub Container Registry + uses: docker/login-action@v3 + with: + registry: ${{ env.REGISTRY }} + username: ${{ secrets.CR_USER }} + password: ${{ secrets.CR_PAT }} + - + name: Build docker and test + run: | + docker build -f tools/docker/Dockerfile -t ${{ env.IMAGE_NAME }} tools/docker --label "runnumber=${GITHUB_RUN_ID}" + docker run --rm ${{ env.IMAGE_NAME }} + - + name: release docker image + run: | + IMAGE_ID=${{ env.REGISTRY }}/${{ env.NAMESPACE }}/${{ env.IMAGE_NAME }} + # Change all uppercase to lowercase + IMAGE_ID=$(echo $IMAGE_ID | tr '[A-Z]' '[a-z]') + # Strip git ref prefix from version + VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,') + # Strip "v" prefix from tag name + #[[ "${{ github.ref }}" == "refs/tags/"* ]] && VERSION=$(echo $VERSION | sed -e 's/^v//') + # Use Docker `latest` tag convention + # [ "$VERSION" == "main" ] && VERSION=latest + echo IMAGE_ID=$IMAGE_ID + echo VERSION=$VERSION + echo "start to tag docker image with ver $VERSION" + docker tag $IMAGE_NAME $IMAGE_ID:$VERSION + echo "start to tag docker image with latest tag" + docker tag $IMAGE_NAME $IMAGE_ID:latest + echo "start to push docker image with ver $VERSION" + docker push $IMAGE_ID:$VERSION + echo "start to push docker image with latest tag" + docker push $IMAGE_ID:latest + echo "finished to push docker image" + + build_image: + name: Build-Image + needs: build_docker + runs-on: [ubuntu-latest] + timeout-minutes: 180 + container: + image: ghcr.io/kendryte/k230_sdk:latest + env: + CONF: k230_${{ matrix.cfg }}_defconfig + options: --hostname release --user root + strategy: + matrix: + cfg: ["canmv", "evb"] + steps: + - name: Check for dockerenv + run: (ls /.dockerenv && echo Found dockerenv) || (echo No dockerenv) + + - name: Install Nvm/Node for Actions Checkout Env + run: | + pwd + ls -alht + export NVM_DIR="$HOME/.nvm" && ( + git clone https://github.com/nvm-sh/nvm.git "$NVM_DIR" + cd "$NVM_DIR" + git checkout `git describe --abbrev=0 --tags --match "v[0-9]*" $(git rev-list --tags --max-count=1)` + ) && \. "$NVM_DIR/nvm.sh" + nvm install node || exit 1 + node --version || exit 1 + + - name: Checkout Source Code + uses: actions/checkout@v4 + with: + fetch-depth: 0 + clean: true + submodules: recursive + + - name: Download Toolchain and Setup Build Env + run: | + hostname + uname -a + whoami + pwd + git config --global --add safe.directory $PWD + git config --global --list + ls -alht + echo "download toolchain and build env" + make prepare_sourcecode || exit 1 + ls -alht + mkdir -p /opt/ || exit 1 + rm -rf /opt/toolchain/ + echo "show toolchain" + ls -alht $PWD/toolchain/ || exit 1 + echo "link ./toolchain to /opt/toolchain" + ln -s $PWD/toolchain /opt/ || exit 1 + echo "show /opt/toolchain/" + ls -alht /opt/toolchain/ || exit 1 + ls -alht /opt/toolchain/Xuantie-900-gcc-linux* || exit 1 + ls -alht /opt/toolchain/riscv64-linux* || exit 1 + + - name: Build image + run: | + pwd + ls -alht + echo "start to build k230 images" + make CONF=$CONF || exit 1 + echo "---show output---" + ls -alht output/${CONF}/images || exit 1 + pwd + + - name: Show Output Directory For Debug Purpose + run: | + pwd + ls -alht + ls -alht output/${CONF}/images/ + # Copy compiled files to /github/workspace/artifacts + mkdir -p /github/workspace/artifacts + cp output/${CONF}/images/k230_${{ matrix.cfg }}* /github/workspace/artifacts/ + ls -alht /github/workspace/artifacts/ + shell: bash + + - name: Upload Artifacts + uses: actions/upload-artifact@v4 + with: + name: artifacts-${{ matrix.cfg }} + path: /github/workspace/artifacts + + upload_release: + needs: build_image + name: Release + if: ${{ startsWith(github.ref, 'refs/tags/') }} + runs-on: ubuntu-latest + steps: + + - name: Download All Artifacts + uses: actions/download-artifact@v4 + with: + path: artifacts + pattern: artifacts-* + merge-multiple: true + + - name: Display Structure of Artifacts Files + run: ls -R + + - name: Show Working Directory For Debug Purpose + run: | + pwd + ls -alht + ls -alht artifacts || exit 0 + shell: bash + + - name: Upload images to Release Asset + uses: softprops/action-gh-release@v1 + with: + files: artifacts/* + env: + GITHUB_TOKEN: ${{ secrets.CR_PAT }} diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 398f7a463..504d65e5b 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -143,7 +143,7 @@ build-image: script: - cd $CI_PROJECT_DIR - ls -alht - - wget -qc https://ai.b-bug.org/k510/downloads/github/sync_file.sh -O ./sync_file.sh + - wget -qc https://ai.b-bug.org/k230/test_resources/ci/release/sync_file.sh -O ./sync_file.sh - chmod +x ./sync_file.sh - time ./sync_file.sh || time ./sync_file.sh - echo "all file synced" @@ -155,7 +155,7 @@ build-image: script: - cd $CI_PROJECT_DIR - ls -alht - - wget -qc https://ai.b-bug.org/k510/downloads/github/sync_release.sh -O ./sync_release.sh + - wget -qc https://ai.b-bug.org/k230/test_resources/ci/release/sync_release.sh -O ./sync_release.sh - chmod +x ./sync_release.sh - echo $CI_COMMIT_TAG || exit 1 - echo $CONF || exit 1 diff --git a/Kconfig.board b/Kconfig.board index 9d2f31704..1dbcb6a6e 100755 --- a/Kconfig.board +++ b/Kconfig.board @@ -23,6 +23,11 @@ config BOARD_K230_CANMV bool "K230 CANMV(K230PI)" help "CANMV(K230PI)"; + +config BOARD_K230D_CANMV + bool "K230D CANMV(K230PI zero)" + help + "CANMV(K230D PI zero)"; endchoice config BOARD_NAME diff --git a/Makefile b/Makefile index b6d2e3cb4..a69cb9f61 100755 --- a/Makefile +++ b/Makefile @@ -112,8 +112,8 @@ prepare_sourcecode:prepare_toolchain #ai @echo "download nncase sdk" @rm -rf src/big/utils/; rm -rf src/big/ai; - @wget -q --show-progress $(DOWNLOAD_URL)/downloads/kmodel/kmodel_v2.7.0.tgz -O - | tar -xzC src/big/ - @wget -q --show-progress $(DOWNLOAD_URL)/downloads/nncase/nncase_k230_v2.7.0.tgz -O - | tar -xzC src/big/ + @wget -q --show-progress $(DOWNLOAD_URL)/downloads/kmodel/kmodel_v2.8.0.tgz -O - | tar -xzC src/big/ + @wget -q --show-progress $(DOWNLOAD_URL)/downloads/nncase/nncase_k230_v2.8.0.tgz -O - | tar -xzC src/big/ #big utils @echo "download big utils" @@ -142,8 +142,8 @@ prepare_sourcecode:prepare_toolchain #dictionary_pen @if [ "k230_evb_usiplpddr4_dictionary_pen_defconfig" == "$${CONF}" ] ; then \ echo "download dictionary_pen" ; \ - wget -q --show-progress $(DOWNLOAD_URL)/downloads/dictionary_pen/cidianbi_kmodel_v2.7.0.tar.gz -O - | tar -xzC src/reference/business_poc/dictionary_pen_poc/ ; \ - cp src/reference/business_poc/dictionary_pen_poc/cidianbi_kmodel_v2.7.0/include src/reference/business_poc/dictionary_pen_poc/ -rf ; \ + wget -q --show-progress $(DOWNLOAD_URL)/downloads/dictionary_pen/cidianbi_kmodel_v2.8.0.tar.gz -O - | tar -xzC src/reference/business_poc/dictionary_pen_poc/ ; \ + cp src/reference/business_poc/dictionary_pen_poc/cidianbi_kmodel/include src/reference/business_poc/dictionary_pen_poc/ -rf ; \ fi; @@ -220,7 +220,7 @@ mpp-apps:check_src mkdir -p userapps/sample/fastboot_elf; \ make -C userapps/sample || exit $?; \ mkdir -p $(RTSMART_SRC_DIR)/userapps/root/bin/; \ - source $(K230_SDK_ROOT)/.config; [ "$${CONFIG_BOARD_K230D}" != "y" ] && cp userapps/sample/fastboot_elf/* $(RTSMART_SRC_DIR)/userapps/root/bin/; \ + source $(K230_SDK_ROOT)/.config; [ "$${CONFIG_BOARD_K230D_CANMV}" != "y" ] &&[ "$${CONFIG_BOARD_K230D}" != "y" ] && cp userapps/sample/fastboot_elf/* $(RTSMART_SRC_DIR)/userapps/root/bin/; \ cp $(RTSMART_SRC_DIR)/init.sh $(RTSMART_SRC_DIR)/userapps/root/bin/; \ cd -; diff --git a/README.md b/README.md index e5735d31e..a57a12173 100755 --- a/README.md +++ b/README.md @@ -32,7 +32,7 @@ K230芯片是嘉楠科技 Kendryte®系列AIoT芯片中的最新一代SoC产品 K230-USIP-LP3-EVB是针对AI芯片K230-USIP开发,以LPDDR3为内存而设计的测评板;意在通过全面的接口覆盖K230所支持的各项特色功能的同时,为客户提供参考设计以完成自主研发。 -![k230_board](https://kendryte-download.canaan-creative.com/k230/downloads/doc_images/k230_unsip_board.png) +![k230_board](./.github/images/k230_unsip_board.png) | 序号 | 说明 | |------------|------------------| @@ -56,7 +56,7 @@ K230-USIP-LP3-EVB是针对AI芯片K230-USIP开发,以LPDDR3为内存而设计 CanMV-K230针对AI芯片K230-USIP开发,以LPDDR3为内存而设计的测评板,集成了常规开发板所需的HDMI和网络、WIFI/BT等接口。 -![k230_Canmv-k230_board](https://kendryte-download.canaan-creative.com/k230/downloads/doc_images/k230_canmv/k230_unsip_canmv_board.png) +![k230_Canmv-k230_board](./.github/images/k230_unsip_canmv_board.png) | 序号 | 说明 | |------------|------------------| @@ -90,7 +90,7 @@ CanMV-K230针对AI芯片K230-USIP开发,以LPDDR3为内存而设计的测评 K230 SDK 是面向K230 开发板的软件开发包,包含了基于Linux&RT-smart 双核异构系统开发需要用到的源代码,工具链和其他相关资源。 -![k230_software_arch](https://kendryte-download.canaan-creative.com/k230/downloads/doc_images/software_arch.png) +![k230_software_arch](./.github/images/software_arch.png) ### 配置软件开发环境 @@ -166,6 +166,15 @@ k230_evb_defconfig/images > TF卡和eMMC均可使用`sysimage-sdcard.img`镜像,或使用`sysimage-sdcard.img.gz`解压缩得到该文件。 +### 预编译镜像下载 + +如果不希望自行编译镜像,可下载预编译镜像,直接烧录使用 +1. **[main branch](https://github.com/kendryte/k230_sdk/tree/main)**: Github默认分支,作为release分支,编译release镜像自动发布至[Release](https://github.com/kendryte/k230_sdk/releases)页面.(从`v1.4`版本开始支持) +2. 预编译release镜像:请访问[嘉楠开发者社区](https://developer.canaan-creative.com/resource), 然后在`K230/Images`分类中,下载所需的镜像文件,`evb`设备下载`k230_evb*.img.gz`, `canmv`设备下载`k230_canmv*.img.gz`。 + +> 下载的镜像默认为`.gz`压缩格式,需先解压缩,然后再烧录。 +> [K230 micropython](https://github.com/kendryte/k230_canmv/)镜像所支持的功能与K230 SDK并不相同 + ### 烧录镜像文件 #### 烧录TF卡 @@ -176,7 +185,7 @@ k230_evb_defconfig/images sudo dd if=sysimage-sdcard.img of=/dev/sdx bs=1M oflag=sync ``` -如使用Windows烧录, 建议使用[the balena Etcher](https://etcher.balena.io/)工具. +如使用Windows烧录, 建议使用[the balena Etcher](https://etcher.balena.io/)工具(**请在Etcher图标上点击右键,以管理员权限运行,进行烧录**). ![Etcher](https://github.com/kendryte/k510_docs/raw/v1.5/zh/images/quick_start/balenaetcher.png) diff --git a/board/k230_evb_dictionary_pen/gen_dictionary_pen_device_image_sd.sh b/board/k230_evb_dictionary_pen/gen_dictionary_pen_device_image_sd.sh index 74cd370d3..76179864c 100755 --- a/board/k230_evb_dictionary_pen/gen_dictionary_pen_device_image_sd.sh +++ b/board/k230_evb_dictionary_pen/gen_dictionary_pen_device_image_sd.sh @@ -44,7 +44,7 @@ gen_dictionary_pen_device_app() cd ${K230_SDK_ROOT}; make dictionary_pen; #creat dictionary_pen dir mkdir -p ${BUILD_DIR}/images/big-core/app/dictionary_pen/ - cp ${K230_SDK_ROOT}/src/reference/business_poc/dictionary_pen_poc/cidianbi_kmodel_v2.7.0/* ${BUILD_DIR}/images/big-core/app/dictionary_pen/ -rf + cp ${K230_SDK_ROOT}/src/reference/business_poc/dictionary_pen_poc/cidianbi_kmodel/* ${BUILD_DIR}/images/big-core/app/dictionary_pen/ -rf cp ${K230_SDK_ROOT}/src/reference/business_poc/dictionary_pen_poc/include ${BUILD_DIR}/images/big-core/app/dictionary_pen/ -rf cp ${K230_SDK_ROOT}/src/reference/business_poc/dictionary_pen_poc/build/dictionary_pen.elf ${BUILD_DIR}/images/big-core/app/dictionary_pen/ -rf diff --git a/board/k230_evb_dpu_depth_camera/dpu_depth_camera_rcS b/board/k230_evb_dpu_depth_camera/dpu_depth_camera_rcS new file mode 100755 index 000000000..5f7bf97b6 --- /dev/null +++ b/board/k230_evb_dpu_depth_camera/dpu_depth_camera_rcS @@ -0,0 +1,52 @@ +#!/bin/sh + + +# Start all init scripts in /etc/init.d +# executing them in numerical order. +# +for i in /etc/init.d/S??* ;do + + # Ignore dangling symlinks (if any). + [ ! -f "$i" ] && continue + + case "$i" in + *.sh) + # Source shell script for speed. + ( + trap - INT QUIT TSTP + set start + . $i + ) + ;; + *) + # No sh extension, so fork subprocess. + $i start + ;; + esac +done +bootddev=$(cat /proc/cmdline | sed -n "s#root=\(\/dev\/mmcblk[0-9]\).*#\1#p" ) +printf "fix\n" | parted ---pretend-input-tty ${bootddev} print >/dev/null 2>&1 + +cat /etc/version/release_version +# if ! `grep mmc /proc/cmdline >/dev/null` ; then +# if `grep mtd5 /proc/mtd >/dev/null`; then +# mount -t jffs2 /dev/mtdblock5 /mnt || (flash_erase /dev/mtd5 0 0; mount -t jffs2 /dev/mtdblock5 /mnt) +# fi; +# fi + +cd /mnt +insmod k_ipcm.ko +mkdir /sharefs -p +if `grep mmcblk0p3 /proc/cmdline >/dev/null` ; then + mount /dev/mmcblk0p4 /sharefs +elif `grep mmcblk1p3 /proc/cmdline >/dev/null` ; then + mount /dev/mmcblk1p4 /sharefs +fi + +./sharefs & +cd - + +cd /mnt +./canaan-camera-dpu.sh start otg0 +./sample_dpu_uvc & +cd - diff --git a/board/k230_evb_dpu_depth_camera/gen_dpu_depth_camera_device_image_sd.sh b/board/k230_evb_dpu_depth_camera/gen_dpu_depth_camera_device_image_sd.sh new file mode 100755 index 000000000..f5431c809 --- /dev/null +++ b/board/k230_evb_dpu_depth_camera/gen_dpu_depth_camera_device_image_sd.sh @@ -0,0 +1,79 @@ +#!/bin/bash + +source ${K230_SDK_ROOT}/board/common/gen_image_script/gen_image_comm_func.sh + + +env_dir="${K230_SDK_ROOT}/board/common/env" + +GENIMAGE_CFG_DIR="${K230_SDK_ROOT}/board/common/gen_image_cfg" +GENIMAGE_CFG_SD="${GENIMAGE_CFG_DIR}/genimage-sdcard.cfg" +GENIMAGE_CFG_SPI_NOR="${GENIMAGE_CFG_DIR}/genimage-spinor.cfg" +GENIMAGE_CFG_SPI_NAND="${GENIMAGE_CFG_DIR}/genimage-spinand.cfg" +GENIMAGE_CFG_SD_REMOTE="${GENIMAGE_CFG_DIR}/genimage-sdcard_remote.cfg" + +cfg_data_file_path="${GENIMAGE_CFG_DIR}/data" +quick_boot_cfg_data_file="${GENIMAGE_CFG_DIR}/data/quick_boot.bin" +face_database_data_file="${GENIMAGE_CFG_DIR}/data/face_data.bin" +sensor_cfg_data_file="${GENIMAGE_CFG_DIR}/data/sensor_cfg.bin" +ai_mode_data_file="${BUILD_DIR}/images/big-core/ai_mode.bin" #"${GENIMAGE_CFG_DIR}/data/ai_mode.bin" +speckle_data_file="${GENIMAGE_CFG_DIR}/data/speckle.bin" +rtapp_data_file="${BUILD_DIR}/images/big-core/fastboot_app.elf" + + + + +gen_dpu_depth_camera_device_app() +{ + + rm -rf lib/tuning-server; + + cp ${K230_SDK_ROOT}/board/k230_evb_dpu_depth_camera/dpu_depth_camera_rcS ${BUILD_DIR}/images/little-core/rootfs/etc/init.d/rcS; + + cp ${K230_SDK_ROOT}/src/common/cdk/user/out/big/sample_sys_init.elf ${BUILD_DIR}/images/big-core/root/bin/; + cd ${BUILD_DIR}/images/big-core/root/bin; + echo "cd /bin" > init.sh + echo "sample_sys_init.elf &" >> init.sh + + cd ${RTSMART_SRC_DIR}/userapps/; python3 ../tools/mkromfs.py ${BUILD_DIR}/images/big-core/root/ ${RTSMART_SRC_DIR}/kernel/bsp/maix3/applications/romfs.c; + cd ${K230_SDK_ROOT};make rtt_update_romfs; + + cp ${BUILD_DIR}/big/rt-smart/rtthread.* ${BUILD_DIR}/images/big-core/; +} + +copye_file_to_images; +gen_dpu_depth_camera_device_app; +gen_version; +gen_uboot_bin; +gen_linux_bin; +gen_final_ext2; +gen_rtt_bin; +gen_env_bin; +copy_app; + +if [ "${CONFIG_REMOTE_TEST_PLATFORM}" = "y" ] ; then + gen_image ${GENIMAGE_CFG_SD_REMOTE} sysimage-sdcard.img +else + gen_image ${GENIMAGE_CFG_SD} sysimage-sdcard.img +fi + +if [ "${CONFIG_GEN_SECURITY_IMG}" = "y" ] ; then + gen_image ${GENIMAGE_CFG_SD_AES} sysimage-sdcard_aes.img + gen_image ${GENIMAGE_CFG_SD_SM} sysimage-sdcard_sm.img +fi + +# gen_image_spinor +# gen_image_spinand; + + + +cd ${BUILD_DIR}/images/ +rm -rf sysimage-sdcard_aes.img sysimage-sdcard_sm.img *.vfat + + + + + + + + + diff --git a/configs/k230_evb_dpu_depth_camera_defconfig b/configs/k230_evb_dpu_depth_camera_defconfig new file mode 100644 index 000000000..ed5e30620 --- /dev/null +++ b/configs/k230_evb_dpu_depth_camera_defconfig @@ -0,0 +1,58 @@ +# +# Automatically generated file; DO NOT EDIT. +# K230 SDK Configuration +# + +# +# board configuration for sd card boot +# +CONFIG_BOARD_K230_EVB_DPU_DEPTH_CAMERA=y +# CONFIG_BOARD_K230_FPGA is not set +# CONFIG_BOARD_K230D is not set +# CONFIG_BOARD_K230_CANMV is not set +CONFIG_BOARD_NAME="k230_evb" +CONFIG_QUICK_BOOT=y +# CONFIG_GEN_SECURITY_IMG is not set +CONFIG_UBOOT_DEFCONFIG="k230_evb" +CONFIG_LINUX_DTB="k230_evb" +# CONFIG_REMOTE_TEST_PLATFORM is not set +CONFIG_GEN_IMG_SCRIPT="board/k230_evb_dpu_depth_camera/gen_dpu_depth_camera_device_image_sd.sh" + +# +# toolchain configurations +# +CONFIG_TOOLCHAIN_PREFIX_RTT="riscv64-unknown-linux-musl-" +CONFIG_TOOLCHAIN_PATH_RTT="/opt/toolchain/riscv64-linux-musleabi_for_x86_64-pc-linux-gnu/bin" +CONFIG_TOOLCHAIN_PREFIX_LINUX="riscv64-unknown-linux-gnu-" +CONFIG_TOOLCHAIN_PATH_LINUX="/opt/toolchain/Xuantie-900-gcc-linux-5.10.4-glibc-x86_64-V2.6.0/bin" + +# +# Memory configuration +# +CONFIG_MEM_TOTAL_SIZE=0x20000000 +CONFIG_MEM_PARAM_BASE=0x00000000 +CONFIG_MEM_PARAM_SIZE=0x00100000 +CONFIG_MEM_IPCM_BASE=0x00100000 +CONFIG_MEM_IPCM_SIZE=0x00100000 +CONFIG_MEM_RTT_SYS_BASE=0x00200000 +CONFIG_MEM_RTT_SYS_SIZE=0x07E00000 +CONFIG_MEM_AI_MODEL_BASE=0x1FC00000 +CONFIG_MEM_AI_MODEL_SIZE=0x00400000 +CONFIG_MEM_LINUX_SYS_BASE=0x08000000 +CONFIG_MEM_LINUX_SYS_SIZE=0x08000000 +CONFIG_MEM_MMZ_BASE=0x10000000 +CONFIG_MEM_MMZ_SIZE=0x0FC00000 +CONFIG_MEM_BOUNDARY_RESERVED_SIZE=0x00001000 + +# +# storage configurations +# +CONFIG_SPI_NOR=y +CONFIG_SPI_NOR_CFG="" +# CONFIG_SPI_NAND is not set +CONFIG_SPI_NAND_CFG="" +CONFIG_SDCAED=y +CONFIG_EMMC=y +CONFIG_SPI_EMMC_CFG="" +CONFIG_SUPPORT_LINUX=y +CONFIG_SUPPORT_RTSMART=y diff --git a/configs/k230d_canmv_defconfig b/configs/k230d_canmv_defconfig new file mode 100644 index 000000000..6298fa80c --- /dev/null +++ b/configs/k230d_canmv_defconfig @@ -0,0 +1,62 @@ +# +# Automatically generated file; DO NOT EDIT. +# K230 SDK Configuration +# + +# +# board configuration +# +# CONFIG_BOARD_K230_EVB is not set +# CONFIG_BOARD_K230_FPGA is not set +# CONFIG_BOARD_K230D is not set +# CONFIG_BOARD_K230_CANMV is not set +CONFIG_BOARD_K230D_CANMV=y +CONFIG_BOARD_NAME="k230d_canmv" +# CONFIG_QUICK_BOOT is not set +# CONFIG_GEN_SECURITY_IMG is not set +CONFIG_UBOOT_DEFCONFIG="k230d_canmv" +CONFIG_LINUX_DEFCONFIG="k230d_canmv" +CONFIG_LINUX_DTB="k230d_canmv" +# CONFIG_REMOTE_TEST_PLATFORM is not set +CONFIG_GEN_IMG_SCRIPT="board/common/gen_image_script/gen_image.sh" +CONFIG_RTT_CONSOLE_ID=2 + +# +# toolchain configurations +# +CONFIG_TOOLCHAIN_PREFIX_RTT="riscv64-unknown-linux-musl-" +CONFIG_TOOLCHAIN_PATH_RTT="/opt/toolchain/riscv64-linux-musleabi_for_x86_64-pc-linux-gnu/bin" +CONFIG_TOOLCHAIN_PREFIX_LINUX="riscv64-unknown-linux-gnu-" +CONFIG_TOOLCHAIN_PATH_LINUX="/opt/toolchain/Xuantie-900-gcc-linux-5.10.4-glibc-x86_64-V2.6.0/bin" + +# +# Memory configuration +# +CONFIG_MEM_TOTAL_SIZE=0x8000000 +CONFIG_MEM_IPCM_BASE=0x00100000 +CONFIG_MEM_IPCM_SIZE=0x00100000 +CONFIG_MEM_RTT_SYS_BASE=0x00200000 +CONFIG_MEM_RTT_SYS_SIZE=0x02200000 +CONFIG_MEM_LINUX_SYS_BASE=0x02400000 +CONFIG_MEM_LINUX_SYS_SIZE=0x03000000 +CONFIG_MEM_MMZ_BASE=0x05400000 +CONFIG_MEM_MMZ_SIZE=0x02b00000 +CONFIG_MEM_BOUNDARY_RESERVED_SIZE=0x00001000 + +# +# storage configurations +# +# CONFIG_SPI_NOR is not set +# CONFIG_SPI_NAND is not set +CONFIG_SDCAED=y + +# +# wifi configurations +# +# CONFIG_AP6212A is not set +# CONFIG_AP6256 is not set +CONFIG_SUPPORT_RTSMART=y +CONFIG_SUPPORT_LINUX=y +CONFIG_LINUX_RUN_CORE_ID=0 +# CONFIG_BUILD_DEBUG_VER is not set +CONFIG_BUILD_RELEASE_VER=y diff --git a/configs/k230d_doorlock_ov9286_defconfig b/configs/k230d_doorlock_ov9286_defconfig index eb42f1d51..ade3ffe42 100755 --- a/configs/k230d_doorlock_ov9286_defconfig +++ b/configs/k230d_doorlock_ov9286_defconfig @@ -83,5 +83,6 @@ CONFIG_SPI_NOR_LR_BASE=0x1500000 CONFIG_SPI_NOR_LR_SIZE=0xb00000 # CONFIG_BUILD_DEBUG_VER is not set CONFIG_BUILD_RELEASE_VER=y +CONFIG_RTT_CONSOLE_ID=4 CONFIG_SUPPORT_LINUX=y CONFIG_SUPPORT_RTSMART=y diff --git a/repo.mak b/repo.mak index a3b121b5b..84f4a2f2d 100755 --- a/repo.mak +++ b/repo.mak @@ -1,11 +1,11 @@ -RT-SMART_VERSION = "1f89f4d8078b0b8804cd97b92dffd3043456ca97" -MPP_VERSION = "ba32c3614253b62dd2d4ae8927477c9cf7e6a871" +RT-SMART_VERSION = "1a25d7e49da28ef7f06334f3344c8587768ef1d4" +MPP_VERSION = "7b75e867ab4c940d5ee553a67ee4a4c59c90701a" UNITTEST_VERSION = "a07caf5e19a6a215605271cfeedce18111790e9d" OPENSBI_VERSION = "b3a7a73c46a39e3e07209462b5c22d936b0fddca" -BUILDROOT-EXT_VERSION = "00c7c33c63c0210b1fb16c9eb6f9904bdef9cf4e" -LINUX_VERSION = "ff2e371fe15fc1603ebbf5e4351adef921c027c2" -UBOOT_VERSION = "61c2455f0c7a89ef274ba386f5a04b86eeb0f115" -CDK_VERSION = "959403fe52d31297b01ddeace961e9ea477a9467" +BUILDROOT-EXT_VERSION = "a8dc2e9b4c47656db8c97307472c0763d598aba4" +LINUX_VERSION = "fb13e7f92a34deb39b3578be341a5b11c5a4a2fb" +UBOOT_VERSION = "faf1a8311cf4559fa8ffb166ba14099ee47bbae9" +CDK_VERSION = "5ce32d38813e34c6cb97d0966d6999c210881464" RT-SMART_SRC_PATH = src/big/rt-smart MPP_SRC_PATH = src/big/mpp diff --git a/src/big/mpp/include/comm/k_board_config_comm.h b/src/big/mpp/include/comm/k_board_config_comm.h index d4560e8b3..aa2589f27 100755 --- a/src/big/mpp/include/comm/k_board_config_comm.h +++ b/src/big/mpp/include/comm/k_board_config_comm.h @@ -53,6 +53,7 @@ extern "C" { //OV9286 gpio cinfig #define VICAP_OV9286_RST_GPIO 35 #define OV5647_IIC "i2c1" +#define OV5647_CAM_PIN 20 #elif defined(CONFIG_BOARD_K230_EVB) // usip evb gpio config @@ -66,6 +67,7 @@ extern "C" { //OV9286 gpio cinfig #define VICAP_OV9286_RST_GPIO 49 #define OV5647_IIC "i2c1" +#define OV5647_CAM_PIN 20 #elif defined(CONFIG_BOARD_K230_CANMV) // usip evb gpio config @@ -79,7 +81,21 @@ extern "C" { //OV9286 gpio cinfig #define VICAP_OV9286_RST_GPIO 49 #define OV5647_IIC "i2c3" +#define OV5647_CAM_PIN 0 +#elif defined(CONFIG_BOARD_K230D_CANMV) +// usip evb gpio config +// display gpio +#define DISPLAY_LCD_RST_GPIO 24 +#define DISPLAY_LCD_BACKLIGHT_EN 25 + +// imx335 gpio config +#define VICAP_IMX335_RST_GPIO 46 +#define VICAP_IMX335_MASTER_GPIO 28 +//OV9286 gpio cinfig +#define VICAP_OV9286_RST_GPIO 20 +#define OV5647_IIC "i2c4" +#define OV5647_CAM_PIN 20 #else @@ -92,6 +108,7 @@ extern "C" { //OV9286 gpio cinfig #define VICAP_OV9286_RST_GPIO 49 #define OV5647_IIC "i2c1" +#define OV5647_CAM_PIN 20 #endif #ifdef __cplusplus diff --git a/src/big/mpp/include/comm/k_nonai_2d_comm.h b/src/big/mpp/include/comm/k_nonai_2d_comm.h new file mode 100755 index 000000000..2fff0a73b --- /dev/null +++ b/src/big/mpp/include/comm/k_nonai_2d_comm.h @@ -0,0 +1,107 @@ +/** + * @file k_nonai_2d_comm.h + * @author + * @brief + * @version 1.0 + * @date 2022-09-01 + * + * @copyright + * Copyright (c) 2023, Canaan Bright Sight Co., Ltd + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND + * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, + * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +#ifndef __K_NONAI_2D_COMM_H__ +#define __K_NONAI_2D_COMM_H__ + +#include "k_errno.h" +#include "k_module.h" +#include "k_video_comm.h" +#include "k_payload_comm.h" +#ifdef __cplusplus +extern "C" { +#endif /* End of #ifdef __cplusplus */ + +/** \addtogroup NONAI_2D */ +/** @{ */ /**