Skip to content

Commit

Permalink
k230 canmv release v0.3
Browse files Browse the repository at this point in the history
  • Loading branch information
wuwentao committed Dec 28, 2023
1 parent 9aa8938 commit 7458889
Show file tree
Hide file tree
Showing 205 changed files with 38,919 additions and 13,655 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ assignees:
- wuwentao
- zhangxiaojingCAN
- kexinliang666
- chenhb3
- yixinghua121
body:
- type: textarea
id: what_happened
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/feature_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ assignees:
- wuwentao
- zhangxiaojingCAN
- kexinliang666
- chenhb3
- yixinghua121
body:
- type: textarea
id: what_feature
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/help.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ assignees:
- wuwentao
- zhangxiaojingCAN
- kexinliang666
- chenhb3
- yixinghua121
body:
- type: textarea
id: help
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/other.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ assignees:
- wuwentao
- zhangxiaojingCAN
- kexinliang666
- chenhb3
- yixinghua121
body:
- type: textarea
id: other
Expand Down
91 changes: 91 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
name: K230 CanMV Release

on:
release:
types: [released]
push:
branches:
- dev
- main

defaults:
run:
shell: bash

jobs:
build_image:
name: Build
runs-on: [ubuntu-latest]
timeout-minutes: 120
container:
image: ghcr.io/kendryte/k230_sdk:latest
env:
CONF: k230_${{ matrix.cfg }}_defconfig
options: --hostname release --user root
strategy:
matrix:
cfg: ["canmv"]
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
- uses: actions/checkout@v4
with:
fetch-depth: 0
clean: true
submodules: true

- name: Download toolchain and build env
run: |
ls -alht micropython
ls -alht k230_sdk
pwd
echo "manual update micropython submodules directly from github and skip local mirror download"
cd micropython || exit 1
git submodule update --recursive --init || exit 1
cd ../ || exit 1
echo "add safe dir for prepare_sourcecode use git command with permission error"
git config --global --add safe.directory $PWD
git config --global --add safe.directory $PWD/k230_sdk
git config --global --add safe.directory $PWD/micropython
git config --global --list
ls -alht
echo "download toolchain and build env"
time make prepare_sourcecode FAST_DL=0 || exit 1
ls -alht
mkdir -p /opt/ || exit 1
rm -rf /opt/toolchain/
echo "show PWD toolchain"
ls -alht $PWD/k230_sdk/toolchain/ || exit 1
echo "link ./k230_sdk/toolchain to /opt/toolchain"
ln -s $PWD/k230_sdk/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 canmv image"
time make CONF=$CONF || exit 1
echo "---show output---"
ls -alht output/${CONF}/images || exit 1
- name: Save image
run: |
pwd
echo "upload image to release[TO BE done]"
34 changes: 17 additions & 17 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -407,6 +407,11 @@ tag_sync:
power_reset="./bin/ailab power --type=cycle ${available}"
load_cmd="./bin/aiload --pr_id ${CI_MERGE_REQUEST_IID} --job_id ${CI_PIPELINE_ID} --md5_sysimage ${sysimage_md5} ${available}"
for i in {1..4}; do
if [ $i -eq 4 ]
then
echo "ERROR: Max retries reached with load image"
exit 1
fi
starttime=$(date +'%Y-%m-%d %H:%M:%S')
echo "---loop $i start time: $starttime"
echo "---start to load image in loop $i---"
Expand All @@ -426,11 +431,6 @@ tag_sync:
echo "---loop $i end time: $endtime"
echo "---loop $i total cost time:$((end_seconds - start_seconds)) s"
done
if [ $i -eq 4 ]
then
echo "ERROR: Max retries reached with load image"
exit 1
fi
etime=$(date +'%Y-%m-%d %H:%M:%S')
s_seconds=$(date -d "$stime" +%s)
e_seconds=$(date -d "$etime" +%s)
Expand Down Expand Up @@ -564,7 +564,12 @@ tag_sync:
stime=$(date +'%Y-%m-%d %H:%M:%S')
echo "---run smoke test start time: $stime"
test_cmd="./bin/airobot -m gitlab -V k230.yml -i smoke k230.robot"
for i in {1..2}; do
for i in {1..3}; do
if [ $i -eq 3 ]
then
echo "ERROR: Max retries reached with run smoke test"
exit 1
fi
starttime=$(date +'%Y-%m-%d %H:%M:%S')
echo "---loop $i start time: $starttime"
echo "---start to run smoke test in loop $i---"
Expand All @@ -583,11 +588,6 @@ tag_sync:
echo "---loop $i end time: $endtime"
echo "---loop $i total cost time:$((end_seconds - start_seconds)) s"
done
if [ $i -eq 2 ]
then
echo "ERROR: Max retries reached with run smoke test"
exit 1
fi
etime=$(date +'%Y-%m-%d %H:%M:%S')
s_seconds=$(date -d "$stime" +%s)
e_seconds=$(date -d "$etime" +%s)
Expand All @@ -607,7 +607,12 @@ tag_sync:
stime=$(date +'%Y-%m-%d %H:%M:%S')
echo "---run k230 smoke test start time: $stime"
test_cmd="./k230_smoke_test.sh"
for i in {1..2}; do
for i in {1..3}; do
if [ $i -eq 3 ]
then
echo "ERROR: Max retries reached with run k230 smoke test"
exit 1
fi
starttime=$(date +'%Y-%m-%d %H:%M:%S')
echo "---loop $i start time: $starttime"
echo "---start to run k230 smoke test in loop $i---"
Expand All @@ -626,11 +631,6 @@ tag_sync:
echo "---loop $i end time: $endtime"
echo "---loop $i total cost time:$((end_seconds - start_seconds)) s"
done
if [ $i -eq 2 ]
then
echo "ERROR: Max retries reached with run k230 smoke test"
exit 1
fi
etime=$(date +'%Y-%m-%d %H:%M:%S')
s_seconds=$(date -d "$stime" +%s)
e_seconds=$(date -d "$etime" +%s)
Expand Down
6 changes: 6 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,12 @@ build-image: micropython
@cp -r k230_sdk/src/big/kmodel/ai_poc/kmodel/kws.kmodel $(K230_CANMV_BUILD_DIR)/images/app/tests/kmodel
@cp -r k230_sdk/src/big/kmodel/ai_poc/kmodel/face_alignment.kmodel $(K230_CANMV_BUILD_DIR)/images/app/tests/kmodel
@cp -r k230_sdk/src/big/kmodel/ai_poc/kmodel/face_alignment_post.kmodel $(K230_CANMV_BUILD_DIR)/images/app/tests/kmodel
@cp -r k230_sdk/src/big/kmodel/ai_poc/kmodel/eye_gaze.kmodel $(K230_CANMV_BUILD_DIR)/images/app/tests/kmodel
@cp -r k230_sdk/src/big/kmodel/ai_poc/kmodel/yolov5n-falldown.kmodel $(K230_CANMV_BUILD_DIR)/images/app/tests/kmodel
@cp -r k230_sdk/src/big/kmodel/ai_poc/kmodel/cropped_test127.kmodel $(K230_CANMV_BUILD_DIR)/images/app/tests/kmodel
@cp -r k230_sdk/src/big/kmodel/ai_poc/kmodel/nanotrack_backbone_sim.kmodel $(K230_CANMV_BUILD_DIR)/images/app/tests/kmodel
@cp -r k230_sdk/src/big/kmodel/ai_poc/kmodel/nanotracker_head_calib_k230.kmodel $(K230_CANMV_BUILD_DIR)/images/app/tests/kmodel
@cp -r k230_sdk/src/big/kmodel/ai_poc/kmodel/gesture.kmodel $(K230_CANMV_BUILD_DIR)/images/app/tests/kmodel
@make -C k230_sdk build-image

.PHONY: micropython-clean
Expand Down
1 change: 1 addition & 0 deletions k230_sdk_overlay/board/common/env/default.env
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,5 @@ upspiuboot=usb start; dhcp; tftp 0xc100000 10.10.1.94:wjx/u-boot.img && sf prob
usb_load=usb start; dhcp; tftp $ramdisk_addr jiangxiangbing/rtt_system.bin; k230_boot mem $ramdisk_addr 0x$filesize; tftp $kernel_addr jiangxiangbing/fw_payload.img;tftp $ramdisk_addr jiangxiangbing/rootfs-final.cpio.gz;tftp $dtb_addr jiangxiangbing/k230.dtb
vendor=canaan
bootargs=loglevel=8 rw console=ttyS0,115200 earlycon=sbi;
cdloadadd=0x10000000

Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,6 @@ mkdir /sharefs -p
#elif `grep mmcblk1p3 /proc/cmdline >/dev/null` ; then
# mount /dev/mmcblk1p4 /sharefs
#fi

micropython_socket_server &
#./sharefs &
cd -
Loading

0 comments on commit 7458889

Please sign in to comment.