Skip to content

Commit

Permalink
Update generate image rules.
Browse files Browse the repository at this point in the history
  • Loading branch information
kendryte747 committed Sep 15, 2024
1 parent b73ee33 commit cfba015
Show file tree
Hide file tree
Showing 10 changed files with 22 additions and 27 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build_manual.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,10 +86,10 @@ jobs:
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/heads/main')
with:
tag_name: PreRelease-${{ github.ref_name }}
tag_name: PreRelease
files: |
output/**/*.img.gz
output/**/*.img.sha256
output/**/*.img.md5
prerelease: true
generate_release_notes: true
body_path: prerelease.txt
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,5 +73,5 @@ jobs:
tag_name: ${{ github.ref_name }}
files: |
output/**/*.img.gz
output/**/*.img.sha256
output/**/*.img.md5
generate_release_notes: true
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ CanMV 的目的是让 AIOT 编程更简单, 基于 [Micropython](http://www.mi

## 镜像下载

1. **[PreRelease](https://github.com/kendryte/canmv_k230/releases/tag/PreRelease-main)**: 开发分支自动编译生成镜像,供测试使用,尽保留最新版本
1. **[PreRelease](https://github.com/kendryte/canmv_k230/releases/tag/PreRelease)**: 开发分支自动编译生成镜像,供测试使用,尽保留最新版本

2. 预编译release镜像:请访问[嘉楠开发者社区](https://developer.canaan-creative.com/resource), 然后在`K230/Images`分类中,下载镜像文件名包含`micropython`的文件,并烧录至SD卡中。(镜像文件名格式:`*_micropython_*.img.gz`)

Expand Down
16 changes: 6 additions & 10 deletions boards/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,12 @@ menu "Board Configuration"
default "k230_canmv_dongshanpi" if BOARD_K230_CANMV_DONGSHANPI

config BOARD_NAME
string
default BOARD
string "Board Generate Image Name"
default "CanMV-K230" if BOARD_K230_CANMV
default "CanMV-K230-V3P0" if BOARD_K230_CANMV_V3P0
default "CanMV-K230_LCKFB" if BOARD_K230_CANMV_LCKFB
default "CanMV-K230_01Studio" if BOARD_K230_CANMV_01STUDIO
default "CanMV-K230D_Zero" if BOARD_K230D_CANMV_BPI_ZERO

config MEM_BASE_ADDR
hex
Expand Down Expand Up @@ -97,14 +101,6 @@ menu "Board Configuration"
string "Board specified generate image configure file"
default "genimage-sdcard.cfg"

menuconfig BOARD_USE_SPEC_NAME
bool "Board USE specified name for image file"

if BOARD_USE_SPEC_NAME
config BOARD_SPEC_NAME
string "Board specified name for image file"
endif

source "$(SDK_BOARD_DIR)/Kconfig"

endmenu
2 changes: 2 additions & 0 deletions boards/k230_canmv/Kconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
config BOARD_NOT_SUPPORT_HW_RTC
def_bool y
2 changes: 2 additions & 0 deletions boards/k230_canmv_01studio/Kconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
config BOARD_NOT_SUPPORT_HW_RTC
def_bool y
3 changes: 1 addition & 2 deletions configs/k230_canmv_dongshanpi__1024_defconfig
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
CONFIG_BOARD_K230_CANMV_DONGSHANPI=y
CONFIG_BOARD_USE_SPEC_NAME=y
CONFIG_BOARD_SPEC_NAME="k230_canmv_dongshanpi_1024"
CONFIG_BOARD_NAME="CanMV-K230_DONGSHANPI_1024"
CONFIG_MEM_TOTAL_SIZE=0x40000000
CONFIG_MEM_RTSMART_SIZE=0x20000000
CONFIG_MEM_RTSMART_HEAP_SIZE=0x4000000
Expand Down
3 changes: 1 addition & 2 deletions configs/k230_canmv_dongshanpi__512_defconfig
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
CONFIG_BOARD_K230_CANMV_DONGSHANPI=y
CONFIG_BOARD_USE_SPEC_NAME=y
CONFIG_BOARD_SPEC_NAME="k230_canmv_dongshanpi_512"
CONFIG_BOARD_NAME="CanMV-K230_DONGSHANPI_512"
CONFIG_UBOOT_USE_CUSTOM_CONFIG_FILE=y
CONFIG_UBOOT_CUSTOM_CONFIG_FILE="k230_canmv_dongshanpi__512_defconfig"
CONFIG_MPP_ENABLE_CSI_DEV_0=y
Expand Down
10 changes: 5 additions & 5 deletions tools/gen_image.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ gen_image()

gzip -k -f ${SDK_BUILD_DIR}/${image}
chmod a+rw ${SDK_BUILD_DIR}/${image} ${SDK_BUILD_DIR}/${image}.gz;
sha256sum ${SDK_BUILD_DIR}/${image} ${SDK_BUILD_DIR}/${image}.gz > ${SDK_BUILD_DIR}/${image}.sha256
md5sum ${SDK_BUILD_DIR}/${image} ${SDK_BUILD_DIR}/${image}.gz > ${SDK_BUILD_DIR}/${image}.md5
}

parse_repo_version()
Expand Down Expand Up @@ -106,18 +106,18 @@ fi
if [ "$IS_CI" = "1" ]; then
if [ "$CONFIG_SDK_ENABLE_CANMV" = "y" ]; then
canmv_revision=$(parse_repo_version ${SDK_CANMV_SRC_DIR})
image_name="${MK_IMAGE_NAME}_micropython_${canmv_revision}_nncase_${nncase_version}.img"
image_name="${MK_IMAGE_NAME}_micropython_${canmv_revision}_nncase_v${nncase_version}.img"
else
rtsmart_revision=$(parse_repo_version ${SDK_RTSMART_SRC_DIR})
image_name="${MK_IMAGE_NAME}_rtsmart_${rtsmart_revision}_nncase_${nncase_version}.img"
image_name="${MK_IMAGE_NAME}_rtsmart_${rtsmart_revision}_nncase_v${nncase_version}.img"
fi
else
if [ "$CONFIG_SDK_ENABLE_CANMV" = "y" ]; then
canmv_revision=$(parse_repo_version ${SDK_CANMV_SRC_DIR})
image_name="${MK_IMAGE_NAME}_micropython_nncase_${nncase_version}.img"
image_name="${MK_IMAGE_NAME}_micropython_${canmv_revision}_nncase_v${nncase_version}.img"
else
rtsmart_revision=$(parse_repo_version ${SDK_RTSMART_SRC_DIR})
image_name="${MK_IMAGE_NAME}_rtsmart_nncase_${nncase_version}.img"
image_name="${MK_IMAGE_NAME}_rtsmart_${rtsmart_revision}nncase_v${nncase_version}.img"
fi
fi

Expand Down
5 changes: 1 addition & 4 deletions tools/mkenv.mk
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,5 @@ endif

export MKENV_INCLUDED = 1

MK_IMAGE_NAME?=$(call qstrip,$(CONFIG_BOARD))
ifeq ($(CONFIG_BOARD_USE_SPEC_NAME),y)
MK_IMAGE_NAME:=$(call qstrip,$(CONFIG_BOARD_SPEC_NAME))
endif
MK_IMAGE_NAME?=$(call qstrip,$(CONFIG_BOARD_NAME))
export MK_IMAGE_NAME

0 comments on commit cfba015

Please sign in to comment.