Skip to content

Commit

Permalink
20240401
Browse files Browse the repository at this point in the history
  • Loading branch information
0x754C committed Apr 1, 2024
1 parent 7497e5b commit 55a5491
Show file tree
Hide file tree
Showing 351 changed files with 287 additions and 2,123 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ CONFIG_PREEMPT=y
CONFIG_IKCONFIG=y
CONFIG_IKCONFIG_PROC=y
CONFIG_LOG_BUF_SHIFT=15
CONFIG_BLK_DEV_INITRD=n
CONFIG_BLK_DEV_INITRD=y
# CONFIG_SYSFS_SYSCALL is not set
# CONFIG_FHANDLE is not set
# CONFIG_BASE_FULL is not set
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ CONFIG_SENSOR_GCORE_GC4653=y
CONFIG_UBOOT_2021_10=y
CONFIG_KERNEL_SRC_5.10=y
CONFIG_KERNEL_UNCOMPRESSED=y
CONFIG_SKIP_RAMDISK=y
# CONFIG_SKIP_RAMDISK is not set
CONFIG_SENSOR_TUNING_PARAM_cv181x_src_gcore_gc4653=y
# CONFIG_ROOTFS_OVERLAYFS is not set
CONFIG_ENABLE_FREERTOS=y
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,3 +63,4 @@ CONFIG_BMP_32BPP=y
CONFIG_BOOTLOGO=y
CONFIG_CMD_CVI_VO=y
CONFIG_CMD_GPIO=y
CONFIG_CMD_MBR=y
22 changes: 22 additions & 0 deletions build/common_functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,28 @@ function pack_burn_image
popd
)}

function pack_usbdl_image
{(
pushd "$OUTPUT_DIR"
[ -d tmp ] && rm -rf tmp
set -eux
cp -rf $TOOLS_PATH/cv181x/usb_dl $OUTPUT_DIR
cd usb_dl
unzip -o $OUTPUT_DIR/upgrade.zip
cp $OUTPUT_DIR/fip.bin ./
set +eux
echo "========================================="
echo ""
echo "usb flash command:"
echo ""
echo "cd $OUTPUT_DIR/usb_dl && python3 cv181x_dl.py"
echo ""
echo ""
echo "========================================="

popd
)}

function pack_prog_img
{(
local tmp_dir
Expand Down
1 change: 1 addition & 0 deletions build/envsetup_soc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -621,6 +621,7 @@ function build_all()
pack_data || return $?
pack_system || return $?
pack_upgrade || return $?
pack_usbdl_image || return $?
pack_burn_image || return $?
)}

Expand Down
1 change: 1 addition & 0 deletions build/scripts/fip_v2.mk
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ fsbl%: export FSBL_SECURE_BOOT_SUPPORT=${CONFIG_FSBL_SECURE_BOOT_SUPPORT}
fsbl%: export ARCH=$(call qstrip,${CONFIG_ARCH})
fsbl%: export OD_CLK_SEL=${CONFIG_OD_CLK_SEL}
fsbl%: export VC_CLK_OVERDRIVE=${CONFIG_VC_CLK_OVERDRIVE}
fsbl%: export TPU_PERF_MODE=$(shell if [ "${CONFIG_CHIP_cv1812cp}" = "y" ] || [ "${CONFIG_CHIP_sg2002}" = "y" ]; then echo "y";else echo "n";fi)
fsbl-build: u-boot-build memory-map
$(call print_target)
${Q}mkdir -p ${FSBL_PATH}/build
Expand Down
1 change: 1 addition & 0 deletions build/tools/common/sd_tools/genimage_rootless.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ image boot.vfat {
"usb.dev",
"usb.rndis0",
"wifi.sta",
"ver",
}
}
size = 16M
Expand Down
4 changes: 3 additions & 1 deletion build/tools/common/sd_tools/sd_gen_burn_image_rootless.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ fi
output_dir=$1
echo ${output_dir}
set -eu
image=`LC_ALL=C date +%F-%R | sed -e 's/:/-/g' | tr -d '( ):'`.img
git_id=$(git rev-parse HEAD | head -c 6)
image=$(LC_ALL=C date +%F-%R | sed -e 's/:/-/g' | tr -d '( ):')-${git_id}.img
THISDIR=$(dirname $(realpath $0))
mkdir -pv ${output_dir}/tmp/
mkdir -pv ${output_dir}/root/
Expand All @@ -29,6 +30,7 @@ touch ${output_dir}/input/usb.dev
touch ${output_dir}/input/usb.rndis0
touch ${output_dir}/input/wifi.sta
touch ${output_dir}/input/gt9xx
echo ${image} > ${output_dir}/input/ver
cp -fv ${THISDIR}/genimage_rootless.cfg ${output_dir}/genimage.cfg
sed -i -e "s/duo.img/${image}/g" ${output_dir}/genimage.cfg
cd ${output_dir}/
Expand Down
2 changes: 2 additions & 0 deletions build/tools/cv181x/usb_dl/rom_usb_dl/XmlParser.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,8 @@ def parse(self, install=None):

if self.storage == "emmc":
self.__calEmmcOffset(parts)
if self.storage == "sd":
self.__calEmmcOffset(parts)
elif self.storage == "spinor":
self.__calNorOffset(parts)
elif self.storage == "spinand":
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ def parse_Args():
type=str)
parser.add_argument(
'--pid',
metavar='1001',
default='1001',
metavar='1000',
default='1000',
type=str)
parser.add_argument(
"-v",
Expand Down
69 changes: 69 additions & 0 deletions buildroot/board/cvitek/SG200X/overlay/etc/avahi/avahi-daemon.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
# This file is part of avahi.
#
# avahi is free software; you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as
# published by the Free Software Foundation; either version 2 of the
# License, or (at your option) any later version.
#
# avahi is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
# License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with avahi; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
# USA.

# See avahi-daemon.conf(5) for more information on this configuration
# file!

[server]
#host-name=foo
#domain-name=local
#browse-domains=0pointer.de, zeroconf.org
use-ipv4=yes
use-ipv6=yes
#allow-interfaces=eth0
#deny-interfaces=eth1
#check-response-ttl=no
#use-iff-running=no
#enable-dbus=yes
#disallow-other-stacks=no
#allow-point-to-point=no
#cache-entries-max=4096
#clients-max=4096
#objects-per-client-max=1024
#entries-per-entry-group-max=32
ratelimit-interval-usec=1000000
ratelimit-burst=1000

[wide-area]
enable-wide-area=yes

[publish]
#disable-publishing=no
#disable-user-service-publishing=no
#add-service-cookie=no
publish-addresses=yes
publish-hinfo=yes
publish-workstation=yes
#publish-domain=yes
#publish-dns-servers=192.168.50.1, 192.168.50.2
#publish-resolv-conf-dns-servers=yes
#publish-aaaa-on-ipv4=yes
#publish-a-on-ipv6=no

[reflector]
#enable-reflector=no
#reflect-ipv=no
#reflect-filters=_airplay._tcp.local,_raop._tcp.local

[rlimits]
#rlimit-as=
#rlimit-core=0
#rlimit-data=8388608
#rlimit-fsize=0
#rlimit-nofile=768
#rlimit-stack=8388608
#rlimit-nproc=3
7 changes: 3 additions & 4 deletions buildroot/board/cvitek/SG200X/overlay/etc/ssh/sshd_config
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,9 @@
#ListenAddress 0.0.0.0
#ListenAddress ::

#HostKey /etc/ssh/ssh_host_rsa_key
#HostKey /etc/ssh/ssh_host_ecdsa_key
# generate rsa & ecdsa use a lot of time, so disable it

# some old ssh utils need rsa & ecdsa
HostKey /etc/ssh/ssh_host_rsa_key
HostKey /etc/ssh/ssh_host_ecdsa_key
HostKey /etc/ssh/ssh_host_ed25519_key

# Ciphers and keying
Expand Down
15 changes: 7 additions & 8 deletions buildroot/configs/cvitek_SG200X_musl_riscv64_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -66,15 +66,14 @@ BR2_PACKAGE_NTP_NTPD=y
BR2_PACKAGE_NTP_NTPDATE=y
BR2_PACKAGE_MACCHANGER=y
BR2_PACKAGE_AVAHI=y
BR2_PACKAGE_AVAHI_AUTOIPD=y
# avahi mdns is buggy
# BR2_PACKAGE_AVAHI_DAEMON is not set
# BR2_PACKAGE_AVAHI_AUTOIPD is not set
BR2_PACKAGE_AVAHI_DAEMON=y
# BR2_PACKAGE_AVAHI_LIBDNSSD_COMPATIBILITY is not set
# BR2_PACKAGE_AVAHI_DEFAULT_SERVICES is not set
BR2_PACKAGE_MDNSD=y
BR2_PACKAGE_MDNSD_MQUERY=y
BR2_PACKAGE_MDNSD_HTTP_SERVICE=y
BR2_PACKAGE_MDNSD_SSH_SERVICE=y
BR2_PACKAGE_AVAHI_DEFAULT_SERVICES=y
# BR2_PACKAGE_MDNSD is not set
# BR2_PACKAGE_MDNSD_MQUERY is not set
# BR2_PACKAGE_MDNSD_HTTP_SERVICE is not set
# BR2_PACKAGE_MDNSD_SSH_SERVICE is not set
BR2_PACKAGE_WIRELESS_TOOLS=y
BR2_PACKAGE_WIRELESS_TOOLS_IFRENAME=y
BR2_PACKAGE_WIRELESS_TOOLS_IWCONFIG=y
Expand Down
46 changes: 20 additions & 26 deletions ramdisk/configs/sg200x/onekernel_fixed_files.txt.sqsh
Original file line number Diff line number Diff line change
@@ -1,33 +1,27 @@

#####################
# files to boot a real root system

file /init ../target/init.sh.sqsh 775 0 0
file /init_recovery ../target/init.sh.recoverysh 775 0 0
# files to boot a minimal system

dir /dev 755 0 0
dir /etc 755 0 0
dir /proc 755 0 0
dir /sys 755 0 0
dir /mnt 755 0 0

dir /dev/shm 755 0 0
dir /dev/pts 755 0 0
nod /dev/console 644 0 0 c 5 1

dir /root 755 0 0
dir /home 755 0 0
dir /home/cvitek 755 1000 1000
file /root/cmdline.sh ../target/cmdline.sh 775 0 0
file /init ../target/init 775 0 0
file /busybox ../target/busybox 775 0 0

dir /proc 755 0 0
dir /sys 755 0 0

dir /bin 755 1000 1000
dir /usr 755 1000 1000
dir /usr/sbin 755 1000 1000
file /bin/busybox ../target/bin/busybox 755 0 0
file /usr/sbin/blkid ../target/usr/sbin/blkid 755 0 0
slink /bin/sh /bin/busybox 755 0 0
slink /bin/su /bin/busybox 755 0 0
slink /bin/mount /bin/busybox 755 0 0
slink /bin/umount /bin/busybox 755 0 0
slink /bin/findfs /bin/busybox 755 0 0
slink /bin/chown /bin/busybox 755 0 0
slink /bin/chmod /bin/busybox 755 0 0
slink /bin/switch_root /bin/busybox 755 0 0
slink /sh /busybox 755 0 0
slink /mount /busybox 755 0 0
slink /ls /busybox 755 0 0
slink /mkdir /busybox 755 0 0
slink /sync /busybox 755 0 0
slink /ln /busybox 755 0 0
slink /cat /busybox 755 0 0
slink /switch_root /busybox 755 0 0
slink /grep /busybox 755 0 0
slink /wc /busybox 755 0 0
slink /umount /busybox 755 0 0
slink /sleep /busybox 755 0 0
50 changes: 20 additions & 30 deletions ramdisk/configs/sg200x/overlayfs_fixed_files.txt.sqsh
Original file line number Diff line number Diff line change
@@ -1,37 +1,27 @@

#####################
# files to boot a real root system

file /init ../target/init.sh.overlayfssh 775 0 0
file /init_recovery ../target/init.sh.recoverysh 775 0 0
# files to boot a minimal system

dir /dev 755 0 0
dir /etc 755 0 0
dir /proc 755 0 0
dir /sys 755 0 0
dir /mnt 755 0 0

dir /dev/shm 755 0 0
dir /dev/pts 755 0 0
nod /dev/console 644 0 0 c 5 1

dir /root 755 0 0
dir /home 755 0 0
dir /home/cvitek 755 1000 1000
file /root/cmdline.sh ../target/cmdline.sh 775 0 0
file /init ../target/init 775 0 0
file /busybox ../target/busybox 775 0 0

dir /proc 755 0 0
dir /sys 755 0 0

dir /bin 755 1000 1000
dir /sbin 755 1000 1000
dir /usr 755 1000 1000
dir /usr/sbin 755 1000 1000
dir /usr/bin 755 1000 1000
file /bin/busybox ../target/bin/busybox 755 0 0
file /usr/sbin/blkid ../target/usr/sbin/blkid 755 0 0
slink /bin/sh /bin/busybox 755 0 0
slink /bin/su /bin/busybox 755 0 0
slink /bin/mount /bin/busybox 755 0 0
slink /bin/umount /bin/busybox 755 0 0
slink /bin/switch_root /bin/busybox 755 0 0
slink /bin/ubiattach /bin/busybox 755 0 0
slink /bin/ubimkvol /bin/busybox 755 0 0
slink /bin/cut /bin/busybox 755 0 0
slink /bin/mdev /bin/busybox 755 0 0
slink /bin/mkdir /bin/busybox 755 0 0
slink /sh /busybox 755 0 0
slink /mount /busybox 755 0 0
slink /ls /busybox 755 0 0
slink /mkdir /busybox 755 0 0
slink /sync /busybox 755 0 0
slink /ln /busybox 755 0 0
slink /cat /busybox 755 0 0
slink /switch_root /busybox 755 0 0
slink /grep /busybox 755 0 0
slink /wc /busybox 755 0 0
slink /umount /busybox 755 0 0
slink /sleep /busybox 755 0 0
Loading

0 comments on commit 55a5491

Please sign in to comment.