Skip to content

Commit

Permalink
k230 sdk release v1.8
Browse files Browse the repository at this point in the history
  • Loading branch information
wuwentao committed Nov 7, 2024
1 parent 2832106 commit 13b76e4
Show file tree
Hide file tree
Showing 180 changed files with 12,917 additions and 1,537 deletions.
51 changes: 28 additions & 23 deletions Kconfig.board
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

menu "board configuration"

choice
choice

prompt "reference board"
help
Expand All @@ -16,94 +16,95 @@ config BOARD_K230_FPGA

config BOARD_K230D
bool "K230 sip"
help
help
"siplp4 128MB ddr";

config BOARD_K230_CANMV
bool "K230 CANMV(K230PI)"
help
help
"CANMV(K230PI)";

config BOARD_K230_CANMV_V2
bool "K230 CANMV(K230PI) V2"
help
help
"CANMV(K230PI) V2";

config BOARD_K230D_CANMV
bool "K230D CANMV(K230PI zero)"
help
help
"CANMV(K230D PI zero)";

config BOARD_K230_CANMV_01STUDIO
bool "K230 CANMV(01STUDIO)"
help
help
"CANMV(01STUDIO)";

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

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


config BOARD_NAME
string "define K230 reference board name"
#depends on BOARD_K230_EVB=y || BOARD_K230_FPGA=y
default "k230_evb"

config QUICK_BOOT
bool "quick boot"
help
help
quick boot, not enter uboot cmd;
default y

config GEN_SECURITY_IMG
bool "create security image "
help
help
create security image ;
default n

config UBOOT_DEFCONFIG
string "uboot defconfig "
help
help
uboot defconfig ;
default BOARD_NAME

config LINUX_DEFCONFIG
string "linux defconfig "
help
help
linux defconfig ;
default BOARD_NAME

config LINUX_DTB
string "linux dtb name"
help
help
linux dtb name ;
default BOARD_NAME

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

config RTTHREAD_DEFCONFIG
string "rtthread defconfig "
help
help
rtthread defconfig ;

config REMOTE_TEST_PLATFORM
bool "config REMOTE_TEST_PLATFORM"
help
help
xxxe ;
default n
config GEN_IMG_SCRIPT
string "generate image scripte"
help
help
generate image scripte;
default "board/common/gen_image_script/gen_image.sh"
config RTT_CONSOLE_ID
Expand All @@ -114,9 +115,13 @@ config RTT_CONSOLE_ID
config SPI_NOR_SUPPORT_CFG_PARAM
bool "spi nor support cfg param"
depends on SPI_NOR
help
help
spi nor support cfg param ;
default y
endmenu


config CANAAN_SITE_IMG_NAME_PREFIX
string "canaan site image name prefix"
default ""
help
canaan site image name prefix;
endmenu
31 changes: 26 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -89,17 +89,20 @@ ifeq ($(NATIVE_BUILD),1)
download_toolchain:
@set -e; \
if [ ! -f toolchain/.toolchain_ready ];then \
echo "download toolchain"; \
wget -q --show-progress -P $(K230_SDK_ROOT)/toolchain $(RTT_TOOLCHAIN_URL); \
wget -q --show-progress -P $(K230_SDK_ROOT)/toolchain $(LINUX_TOOLCHAIN_URL); \
echo "download toolchain"; mkdir -p $(K230_SDK_ROOT)/toolchain ;\
wget -q --show-progress -O $(K230_SDK_ROOT)/toolchain/$(notdir $(RTT_TOOLCHAIN_URL)) $(RTT_TOOLCHAIN_URL); \
wget -q --show-progress -O $(K230_SDK_ROOT)/toolchain/$(notdir $(LINUX_TOOLCHAIN_URL)) $(LINUX_TOOLCHAIN_URL); \
fi;

.PHONY: extract_toolchain
extract_toolchain: download_toolchain
@echo "test1"
@set -e; \
if [ ! -f toolchain/.toolchain_ready ];then \
echo "extract toolchain"; \
md5=$(shell md5sum $(K230_SDK_ROOT)/toolchain/$(notdir $(RTT_TOOLCHAIN_URL)) 2>/dev/null | awk '{print $$1}' );\
[ "e6c0ce95844595eb0153db8dfaa74bcb" = "$${md5}" ] || exit 4; \
md5=$(shell md5sum $(K230_SDK_ROOT)/toolchain/$(notdir $(LINUX_TOOLCHAIN_URL)) 2>/dev/null | awk '{print $$1}' );\
[ "66a6571167767ffe9e9e1d5d5929f6a4" = "$${md5}" ] || exit 3;\
for file in $(shell find ./toolchain -name "*.bz2"); do echo $$file;tar jxf $$file -C $(K230_SDK_ROOT)/toolchain; done; \
fi;

Expand Down Expand Up @@ -155,7 +158,13 @@ prepare_sourcecode:prepare_toolchain
check_toolchain:
@if [ ! -f $(CONFIG_TOOLCHAIN_PATH_LINUX)/$(CONFIG_TOOLCHAIN_PREFIX_LINUX)gcc ] || \
[ ! -f $(CONFIG_TOOLCHAIN_PATH_RTT)/$(CONFIG_TOOLCHAIN_PREFIX_RTT)gcc ]; then \
echo "please run command: make prepare_toolchain"; exit 1; \
if [ ! -f toolchain/.toolchain_ready ];then \
echo "please run command: make prepare_toolchain"; exit 1; \
else \
echo "you need enter docker build;";\
echo "or ln -s $(shell realpath toolchain) /opt/toolchain," ;\
echo "because sdk build need /opt/toolchain" ; exit 1; \
fi; \
fi;


Expand Down Expand Up @@ -587,8 +596,20 @@ help:
@echo "make buildroot-savedefconfig -- Save k230 buildroot configuration to src/little/buildroot-ext/configs/k230_evb_defconfig";
@echo "make buildroot-clean -- Clean the k230 buildroot build directory, after clean, run make buildroot-rebuild will fail because the build cirectory is not exist. Run make buildroot to build";
@echo "make build-image -- Build k230 rootfs image";
@echo "make show_current_config -- show current key config ";

build_all:
(set -e;for conf in $$(ls configs | grep -v k230_fpga_defconfig); do \
echo "make CONF=$${conf} begin $$(date)">>tlog.log ; make CONF=$${conf} ; \
echo "make CONF=$${conf} end $$(date)">>tlog.log ;done ;)

.PHONY: show_current_config
show_current_config:defconfig
@echo -e "\nCONF=$(CONF)"
@echo -e "out_image=$(BUILD_DIR)/images \n"
@echo -e "uboot_config=$(UBOOT_SRC_PATH)/configs/$(UBOOT_DEFCONFIG)"
@echo -e "uboog_dts=$(UBOOT_SRC_PATH)/arch/riscv/dts/$(shell cat $(UBOOT_SRC_PATH)/configs/$(UBOOT_DEFCONFIG) | grep CONFIG_DEFAULT_DEVICE_TREE | cut -d = -f2 | tr -d \" ).dts \n"
@echo -e "linux_config=$(LINUX_SRC_PATH)/arch/riscv/configs/$(LINUX_KERNEL_DEFCONFIG)"
@echo -e "linux_dts=$(LINUX_SRC_PATH)arch/riscv/boot/dts/kendryte/$(CONFIG_LINUX_DTB).dts \n"
@echo -e "buildroot_config=$(BUILDROOT-EXT_SRC_PATH)/configs/$(BUILDROOT_DEFCONFIG)"
@echo -e "rtt_config=$(RT-SMART_SRC_PATH)/kernel/bsp/maix3/configs/$(CONFIG_RTTHREAD_DEFCONFIG).config \n"
12 changes: 7 additions & 5 deletions board/common/gen_image_cfg/genimage-sdcard.cfg
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
image app.vfat {
vfat {
extraargs = " -F 32 "
label = "K230_APP"
files = {
"big-core/app",
}
}
}
# empty =true
size = 256M
Expand All @@ -12,7 +14,7 @@ image sysimage-sdcard.img {
hdimage {
gpt = "true"
}

partition uboot_spl_1 {
#512k@1M 0x400@0x800
in-partition-table = false
Expand Down Expand Up @@ -59,14 +61,14 @@ image sysimage-sdcard.img {
}

partition rootfs {
offset = 128M
partition-type = 0x83
offset = 128M
partition-type-uuid = "L"
image = "little-core/rootfs.ext4"
}

partition fat32appfs {
#offset = 168M
partition-type = 0xc
partition-type-uuid = "F"
# size = 32M
image = "app.vfat"
}
Expand Down
Loading

0 comments on commit 13b76e4

Please sign in to comment.