Skip to content

Commit

Permalink
k230 sdk release v1.6
Browse files Browse the repository at this point in the history
  • Loading branch information
wuwentao committed Jun 14, 2024
1 parent 862c15c commit 8074e1e
Show file tree
Hide file tree
Showing 816 changed files with 654,708 additions and 43,488 deletions.
25 changes: 16 additions & 9 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,15 @@ download_dir_release:
- .setup_env
- .release_download_dir

# sdk zip and image publish with tag
# k230_sdk.tar.gz github zip publish with tag
sdk_github_zip:
rules:
- if: $CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_TAG =~ /^v\d+\.\d+.*$/
extends:
- .setup_env
- .sync_sdk_github_zip

# image publish with tag
release_image_publish:
rules:
- if: $CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_TAG =~ /^v\d+\.\d+.*$/
Expand Down Expand Up @@ -148,9 +156,9 @@ build-image:
script:
- cd $CI_PROJECT_DIR
- ls -alht
- wget -qc https://ai.b-bug.org/k230/test_resources/ci/release/release_download_dir.sh -O ./release_download_dir.sh
- wget -qc https://ai.b-bug.org/k230/test_resources/ci/release/release_download_dir.sh -O ./release_download_dir.sh || exit 1
- chmod +x ./release_download_dir.sh
- time ./release_download_dir.sh || time ./release_download_dir.sh
- time ./release_download_dir.sh || time ./release_download_dir.sh || exit 1
- echo "all file synced"

.sync_release_image:
Expand All @@ -161,26 +169,25 @@ 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
- 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
- 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
- time ./release_k230_sdk_image.sh $CI_COMMIT_TAG $CONF || time ./release_k230_sdk_image.sh $CI_COMMIT_TAG $CONF || exit 1
- echo "all release file synced"

.sync_github_zip:
.sync_sdk_github_zip:
timeout: 60m
retry: 2
tags:
- k230_sdk
script:
- cd $CI_PROJECT_DIR
- ls -alht
- wget -qc https://ai.b-bug.org/k230/test_resources/ci/release/release_k230_sdk_github_zip.sh -O ./release_k230_sdk_github_zip.sh
- wget -qc https://ai.b-bug.org/k230/test_resources/ci/release/release_k230_sdk_github_zip.sh -O ./release_k230_sdk_github_zip.sh || exit 1
- chmod +x ./release_k230_sdk_github_zip.sh
- echo $CI_COMMIT_TAG || exit 1
- echo $CONF || exit 1
- time ./release_k230_sdk_github_zip.sh $CI_COMMIT_TAG || time ./release_k230_sdk_github_zip.sh $CI_COMMIT_TAG
- time ./release_k230_sdk_github_zip.sh $CI_COMMIT_TAG || time ./release_k230_sdk_github_zip.sh $CI_COMMIT_TAG || exit 1
- echo "all release file synced"

.generate_version: &generate_version
Expand Down
5 changes: 5 additions & 0 deletions Kconfig.board
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,11 @@ config BOARD_K230_CANMV_01STUDIO
bool "K230 CANMV(01STUDIO)"
help
"CANMV(01STUDIO)";

config BOARD_K230_CANMV_DONGSHANPI
bool "K230 CANMV(DONGSHANPI)"
help
"CANMV(DONGSHANPI)";
endchoice

config BOARD_NAME
Expand Down
3 changes: 3 additions & 0 deletions Kconfig.wifi
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ config AP6256
bool "enable ap6256"
default n

config RTL8188FU
bool "enable rtl8188fu"
default n
endmenu


6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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.8.1.tgz -O - | tar -xzC src/big/
@wget -q --show-progress $(DOWNLOAD_URL)/downloads/nncase/nncase_k230_v2.8.1.tgz -O - | tar -xzC src/big/
@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/

#big utils
@echo "download big utils"
Expand Down Expand Up @@ -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_CANMV}" != "y" ] &&[ "$${CONFIG_BOARD_K230D}" != "y" ] && cp userapps/sample/fastboot_elf/* $(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/; \
cp $(RTSMART_SRC_DIR)/init.sh $(RTSMART_SRC_DIR)/userapps/root/bin/; \
cd -;

Expand Down
Binary file not shown.
5 changes: 5 additions & 0 deletions board/common/gen_image_script/gen_image_comm_func.sh
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,11 @@ add_dev_firmware()
if [ "${CONFIG_AP6256}" = "y" ] ; then
cp -f ${K230_SDK_ROOT}/board/common/dev_firmware/ap6256/* ${BUILD_DIR}/images/little-core/rootfs/${dev_firmware}/
fi

if [ "${CONFIG_RTL8188FU}" = "y" ] ; then
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
}

#add_firmHead xxx.bin "-n"
Expand Down
4 changes: 2 additions & 2 deletions configs/k230_canmv_01studio_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,13 @@ CONFIG_TOOLCHAIN_PATH_LINUX="/opt/toolchain/Xuantie-900-gcc-linux-5.10.4-glibc-x
#
# Memory configuration
#
CONFIG_MEM_TOTAL_SIZE=0x20000000
CONFIG_MEM_TOTAL_SIZE=0x40000000
CONFIG_MEM_IPCM_BASE=0x00100000
CONFIG_MEM_IPCM_SIZE=0x00100000
CONFIG_MEM_RTT_SYS_BASE=0x00200000
CONFIG_MEM_RTT_SYS_SIZE=0x07E00000
CONFIG_MEM_MMZ_BASE=0x10000000
CONFIG_MEM_MMZ_SIZE=0x0FC00000
CONFIG_MEM_MMZ_SIZE=0x2FC00000
CONFIG_MEM_LINUX_SYS_BASE=0x08000000
CONFIG_MEM_LINUX_SYS_SIZE=0x08000000
CONFIG_MEM_BOUNDARY_RESERVED_SIZE=0x00001000
Expand Down
41 changes: 24 additions & 17 deletions configs/temp_config2 → configs/k230_canmv_dongshanpi_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,23 @@
#
# board configuration
#
CONFIG_BOARD_K230_EVB=y
# 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=y
CONFIG_BOARD_NAME="k230_evb"
# CONFIG_QUICK_BOOT is not set
CONFIG_GEN_SECURITY_IMG=y
CONFIG_UBOOT_DEFCONFIG="k230_evb"
CONFIG_LINUX_DEFCONFIG="k230_evb"
CONFIG_LINUX_DTB="k230_evb"
# CONFIG_GEN_SECURITY_IMG is not set
CONFIG_UBOOT_DEFCONFIG="k230_canmv_dongshanpi"
CONFIG_LINUX_DEFCONFIG="k230_canmv_dongshanpi"
CONFIG_LINUX_DTB="k230_canmv_dongshanpi"
# CONFIG_REMOTE_TEST_PLATFORM is not set
CONFIG_GEN_IMG_SCRIPT="board/common/gen_image_script/gen_image.sh"
CONFIG_RTT_CONSOLE_ID=3

#
# toolchain configurations
Expand All @@ -31,29 +36,31 @@ CONFIG_TOOLCHAIN_PATH_LINUX="/opt/toolchain/Xuantie-900-gcc-linux-5.10.4-glibc-x
# 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_LINUX_SYS_BASE=0x08000000
CONFIG_MEM_LINUX_SYS_SIZE=0x08000000
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
CONFIG_EMMC=y
CONFIG_SPI_EMMC_CFG=""

#
# wifi configurations
#
# CONFIG_AP6212A is not set
# CONFIG_AP6256 is not set
CONFIG_RTL8188FU=y
CONFIG_SUPPORT_RTSMART=y
CONFIG_SUPPORT_LINUX=y
CONFIG_SUPPORT_RTSMART=y
CONFIG_LINUX_RUN_CORE_ID=0
# CONFIG_BUILD_DEBUG_VER is not set
CONFIG_BUILD_RELEASE_VER=y
4 changes: 2 additions & 2 deletions configs/k230_canmv_only_rtt_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
# 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_evb"
Expand All @@ -35,7 +35,7 @@ CONFIG_TOOLCHAIN_PATH_LINUX="/opt/toolchain/Xuantie-900-gcc-linux-5.10.4-glibc-x
CONFIG_MEM_TOTAL_SIZE=0x20000000
CONFIG_MEM_IPCM_BASE=0x0
CONFIG_MEM_IPCM_SIZE=0x0
CONFIG_MEM_RTT_SYS_BASE=0x0
CONFIG_MEM_RTT_SYS_BASE=0x00000000
CONFIG_MEM_RTT_SYS_SIZE=0x10000000
CONFIG_MEM_MMZ_BASE=0x10000000
CONFIG_MEM_MMZ_SIZE=0x10000000
Expand Down
2 changes: 1 addition & 1 deletion configs/k230_canmv_v2_only_rtt_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ CONFIG_TOOLCHAIN_PATH_LINUX="/opt/toolchain/Xuantie-900-gcc-linux-5.10.4-glibc-x
CONFIG_MEM_TOTAL_SIZE=0x20000000
CONFIG_MEM_IPCM_BASE=0x0
CONFIG_MEM_IPCM_SIZE=0x0
CONFIG_MEM_RTT_SYS_BASE=0x0
CONFIG_MEM_RTT_SYS_BASE=0x00000000
CONFIG_MEM_RTT_SYS_SIZE=0x10000000
CONFIG_MEM_MMZ_BASE=0x10000000
CONFIG_MEM_MMZ_SIZE=0x10000000
Expand Down
6 changes: 3 additions & 3 deletions configs/k230d_canmv_only_rtt_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# CONFIG_BOARD_K230_CANMV is not set
CONFIG_BOARD_K230D_CANMV=y
CONFIG_BOARD_NAME="k230d_canmv"
# CONFIG_QUICK_BOOT is not set
CONFIG_QUICK_BOOT=y
# CONFIG_GEN_SECURITY_IMG is not set
CONFIG_UBOOT_DEFCONFIG="k230d_canmv"
CONFIG_LINUX_DEFCONFIG="k230d_canmv"
Expand All @@ -35,8 +35,8 @@ CONFIG_TOOLCHAIN_PATH_LINUX="/opt/toolchain/Xuantie-900-gcc-linux-5.10.4-glibc-x
CONFIG_MEM_TOTAL_SIZE=0x8000000
CONFIG_MEM_IPCM_BASE=0x0
CONFIG_MEM_IPCM_SIZE=0x0
CONFIG_MEM_RTT_SYS_BASE=0x0
CONFIG_MEM_RTT_SYS_SIZE=0x3000000
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
Expand Down
12 changes: 6 additions & 6 deletions repo.mak
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
RT-SMART_VERSION = "66ebe23e44fbbdf1681b18dfb187af1353d10adb"
MPP_VERSION = "cad767e0d43e2979bb460f7e9a63a02e75ce4b79"
RT-SMART_VERSION = "76c06358b3f90c4e4f873e7c891991c69a086a0b"
MPP_VERSION = "8d8ef53825b35799914006b54a941a0dd53389ea"
UNITTEST_VERSION = "a07caf5e19a6a215605271cfeedce18111790e9d"
OPENSBI_VERSION = "1f89326f7dc48d701dbed79f828b80fa28e5b34c"
BUILDROOT-EXT_VERSION = "1c97b30a3366f836f83eba20b8db76713055bfd3"
LINUX_VERSION = "e3fb062a4f21db9012b4ac05208d1c7fd15a547f"
CDK_VERSION = "786d3c8ca5bdbcd1ad5a623635f0139e94ff1089"
UBOOT_VERSION = "847dc0b16a8229a55b5c04449f16a48464ef0a5b"
BUILDROOT-EXT_VERSION = "dbfccc3652d0dd60b77d5f9f2d89b7ff4a919536"
LINUX_VERSION = "ed653c78ed111605198726c57060cafdf3105923"
CDK_VERSION = "4977a0619fd9512dc3403173d488ee4eaee967b6"
UBOOT_VERSION = "82cb727a100dd2f85cfed3d5329db53696f0b256"

RT-SMART_SRC_PATH = src/big/rt-smart
MPP_SRC_PATH = src/big/mpp
Expand Down
27 changes: 27 additions & 0 deletions src/big/mpp/include/comm/k_board_config_comm.h
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,33 @@ extern "C" {
#define LT9611_SLAVE_ADDR 0x3b
#define LT9611_I2C_BUS "i2c3"//"i2c4"

#elif defined(CONFIG_BOARD_K230_CANMV_DONGSHANPI)
// usip evb gpio config
// display gpio
#define DISPLAY_LCD_RST_GPIO 22
#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 "i2c0"
#define OV5647_CAM_PIN 61

#define OV5647_CSI1_IIC "i2c1"
#define OV5647_CSI2_IIC "i2c4"

#define OV5647_CAM_PIN_CSI2 (21)
#define OV5647_CAM_PIN_CSI1 (60)

#define OV9732_RST_PIN (28)

#define LT9611_RESET_GPIO 24 //42
#define LT9611_SLAVE_ADDR 0x3b
#define LT9611_I2C_BUS "i2c3"//"i2c4"

#else

#define DISPLAY_LCD_RST_GPIO 9
Expand Down
1 change: 1 addition & 0 deletions src/big/mpp/include/comm/k_connector_comm.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ typedef enum {
LT9611_MIPI_4LAN_1920X1080_30FPS = 1,
ST7701_V1_MIPI_2LAN_480X800_30FPS = 2,
ST7701_V1_MIPI_2LAN_480X854_30FPS = 3,
ILI9806_MIPI_2LAN_480X800_30FPS = 4,
LT9611_MIPI_ADAPT_RESOLUTION = 100,
LT9611_MIPI_4LAN_1920X1080_60FPS,
LT9611_MIPI_4LAN_1920X1080_50FPS,
Expand Down
1 change: 0 additions & 1 deletion src/big/mpp/include/comm/k_dewarp_comm.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@
#include "k_vb_comm.h"
#include "k_video_comm.h"
#include <k_type.h>
#include <k_ioctl.h>
#include <k_vicap_comm.h>

#ifdef __cplusplus
Expand Down
1 change: 1 addition & 0 deletions src/big/mpp/include/comm/k_isp_comm.h
Original file line number Diff line number Diff line change
Expand Up @@ -489,6 +489,7 @@ typedef struct {
k_u32 buffer_size;
k_u64 *vb_phys_addr;
void **vb_virt_addr;
// k_vicap_mirror mirror;
} k_isp_dev_attr;

typedef struct {
Expand Down
5 changes: 5 additions & 0 deletions src/big/mpp/include/comm/k_sensor_comm.h
Original file line number Diff line number Diff line change
Expand Up @@ -577,6 +577,11 @@ typedef struct {
float exp_time[4];
} k_sensor_exposure_param;

typedef struct {
k_u8 otp_type;
k_u8 otp_date[20];
} k_sensor_otp_date;

#ifdef __cplusplus
}
#endif /* __cplusplus */
Expand Down
21 changes: 21 additions & 0 deletions src/big/mpp/include/comm/k_vicap_comm.h
Original file line number Diff line number Diff line change
Expand Up @@ -405,6 +405,23 @@ typedef struct {
k_u8 fps; // 0: original FPS
} k_vicap_chn_attr;


typedef enum {
VICAP_MIRROR_NONE = 0,
VICAP_MIRROR_HOR = 1,
VICAP_MIRROR_VER = 2,
VICAP_MIRROR_BOTH = 3,
} k_vicap_mirror;


typedef struct {
k_vicap_sensor_type sensor_type;
k_vicap_mirror mirror;
}k_vicap_mirror_mode;




/**
* @brief Defines the attributes of a VICAP device
*
Expand All @@ -421,6 +438,7 @@ typedef struct {
k_bool dev_enable;
k_u32 buffer_num;
k_u32 buffer_size;
k_vicap_mirror mirror;
} k_vicap_dev_attr;

/**
Expand Down Expand Up @@ -616,6 +634,9 @@ typedef struct
#define K_ERR_VICAP_NOTREADY K_DEF_ERR(K_ID_VICAP, K_ERR_LEVEL_ERROR, K_ERR_NOTREADY)
#define K_ERR_VICAP_BADADDR K_DEF_ERR(K_ID_VICAP, K_ERR_LEVEL_ERROR, K_ERR_BADADDR)
#define K_ERR_VICAP_BUSY K_DEF_ERR(K_ID_VICAP, K_ERR_LEVEL_ERROR, K_ERR_BUSY)
#define K_ERR_VICAP_OPT_ALREADY_WRITE K_DEF_ERR(K_ID_VICAP, K_ERR_LEVEL_ERROR, K_ERR_OPT_ALREADY_WRITE)



/** @} */ /** <!-- ==== VICAP End ==== */
#ifdef __cplusplus
Expand Down
3 changes: 3 additions & 0 deletions src/big/mpp/include/comm/k_video_comm.h
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,9 @@ typedef enum
PIXEL_FORMAT_U64C1,
PIXEL_FORMAT_S64C1,

PIXEL_FORMAT_RGB_565_LE = 300,
PIXEL_FORMAT_BGR_565_LE,

PIXEL_FORMAT_BUTT
} k_pixel_format;

Expand Down
Loading

0 comments on commit 8074e1e

Please sign in to comment.