Skip to content

Commit efe7fa9

Browse files
committed
k230 sdk release v1.8
1 parent 2832106 commit efe7fa9

File tree

180 files changed

+12918
-1538
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

180 files changed

+12918
-1538
lines changed

Kconfig.board

Lines changed: 28 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
menu "board configuration"
44

5-
choice
5+
choice
66

77
prompt "reference board"
88
help
@@ -16,94 +16,95 @@ config BOARD_K230_FPGA
1616

1717
config BOARD_K230D
1818
bool "K230 sip"
19-
help
19+
help
2020
"siplp4 128MB ddr";
2121

2222
config BOARD_K230_CANMV
2323
bool "K230 CANMV(K230PI)"
24-
help
24+
help
2525
"CANMV(K230PI)";
2626

2727
config BOARD_K230_CANMV_V2
2828
bool "K230 CANMV(K230PI) V2"
29-
help
29+
help
3030
"CANMV(K230PI) V2";
3131

3232
config BOARD_K230D_CANMV
3333
bool "K230D CANMV(K230PI zero)"
34-
help
34+
help
3535
"CANMV(K230D PI zero)";
36-
36+
3737
config BOARD_K230_CANMV_01STUDIO
3838
bool "K230 CANMV(01STUDIO)"
39-
help
39+
help
4040
"CANMV(01STUDIO)";
4141

4242
config BOARD_K230_CANMV_DONGSHANPI
4343
bool "K230 CANMV(DONGSHANPI)"
44-
help
44+
help
4545
"CANMV(DONGSHANPI)";
46-
46+
4747
config BOARD_K230D_CANMV_BPI
4848
bool "K230 CANMV(BPI)"
49-
help
50-
"CANMV(k230d bpi)";
49+
help
50+
"CANMV(k230d bpi)";
5151
endchoice
5252

53+
5354
config BOARD_NAME
5455
string "define K230 reference board name"
5556
#depends on BOARD_K230_EVB=y || BOARD_K230_FPGA=y
5657
default "k230_evb"
5758

5859
config QUICK_BOOT
5960
bool "quick boot"
60-
help
61+
help
6162
quick boot, not enter uboot cmd;
6263
default y
6364

6465
config GEN_SECURITY_IMG
6566
bool "create security image "
66-
help
67+
help
6768
create security image ;
6869
default n
6970

7071
config UBOOT_DEFCONFIG
7172
string "uboot defconfig "
72-
help
73+
help
7374
uboot defconfig ;
7475
default BOARD_NAME
7576

7677
config LINUX_DEFCONFIG
7778
string "linux defconfig "
78-
help
79+
help
7980
linux defconfig ;
8081
default BOARD_NAME
8182

8283
config LINUX_DTB
8384
string "linux dtb name"
84-
help
85+
help
8586
linux dtb name ;
8687
default BOARD_NAME
8788

8889
config BUILDROOT_DEFCONFIG
8990
string "buildroot defconfig "
90-
help
91+
help
9192
buildroot defconfig ;
9293
default BOARD_NAME
9394

9495
config RTTHREAD_DEFCONFIG
9596
string "rtthread defconfig "
96-
help
97+
help
9798
rtthread defconfig ;
9899

99100
config REMOTE_TEST_PLATFORM
100101
bool "config REMOTE_TEST_PLATFORM"
101-
help
102+
help
102103
xxxe ;
103104
default n
104105
config GEN_IMG_SCRIPT
105106
string "generate image scripte"
106-
help
107+
help
107108
generate image scripte;
108109
default "board/common/gen_image_script/gen_image.sh"
109110
config RTT_CONSOLE_ID
@@ -114,9 +115,13 @@ config RTT_CONSOLE_ID
114115
config SPI_NOR_SUPPORT_CFG_PARAM
115116
bool "spi nor support cfg param"
116117
depends on SPI_NOR
117-
help
118+
help
118119
spi nor support cfg param ;
119120
default y
120-
endmenu
121-
122121

122+
config CANAAN_SITE_IMG_NAME_PREFIX
123+
string "canaan site image name prefix"
124+
default ""
125+
help
126+
canaan site image name prefix;
127+
endmenu

Makefile

Lines changed: 26 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -89,17 +89,20 @@ ifeq ($(NATIVE_BUILD),1)
8989
download_toolchain:
9090
@set -e; \
9191
if [ ! -f toolchain/.toolchain_ready ];then \
92-
echo "download toolchain"; \
93-
wget -q --show-progress -P $(K230_SDK_ROOT)/toolchain $(RTT_TOOLCHAIN_URL); \
94-
wget -q --show-progress -P $(K230_SDK_ROOT)/toolchain $(LINUX_TOOLCHAIN_URL); \
92+
echo "download toolchain"; mkdir -p $(K230_SDK_ROOT)/toolchain ;\
93+
wget -q --show-progress -O $(K230_SDK_ROOT)/toolchain/$(notdir $(RTT_TOOLCHAIN_URL)) $(RTT_TOOLCHAIN_URL); \
94+
wget -q --show-progress -O $(K230_SDK_ROOT)/toolchain/$(notdir $(LINUX_TOOLCHAIN_URL)) $(LINUX_TOOLCHAIN_URL); \
9595
fi;
9696

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

@@ -155,7 +158,13 @@ prepare_sourcecode:prepare_toolchain
155158
check_toolchain:
156159
@if [ ! -f $(CONFIG_TOOLCHAIN_PATH_LINUX)/$(CONFIG_TOOLCHAIN_PREFIX_LINUX)gcc ] || \
157160
[ ! -f $(CONFIG_TOOLCHAIN_PATH_RTT)/$(CONFIG_TOOLCHAIN_PREFIX_RTT)gcc ]; then \
158-
echo "please run command: make prepare_toolchain"; exit 1; \
161+
if [ ! -f toolchain/.toolchain_ready ];then \
162+
echo "please run command: make prepare_toolchain"; exit 1; \
163+
else \
164+
echo "you need enter docker build;";\
165+
echo "or ln -s $(shell realpath toolchain) /opt/toolchain," ;\
166+
echo "because sdk build need /opt/toolchain" ; exit 1; \
167+
fi; \
159168
fi;
160169

161170

@@ -587,8 +596,20 @@ help:
587596
@echo "make buildroot-savedefconfig -- Save k230 buildroot configuration to src/little/buildroot-ext/configs/k230_evb_defconfig";
588597
@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";
589598
@echo "make build-image -- Build k230 rootfs image";
599+
@echo "make show_current_config -- show current key config ";
590600

591601
build_all:
592602
(set -e;for conf in $$(ls configs | grep -v k230_fpga_defconfig); do \
593603
echo "make CONF=$${conf} begin $$(date)">>tlog.log ; make CONF=$${conf} ; \
594604
echo "make CONF=$${conf} end $$(date)">>tlog.log ;done ;)
605+
606+
.PHONY: show_current_config
607+
show_current_config:defconfig
608+
@echo -e "\nCONF=$(CONF)"
609+
@echo -e "out_image=$(BUILD_DIR)/images \n"
610+
@echo -e "uboot_config=$(UBOOT_SRC_PATH)/configs/$(UBOOT_DEFCONFIG)"
611+
@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"
612+
@echo -e "linux_config=$(LINUX_SRC_PATH)/arch/riscv/configs/$(LINUX_KERNEL_DEFCONFIG)"
613+
@echo -e "linux_dts=$(LINUX_SRC_PATH)arch/riscv/boot/dts/kendryte/$(CONFIG_LINUX_DTB).dts \n"
614+
@echo -e "buildroot_config=$(BUILDROOT-EXT_SRC_PATH)/configs/$(BUILDROOT_DEFCONFIG)"
615+
@echo -e "rtt_config=$(RT-SMART_SRC_PATH)/kernel/bsp/maix3/configs/$(CONFIG_RTTHREAD_DEFCONFIG).config \n"

board/common/gen_image_cfg/genimage-sdcard.cfg

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
image app.vfat {
22
vfat {
3+
extraargs = " -F 32 "
4+
label = "K230_APP"
35
files = {
46
"big-core/app",
5-
}
7+
}
68
}
79
# empty =true
810
size = 256M
@@ -12,7 +14,7 @@ image sysimage-sdcard.img {
1214
hdimage {
1315
gpt = "true"
1416
}
15-
17+
1618
partition uboot_spl_1 {
1719
#512k@1M 0x400@0x800
1820
in-partition-table = false
@@ -59,14 +61,14 @@ image sysimage-sdcard.img {
5961
}
6062

6163
partition rootfs {
62-
offset = 128M
63-
partition-type = 0x83
64+
offset = 128M
65+
partition-type-uuid = "L"
6466
image = "little-core/rootfs.ext4"
6567
}
6668

6769
partition fat32appfs {
6870
#offset = 168M
69-
partition-type = 0xc
71+
partition-type-uuid = "F"
7072
# size = 32M
7173
image = "app.vfat"
7274
}

0 commit comments

Comments
 (0)