Skip to content

Commit

Permalink
k230 sdk release v1.7
Browse files Browse the repository at this point in the history
  • Loading branch information
wuwentao committed Aug 26, 2024
1 parent 8074e1e commit 2832106
Show file tree
Hide file tree
Showing 8,422 changed files with 2,262,488 additions and 36,487 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
15 changes: 9 additions & 6 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ variables:
GITHUB_REPO: [email protected]:kendryte/k230_sdk.git
GITEE_REPO: [email protected]:kendryte/k230_sdk.git
CONF: k230_evb_defconfig
IMAGE_DIR: images
IMAGE_NAME: "*_nncase_*.img.gz"
RELEASE_DIR: sdk_images

default:
image: ai.b-bug.org:5000/k230_sdk:latest
Expand Down Expand Up @@ -71,7 +74,7 @@ manual_sync:
# new MR open
build-image:
variables:
DST_BASE: /data1/k230/gitlab-ci/images/${CI_PROJECT_NAME}
DST_BASE: /data1/k230/gitlab-ci/${IMAGE_DIR}/${CI_PROJECT_NAME}
SRC_DIR: ./output/${CONF}/images
rules:
- if: $CI_PIPELINE_SOURCE == "merge_request_event" && $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "dev"
Expand Down Expand Up @@ -169,11 +172,11 @@ build-image:
script:
- cd $CI_PROJECT_DIR
- ls -alht
- wget -qc https://ai.b-bug.org/k230/test_resources/ci/release/release_k230_sdk_image.sh -O ./release_k230_sdk_image.sh || exit 1
- chmod +x ./release_k230_sdk_image.sh
- wget -qc https://ai.b-bug.org/k230/test_resources/ci/release/release_images.sh -O ./release_images.sh || exit 1
- chmod +x ./release_images.sh
- echo $CI_COMMIT_TAG || exit 1
- echo $CONF || exit 1
- time ./release_k230_sdk_image.sh $CI_COMMIT_TAG $CONF || time ./release_k230_sdk_image.sh $CI_COMMIT_TAG $CONF || exit 1
- time ./release_images.sh $CI_COMMIT_TAG $CONF $IMAGE_DIR $IMAGE_NAME $RELEASE_DIR || time ./release_images.sh $CI_COMMIT_TAG $CONF $IMAGE_DIR $IMAGE_NAME $RELEASE_DIR || exit 1
- echo "all release file synced"

.sync_sdk_github_zip:
Expand Down Expand Up @@ -285,7 +288,7 @@ build-image:
- echo "----------save image----------"
- echo ${DST_BASE}
- echo "set DST_DIR with different type based on docs/images/src"
- DST_DIR="${DST_BASE}/images"
- DST_DIR="${DST_BASE}/${IMAGE_DIR}"
- echo ${DST_DIR}
- echo "---create repo dir---"
- sudo mkdir -p ${DST_DIR}
Expand All @@ -296,7 +299,7 @@ build-image:
- echo "---create current image version dir---"
- sudo mkdir -p ${DST_DIR}/${SUB_DIR}/ || exit 1
- echo "---remove image file---"
- rm -rf ${SRC_DIR}/images/
- rm -rf ${SRC_DIR}/${IMAGE_DIR}/
- echo "---save sdk build output---"
- sudo cp -rf --sparse=always ${SRC_DIR}/ ${DST_DIR}/${SUB_DIR}/
- echo "${DST_DIR}/${SUB_DIR}/"
Expand Down
7 changes: 6 additions & 1 deletion Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@ config LINUX_RUN_CORE_ID
help
support linux on core num;

config MPP_MIDDLEWARE
bool "make mpp middleware "
default n
help
make mpp middleware ;
####################debug /realse version begain {
choice
prompt "build debug/release version"
Expand All @@ -50,4 +55,4 @@ config DBGLV
0----release
default 0 if BUILD_RELEASE_VER
default 8 if BUILD_DEBUG_VER
####################debug /realse version end }
####################debug /realse version end }
16 changes: 16 additions & 0 deletions Kconfig.board
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,11 @@ config BOARD_K230_CANMV_DONGSHANPI
bool "K230 CANMV(DONGSHANPI)"
help
"CANMV(DONGSHANPI)";

config BOARD_K230D_CANMV_BPI
bool "K230 CANMV(BPI)"
help
"CANMV(k230d bpi)";
endchoice

config BOARD_NAME
Expand Down Expand Up @@ -80,6 +85,17 @@ config LINUX_DTB
linux dtb name ;
default BOARD_NAME

config BUILDROOT_DEFCONFIG
string "buildroot defconfig "
help
buildroot defconfig ;
default BOARD_NAME

config RTTHREAD_DEFCONFIG
string "rtthread defconfig "
help
rtthread defconfig ;

config REMOTE_TEST_PLATFORM
bool "config REMOTE_TEST_PLATFORM"
help
Expand Down
4 changes: 4 additions & 0 deletions Kconfig.wifi
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ config AP6256
config RTL8188FU
bool "enable rtl8188fu"
default n

config RTL8723DU
bool "enable rtl8723du"
default n
endmenu


28 changes: 20 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,11 @@ define BUILD_IMAGE

endef

ifeq ($(CONFIG_MPP_MIDDLEWARE),y)
MPP_MIDDLEWARE = mpp-middleware
MPP_MIDDLEWARE_CLEAN = mpp-middleware-clean
endif

#include .config

.PHONY: all
Expand Down Expand Up @@ -112,8 +117,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.8.3.tgz -O - | tar -xzC src/big/
@wget -q --show-progress $(DOWNLOAD_URL)/downloads/nncase/nncase_k230_v2.8.3.tgz -O - | tar -xzC src/big/
@wget -q --show-progress $(DOWNLOAD_URL)/downloads/kmodel/kmodel_v2.9.0.tgz -O - | tar -xzC src/big/
@wget -q --show-progress $(DOWNLOAD_URL)/downloads/nncase/nncase_k230_rtos_v2.9.0.tgz -O - | tar -xzC src/big/

#big utils
@echo "download big utils"
Expand Down Expand Up @@ -233,12 +238,6 @@ mpp-apps-clean:
make clean -C userapps/sample; \
cd -;

.PHONY: mpp
mpp: mpp-kernel mpp-apps

.PHONY: mpp-clean
mpp-clean: mpp-kernel-clean mpp-apps-clean

.PHONY: mpp-middleware
mpp-middleware:
@export PATH=$(RTT_EXEC_PATH):$(PATH); \
Expand All @@ -255,6 +254,14 @@ mpp-middleware-clean:
make clean -C middleware; \
cd -;

.PHONY: mpp
mpp: mpp-kernel mpp-apps $(MPP_MIDDLEWARE)

.PHONY: mpp-clean
mpp-clean: mpp-kernel-clean mpp-apps-clean $(MPP_MIDDLEWARE_CLEAN)
echo "hello mpp-clen"
echo $(MPP_MIDDLEWARE_CLEAN)

.PHONY: poc
poc:check_src
@export PATH=$(RTT_EXEC_PATH):$(PATH); \
Expand Down Expand Up @@ -497,6 +504,11 @@ uboot: defconfig prepare_memory check_src
cd $(UBOOT_SRC_PATH); \
make $(UBOOT_DEFCONFIG) O=$(UBOOT_BUILD_DIR) || exit $?;make -C $(UBOOT_BUILD_DIR) || exit $?; \
cd -
burntool:
@export PATH=$(LINUX_EXEC_PATH):$(PATH);export CROSS_COMPILE=$(LINUX_CC_PREFIX);export ARCH=riscv; \
cd $(UBOOT_SRC_PATH); \
make $(BURNTOOL_DEFCONFIG) O=$(BURNTOOL_BUILD_DIR) || exit $?;make -C $(BURNTOOL_BUILD_DIR) || exit $?; \
cd -

.PHONY: uboot-rebuild
uboot-rebuild: defconfig prepare_memory check_src
Expand Down
Binary file modified board/common/dev_firmware/ap6212a/fw_bcm43438a1.bin
Binary file not shown.
16 changes: 10 additions & 6 deletions board/common/dev_firmware/ap6212a/nvram.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#AP6212A_NVRAM_V1.0.2_20191121
#K016-CW43-SW_20211022
# 2.4 GHz, 20 MHz BW mode

# The following parameter values are just placeholders, need to be updated.
Expand All @@ -16,7 +16,8 @@ xtalfreq=26000
nocrc=1
ag0=255
aa2g=1
ccode=ALL
ccode=CN
regrev=38

pa0itssit=0x20
extpagain2g=0
Expand All @@ -27,11 +28,11 @@ AvVmid_c0=0x0,0xc8
cckpwroffset0=5

# PPR params
maxp2ga0=80
maxp2ga0=84
txpwrbckof=6
cckbw202gpo=0x6666
legofdmbw202gpo=0xaaaaaaaa
mcsbw202gpo=0xbbbbbbbb
mcsbw202gpo=0xcccccccc

# OFDM IIR :
ofdmdigfilttype=18
Expand All @@ -48,9 +49,12 @@ hostrdy=0x41
usbrdy=0x03
usbrdydelay=100
deadman_to=0xffffffff

ed_thresh2g=-54
eu_edthresh2g=-54

# muxenab: 0x1 for UART enable, 0x10 for Host awake
muxenab=0x10
# CLDO PWM voltage settings - 0x4 - 1.1 volt
#cldo_pwm=0x4
glitch_based_crsmin=1
noccpwrlmt=1
glitch_based_crsmin=1
Binary file not shown.
Binary file added board/common/dev_firmware/rtl8723du/rtl8723du_fw
Binary file not shown.
2 changes: 1 addition & 1 deletion board/common/gen_image_cfg/genimage-sdcard.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -70,4 +70,4 @@ image sysimage-sdcard.img {
# size = 32M
image = "app.vfat"
}
}
}
11 changes: 10 additions & 1 deletion board/common/gen_image_script/gen_image_comm_func.sh
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,11 @@ copye_file_to_images()
cp -rf ${K230_SDK_ROOT}/tools/ota/ota_aes_key_iv ${BUILD_DIR}/images/little-core/rootfs/etc/
cp -rf ${K230_SDK_ROOT}/tools/ota/hwrevision ${BUILD_DIR}/images/little-core/rootfs/etc/

cp -rf ${K230_SDK_ROOT}/board/common/post_copy_rootfs/* ${BUILD_DIR}/images/little-core/rootfs/
if [ -d "${K230_SDK_ROOT}/board/${CONFIG_BOARD_NAME}/post_copy_rootfs" ]; then
cp -rf ${K230_SDK_ROOT}/board/${CONFIG_BOARD_NAME}/post_copy_rootfs/* ${BUILD_DIR}/images/little-core/rootfs/
else
cp -rf ${K230_SDK_ROOT}/board/common/post_copy_rootfs/* ${BUILD_DIR}/images/little-core/rootfs/
fi
fakeroot -- cp -rf ${BUILD_DIR}/images/little-core/ko-apps/* ${BUILD_DIR}/images/little-core/rootfs/
cd ${BUILD_DIR}/images/little-core/rootfs/; \
fakeroot -- ${K230_SDK_ROOT}/tools/mkcpio-rootfs.sh; \
Expand Down Expand Up @@ -141,6 +145,11 @@ add_dev_firmware()
mkdir -p ${BUILD_DIR}/images/little-core/rootfs/lib/firmware/rtlwifi/
cp -f ${K230_SDK_ROOT}/board/common/dev_firmware/rtl8188fu/* ${BUILD_DIR}/images/little-core/rootfs/lib/firmware/rtlwifi/
fi

if [ "${CONFIG_RTL8723DU}" = "y" ] ; then
mkdir -p ${BUILD_DIR}/images/little-core/rootfs/lib/firmware/
cp -rf ${K230_SDK_ROOT}/board/common/dev_firmware/rtl8723du/* ${BUILD_DIR}/images/little-core/rootfs/lib/firmware/
fi
}

#add_firmHead xxx.bin "-n"
Expand Down
3 changes: 3 additions & 0 deletions board/common/post_copy_rootfs/etc/init.d/rcS
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ cat /etc/version/release_version

cd /mnt
insmod k_ipcm.ko

insmod k_virt-tty.ko

mkdir /sharefs -p
if `grep mmcblk0p3 /proc/cmdline >/dev/null` ; then
mount /dev/mmcblk0p4 /sharefs
Expand Down
69 changes: 69 additions & 0 deletions configs/BPI-CanMV-K230D-Zero_defconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
#
# 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_K230_CANMV_V2 is not set
# CONFIG_BOARD_K230D_CANMV is not set
# CONFIG_BOARD_K230_CANMV_01STUDIO is not set
# CONFIG_BOARD_K230_CANMV_DONGSHANPI is not set
CONFIG_BOARD_K230D_CANMV_BPI=y
CONFIG_BOARD_NAME="k230d_canmv_bpi"
CONFIG_QUICK_BOOT=y
# CONFIG_GEN_SECURITY_IMG is not set
CONFIG_UBOOT_DEFCONFIG="k230d_canmv_bpi"
CONFIG_LINUX_DEFCONFIG="k230d_canmv"
CONFIG_LINUX_DTB="k230d_canmv"
CONFIG_BUILDROOT_DEFCONFIG="k230d_canmv"
CONFIG_RTTHREAD_DEFCONFIG="k230d_canmv_bp_only_rtt"
# CONFIG_REMOTE_TEST_PLATFORM is not set
CONFIG_GEN_IMG_SCRIPT="board/common/gen_image_script/gen_image.sh"
CONFIG_RTT_CONSOLE_ID=0

#
# 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=0x0
CONFIG_MEM_IPCM_SIZE=0x0
CONFIG_MEM_RTT_SYS_BASE=0x0000000
CONFIG_MEM_RTT_SYS_SIZE=0x03000000
CONFIG_MEM_MMZ_BASE=0x3000000
CONFIG_MEM_MMZ_SIZE=0x5000000
CONFIG_MEM_BOUNDARY_RESERVED_SIZE=0x8

#
# 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_RTL8188FU is not set
# CONFIG_RTL8723DU is not set
CONFIG_SUPPORT_RTSMART=y
# CONFIG_SUPPORT_LINUX is not set
# CONFIG_MPP_MIDDLEWARE is not set
CONFIG_BUILD_DEBUG_VER=y
# CONFIG_BUILD_RELEASE_VER is not set
CONFIG_DBGLV=8
5 changes: 3 additions & 2 deletions configs/k230_canmv_dpu_depth_camera_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,13 @@
# CONFIG_BOARD_K230_FPGA is not set
# CONFIG_BOARD_K230D is not set
CONFIG_BOARD_K230_CANMV=y

CONFIG_BOARD_NAME="k230_evb"
# CONFIG_QUICK_BOOT is not set
CONFIG_QUICK_BOOT=y
# CONFIG_GEN_SECURITY_IMG is not set
CONFIG_UBOOT_DEFCONFIG="k230_canmv"
CONFIG_LINUX_DEFCONFIG="k230_canmv"
CONFIG_LINUX_DTB="k230_canmv"
CONFIG_LINUX_DTB="k230_canmv_dpu"
# CONFIG_REMOTE_TEST_PLATFORM is not set
CONFIG_GEN_IMG_SCRIPT="board/k230_canmv_dpu_depth_camera/gen_dpu_depth_camera_device_image_sd.sh"
CONFIG_RTT_CONSOLE_ID=3
Expand Down
1 change: 1 addition & 0 deletions configs/k230_canmv_only_rtt_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -58,3 +58,4 @@ CONFIG_SUPPORT_RTSMART=y
CONFIG_BUILD_DEBUG_VER=y
# CONFIG_BUILD_RELEASE_VER is not set
CONFIG_DBGLV=8
CONFIG_MPP_MIDDLEWARE=y
3 changes: 1 addition & 2 deletions configs/k230_evb_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,7 @@ CONFIG_MEM_BOUNDARY_RESERVED_SIZE=0x00001000
#
# storage configurations
#
CONFIG_SPI_NOR=y
CONFIG_SPI_NOR_CFG=""
# CONFIG_SPI_NOR is not set
# CONFIG_SPI_NAND is not set
CONFIG_SPI_NAND_CFG=""
CONFIG_SDCAED=y
Expand Down
3 changes: 1 addition & 2 deletions configs/k230_evb_doorlock_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,7 @@ CONFIG_MEM_BOUNDARY_RESERVED_SIZE=0x00001000
#
# storage configurations
#
CONFIG_SPI_NOR=y
CONFIG_SPI_NOR_CFG=""
# CONFIG_SPI_NOR is not set
# CONFIG_SPI_NAND is not set
CONFIG_SPI_NAND_CFG=""
CONFIG_SDCAED=y
Expand Down
3 changes: 1 addition & 2 deletions configs/k230_evb_doorlock_ov9286_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,7 @@ CONFIG_MEM_BOUNDARY_RESERVED_SIZE=0x00001000
#
# storage configurations
#
CONFIG_SPI_NOR=y
CONFIG_SPI_NOR_CFG=""
# CONFIG_SPI_NOR is not set
# CONFIG_SPI_NAND is not set
CONFIG_SPI_NAND_CFG=""
CONFIG_SDCAED=y
Expand Down
3 changes: 1 addition & 2 deletions configs/k230_evb_dpu_depth_camera_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,7 @@ CONFIG_MEM_BOUNDARY_RESERVED_SIZE=0x00001000
#
# storage configurations
#
CONFIG_SPI_NOR=y
CONFIG_SPI_NOR_CFG=""
# CONFIG_SPI_NOR is not set
# CONFIG_SPI_NAND is not set
CONFIG_SPI_NAND_CFG=""
CONFIG_SDCAED=y
Expand Down
Loading

0 comments on commit 2832106

Please sign in to comment.