Skip to content

Commit 2ec0dd4

Browse files
committed
k230 sdk release v1.3
1 parent 3ade2d0 commit 2ec0dd4

File tree

2,912 files changed

+2661346
-4297
lines changed

Some content is hidden

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

2,912 files changed

+2661346
-4297
lines changed

Kconfig.board

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -45,20 +45,20 @@ config GEN_SECURITY_IMG
4545
config UBOOT_DEFCONFIG
4646
string "uboot defconfig "
4747
help
48-
uboot defconfig ;
49-
default "k230_evb"
48+
uboot defconfig ;
49+
default BOARD_NAME
5050

5151
config LINUX_DEFCONFIG
5252
string "linux defconfig "
5353
help
54-
linux defconfig ;
55-
default "k230_evb"
54+
linux defconfig ;
55+
default BOARD_NAME
5656

5757
config LINUX_DTB
5858
string "linux dtb name"
5959
help
60-
linux dtb name ;
61-
default "k230_evb"
60+
linux dtb name ;
61+
default BOARD_NAME
6262

6363
config REMOTE_TEST_PLATFORM
6464
bool "config REMOTE_TEST_PLATFORM"

Makefile

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -112,8 +112,8 @@ prepare_sourcecode:prepare_toolchain
112112
#ai
113113
@echo "download nncase sdk"
114114
@rm -rf src/big/utils/; rm -rf src/big/ai;
115-
@wget -q --show-progress $(DOWNLOAD_URL)/downloads/kmodel/kmodel_v2.5.1.tgz -O - | tar -xzC src/big/
116-
@wget -q --show-progress $(DOWNLOAD_URL)/downloads/nncase/nncase_k230_v2.5.1.tgz -O - | tar -xzC src/big/
115+
@wget -q --show-progress $(DOWNLOAD_URL)/downloads/kmodel/kmodel_v2.7.0.tgz -O - | tar -xzC src/big/
116+
@wget -q --show-progress $(DOWNLOAD_URL)/downloads/nncase/nncase_k230_v2.7.0.tgz -O - | tar -xzC src/big/
117117

118118
#big utils
119119
@echo "download big utils"
@@ -131,7 +131,7 @@ prepare_sourcecode:prepare_toolchain
131131
@wget -q --show-progress $(DOWNLOAD_URL)/downloads/tunning_server/tuning-server-package_v0.1.1.tar.bz2 -O ${BUILDROOT_EXT_SRC_PATH}/package/tuning-server/tuning-server-package_v0.1.1.tar.bz2
132132
@tar -jxf ${BUILDROOT_EXT_SRC_PATH}/package/tuning-server/tuning-server-package_v0.1.1.tar.bz2 -C ${POST_COPY_ROOTFS_PATH}/
133133
@mkdir -p tools/tuning-tool-client/
134-
@wget -q --show-progress $(DOWNLOAD_URL)/downloads/tunning_tools/tunning_client/Kendyte_ISP_Tool_TuningClient_RC22.5_Pre_596062-20221116.7z -P tools/tuning-tool-client/
134+
@wget -q --show-progress $(DOWNLOAD_URL)/downloads/tunning_tools/tunning_client/Kendyte_ISP_Tool_TuningClient-6.2.23.5-Win32-x86_64-10-26-2023-09.28.16.7z -P tools/tuning-tool-client/
135135

136136
#buildroot
137137
@echo "download buildroot dl"
@@ -142,8 +142,8 @@ prepare_sourcecode:prepare_toolchain
142142
#dictionary_pen
143143
@if [ "k230_evb_usiplpddr4_dictionary_pen_defconfig" == "$${CONF}" ] ; then \
144144
echo "download dictionary_pen" ; \
145-
wget -q --show-progress $(DOWNLOAD_URL)/downloads/dictionary_pen/cidianbi_kmodel_v2.5.1.tar.gz -O - | tar -xzC src/reference/business_poc/dictionary_pen_poc/ ; \
146-
cp src/reference/business_poc/dictionary_pen_poc/cidianbi_kmodel_v2.5.1/include src/reference/business_poc/dictionary_pen_poc/ -rf ; \
145+
wget -q --show-progress $(DOWNLOAD_URL)/downloads/dictionary_pen/cidianbi_kmodel_v2.7.0.tar.gz -O - | tar -xzC src/reference/business_poc/dictionary_pen_poc/ ; \
146+
cp src/reference/business_poc/dictionary_pen_poc/cidianbi_kmodel_v2.7.0/include src/reference/business_poc/dictionary_pen_poc/ -rf ; \
147147
fi;
148148

149149

@@ -512,7 +512,9 @@ uboot-clean: defconfig
512512

513513
.PHONY: build-image
514514
build-image: defconfig prepare_memory check_src
515-
$(K230_SDK_ROOT)/$(CONFIG_GEN_IMG_SCRIPT) ;cd $(K230_SDK_ROOT);
515+
set -e; \
516+
$(K230_SDK_ROOT)/$(CONFIG_GEN_IMG_SCRIPT); \
517+
cd $(K230_SDK_ROOT);
516518

517519
.PHONY: clean
518520
clean:

board/common/env/default.env

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
arch=riscv
2+
autoload=0
23
baudrate=115200
34
board=k230_evb
45
board_name=k230_evb

board/common/env/spinand.env

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
arch=riscv
2+
autoload=0
23
baudrate=115200
34
board=k230_evb
45
board_name=k230_evb

board/common/env/spinor.jffs2.env

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
arch=riscv
2+
autoload=0
23
baudrate=115200
34
board=k230_evb
45
board_name=k230_evb

board/common/gen_image_script/gen_image_comm_func.sh

Lines changed: 12 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,16 @@ gz_file_add_ver()
1313
local sdk_ver_file="${K230_SDK_ROOT}/board/common/post_copy_rootfs/etc/version/release_version"
1414
local nncase_ver_file="${K230_SDK_ROOT}/src/big/nncase/riscv64/nncase/include/nncase/version.h"
1515

16-
17-
16+
local storage="$(echo "$f" | sed -nE "s#[^-]*-([^\.]*).*#\1#p")"
17+
local conf_name="${CONF%%_defconfig}"
1818

1919
cat ${sdk_ver_file} | grep v | cut -d- -f 1 > /dev/null && \
2020
sdk_ver=$(cat ${sdk_ver_file} | grep v | cut -d- -f 1)
2121

2222
cat ${nncase_ver_file} | grep NNCASE_VERSION -w | cut -d\" -f 2 > /dev/null && \
2323
nncase_ver=$(cat ${nncase_ver_file} | grep NNCASE_VERSION -w | cut -d\" -f 2)
24-
25-
cp $f ${CONFIG_BOARD_NAME}_$(echo "$f" | sed -nE "s#[^-]*-([^\.]*).*#\1#p")_${sdk_ver}_nncase_v${nncase_ver}.img.gz;
24+
rm -rf ${conf_name}_${storage}_${sdk_ver}_nncase_v${nncase_ver}.img.gz;
25+
ln -s $f ${conf_name}_${storage}_${sdk_ver}_nncase_v${nncase_ver}.img.gz;
2626
}
2727

2828

@@ -62,6 +62,10 @@ copye_file_to_images()
6262
fakeroot -- cpio -idm < ../rootfs.cpio ;
6363

6464
cp -rf ${K230_SDK_ROOT}/tools/ota/ota_public.pem ${BUILD_DIR}/images/little-core/rootfs/etc/
65+
cp -rf ${K230_SDK_ROOT}/tools/ota/fw_env.config ${BUILD_DIR}/images/little-core/rootfs/etc/
66+
cp -rf ${K230_SDK_ROOT}/tools/ota/ota_aes_key_iv ${BUILD_DIR}/images/little-core/rootfs/etc/
67+
cp -rf ${K230_SDK_ROOT}/tools/ota/hwrevision ${BUILD_DIR}/images/little-core/rootfs/etc/
68+
6569
cp -rf ${K230_SDK_ROOT}/board/common/post_copy_rootfs/* ${BUILD_DIR}/images/little-core/rootfs/
6670
fakeroot -- cp -rf ${BUILD_DIR}/images/little-core/ko-apps/* ${BUILD_DIR}/images/little-core/rootfs/
6771
cd ${BUILD_DIR}/images/little-core/rootfs/; \
@@ -417,12 +421,13 @@ shrink_rootfs_common()
417421
rm -rf mnt/*;
418422
rm -rf app/;
419423
rm -rf lib/tuning-server;
424+
rm -rf usr/sbin/wpa_supplicant usr/sbin/hostapd;
420425
rm -rf usr/bin/stress-ng bin/bash usr/sbin/sshd usr/bin/trace-cmd usr/bin/lvgl_demo_widgets;
421426
rm -rf usr/bin/ssh etc/ssh/moduli usr/lib/libssl.so.1.1 usr/bin/ssh-keygen \
422427
usr/libexec/ssh-keysign usr/bin/ssh-keyscan usr/bin/ssh-add usr/bin/ssh-agent usr/libexec/ssh-pkcs11-helper\
423428
usr/lib/libncurses.so.6.1 usr/lib/libvg_lite_util.so usr/bin/par_ops usr/bin/sftp usr/libexec/lzo/examples/lzotest;
424-
#find . -name *.ko | xargs rm -rf ;
425-
429+
rm -rf usr/bin/wdt_test_demo;
430+
rm -rf usr/bin/swupdate
426431
#裁剪大核rootfs;
427432
cd ${BUILD_DIR}/images/big-core/root/bin/;
428433
find . -type f -not -name init.sh -not -name fastboot_app.elf -not -name test.kmodel | xargs rm -rf ;
@@ -439,24 +444,9 @@ gen_image_spinand()
439444
{
440445
cd ${BUILD_DIR}/;rm -rf images_bak;cp images images_bak -r;
441446

447+
shrink_rootfs_common;
442448
#裁剪小核rootfs
443449
cd ${BUILD_DIR}/images/little-core/rootfs/;
444-
rm -rf lib/modules/;
445-
rm -rf lib/libstdc++*;
446-
rm -rf usr/bin/fio;
447-
rm -rf usr/bin/usb_test;
448-
rm -rf usr/bin/hid_gadget_test;
449-
rm -rf usr/bin/gadget*;
450-
rm -rf usr/bin/otp_test_demo;
451-
rm -rf usr/bin/iotwifi*;
452-
rm -rf usr/bin/i2c-tools.sh;
453-
rm -rf mnt/*;
454-
rm -rf app/;
455-
rm -rf lib/tuning-server;
456-
rm -rf usr/bin/stress-ng bin/bash usr/sbin/sshd usr/bin/trace-cmd;
457-
#find . -name *.ko | xargs rm -rf ;
458-
fakeroot -- ${K230_SDK_ROOT}/tools/mkcpio-rootfs.sh;
459-
460450

461451
#裁剪大核romfs;
462452
#$(RT-SMART_SRC_PATH)/userapps/root
Lines changed: 117 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,117 @@
1+
# $OpenBSD: sshd_config,v 1.103 2018/04/09 20:41:22 tj Exp $
2+
3+
# This is the sshd server system-wide configuration file. See
4+
# sshd_config(5) for more information.
5+
6+
# This sshd was compiled with PATH=/bin:/sbin:/usr/bin:/usr/sbin
7+
8+
# The strategy used for options in the default sshd_config shipped with
9+
# OpenSSH is to specify options with their default value where
10+
# possible, but leave them commented. Uncommented options override the
11+
# default value.
12+
13+
#Port 22
14+
#AddressFamily any
15+
#ListenAddress 0.0.0.0
16+
#ListenAddress ::
17+
18+
#HostKey /etc/ssh/ssh_host_rsa_key
19+
#HostKey /etc/ssh/ssh_host_ecdsa_key
20+
#HostKey /etc/ssh/ssh_host_ed25519_key
21+
22+
# Ciphers and keying
23+
#RekeyLimit default none
24+
25+
# Logging
26+
#SyslogFacility AUTH
27+
#LogLevel INFO
28+
29+
# Authentication:
30+
31+
#LoginGraceTime 2m
32+
PermitRootLogin yes
33+
#PermitRootLogin prohibit-password
34+
#StrictModes yes
35+
#MaxAuthTries 6
36+
#MaxSessions 10
37+
38+
#PubkeyAuthentication yes
39+
40+
# The default is to check both .ssh/authorized_keys and .ssh/authorized_keys2
41+
# but this is overridden so installations will only check .ssh/authorized_keys
42+
AuthorizedKeysFile .ssh/authorized_keys
43+
44+
#AuthorizedPrincipalsFile none
45+
46+
#AuthorizedKeysCommand none
47+
#AuthorizedKeysCommandUser nobody
48+
49+
# For this to work you will also need host keys in /etc/ssh/ssh_known_hosts
50+
#HostbasedAuthentication no
51+
# Change to yes if you don't trust ~/.ssh/known_hosts for
52+
# HostbasedAuthentication
53+
#IgnoreUserKnownHosts no
54+
# Don't read the user's ~/.rhosts and ~/.shosts files
55+
#IgnoreRhosts yes
56+
57+
# To disable tunneled clear text passwords, change to no here!
58+
PasswordAuthentication yes
59+
PermitEmptyPasswords yes
60+
61+
# Change to no to disable s/key passwords
62+
#ChallengeResponseAuthentication yes
63+
64+
# Kerberos options
65+
#KerberosAuthentication no
66+
#KerberosOrLocalPasswd yes
67+
#KerberosTicketCleanup yes
68+
#KerberosGetAFSToken no
69+
70+
# GSSAPI options
71+
#GSSAPIAuthentication no
72+
#GSSAPICleanupCredentials yes
73+
74+
# Set this to 'yes' to enable PAM authentication, account processing,
75+
# and session processing. If this is enabled, PAM authentication will
76+
# be allowed through the ChallengeResponseAuthentication and
77+
# PasswordAuthentication. Depending on your PAM configuration,
78+
# PAM authentication via ChallengeResponseAuthentication may bypass
79+
# the setting of "PermitRootLogin without-password".
80+
# If you just want the PAM account and session checks to run without
81+
# PAM authentication, then enable this but set PasswordAuthentication
82+
# and ChallengeResponseAuthentication to 'no'.
83+
#UsePAM no
84+
85+
#AllowAgentForwarding yes
86+
#AllowTcpForwarding yes
87+
#GatewayPorts no
88+
#X11Forwarding no
89+
#X11DisplayOffset 10
90+
#X11UseLocalhost yes
91+
#PermitTTY yes
92+
#PrintMotd yes
93+
#PrintLastLog yes
94+
#TCPKeepAlive yes
95+
#PermitUserEnvironment no
96+
#Compression delayed
97+
#ClientAliveInterval 0
98+
#ClientAliveCountMax 3
99+
#UseDNS no
100+
#PidFile /var/run/sshd.pid
101+
#MaxStartups 10:30:100
102+
#PermitTunnel no
103+
#ChrootDirectory none
104+
#VersionAddendum none
105+
106+
# no default banner path
107+
#Banner none
108+
109+
# override default of no subsystems
110+
Subsystem sftp /usr/libexec/sftp-server
111+
112+
# Example of overriding settings on a per-user basis
113+
#Match User anoncvs
114+
# X11Forwarding no
115+
# AllowTcpForwarding no
116+
# PermitTTY no
117+
# ForceCommand cvs server

board/k230_evb_dictionary_pen/gen_dictionary_pen_device_image_sd.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ gen_dictionary_pen_device_app()
4444
cd ${K230_SDK_ROOT}; make dictionary_pen;
4545
#creat dictionary_pen dir
4646
mkdir -p ${BUILD_DIR}/images/big-core/app/dictionary_pen/
47-
cp ${K230_SDK_ROOT}/src/reference/business_poc/dictionary_pen_poc/cidianbi_kmodel_v2.5.1/* ${BUILD_DIR}/images/big-core/app/dictionary_pen/ -rf
47+
cp ${K230_SDK_ROOT}/src/reference/business_poc/dictionary_pen_poc/cidianbi_kmodel_v2.7.0/* ${BUILD_DIR}/images/big-core/app/dictionary_pen/ -rf
4848
cp ${K230_SDK_ROOT}/src/reference/business_poc/dictionary_pen_poc/include ${BUILD_DIR}/images/big-core/app/dictionary_pen/ -rf
4949
cp ${K230_SDK_ROOT}/src/reference/business_poc/dictionary_pen_poc/build/dictionary_pen.elf ${BUILD_DIR}/images/big-core/app/dictionary_pen/ -rf
5050

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/dev/mmcblk1 0x1e0000 0x10000

board/k230_evb_only_linux/gen_image.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ rtapp_data_file="${BUILD_DIR}/images/big-core/fastboot_app.elf"
2525

2626
copye_file_to_images;
2727
cp ${K230_SDK_ROOT}/board/k230_evb_only_linux/rcS ${BUILD_DIR}/images/little-core/rootfs/etc/init.d/rcS;
28+
cp ${K230_SDK_ROOT}/board/k230_evb_only_linux/fw_env.config ${BUILD_DIR}/images/little-core/rootfs/etc/fw_env.config;
2829

2930
if [ "${CONFIG_SUPPORT_LINUX}" = "y" ]; then
3031
gen_version;

0 commit comments

Comments
 (0)