Skip to content

Commit

Permalink
20240220
Browse files Browse the repository at this point in the history
  • Loading branch information
0x754C committed Feb 20, 2024
1 parent 64aa622 commit 2043c22
Show file tree
Hide file tree
Showing 44 changed files with 323,254 additions and 0 deletions.
130 changes: 130 additions & 0 deletions apply_patches.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ git am ../patches/linux_5.10/0001-drivers-net-wireless-add-config-aic8800.patch

# try /jump for init process
git am ../patches/linux_5.10/0002-init-try-jump-for-init-process.patch

# default dac/adc gain is too low, so we need set it high
git am ../patches/linux_5.10/0003-sound-soc-cvitek-cv181x-adc-dac-default-volume-is-to.patch
cd ..

cd osdrv
Expand All @@ -20,6 +23,10 @@ git am ../patches/osdrv/0003-interdrv-v2-fb-default-enable-double-buffer.patch

# fix pixel format on licheervnano
git am ../patches/osdrv/0004-interdrv-v2-fb-fix-pixel-format-for-licheervnao-add-.patch

# change touch size, for zct2133v1 800x1280
git am ../patches/osdrv/0005-extdrv-tp-ts_gt9xx-gt9xx.h-change-touch-size-for-zct.patch

cd ..

cd ramdisk
Expand All @@ -35,6 +42,84 @@ git am ../patches/ramdisk/0003-rootfs-overlay-sg2002_licheervnano_sd-add-S99skel
# add jump script for alt rootfs
git am ../patches/ramdisk/0004-rootfs-overlay-sg2002_licheervnano_sd-add-jump-scrip.patch

# mount tmpfs when disk mount failed,
git am ../patches/ramdisk/0005-rootfs-overlay-sg2002_licheervnano_sd-jump-if-mount-.patch

# allow dropbear save host key into disk
git am ../patches/ramdisk/0006-public-dropbear-musl_riscv64-etc-dropbear-allow-drop.patch

# add custom config file for vendor custom, such as: user, hostname, skel
git am ../patches/ramdisk/0007-rootfs-overlay-sg2002_licheervnano_sd-etc-add-custom.patch

# add cdc acm script use for provide virtual com port on usb gadget
git am ../patches/ramdisk/0008-rootfs-public-add-cdc-acm-script.patch

# add getty listen on ttyGS0 (gadget cdc acm)
git am ../patches/ramdisk/0009-rootfs-overlay-sg2002_licheervnano_sd-etc-inittab-ad.patch

# add lcd startup script and test program (abgr1555)
git am ../patches/ramdisk/0010-rootfs-public-add-lcd-startup-script-test-program.patch

# mount /dev/mmcblk0p1 /boot on bootup
git am ../patches/ramdisk/0011-rootfs-overlay-sg2002_licheervnano_sd-etc-fstab-moun.patch

# start wpa_supplicant on bootup
# raspberrypi style wpa_supplicant initial setup:
# use wpa_supplicant.conf into /boot
git am ../patches/ramdisk/0012-rootfs-public-wifi-musl_riscv64-etc-init.d-S50wpa-st.patch

# add missing parted tool fro musl riscv64, use for partition expaned
git am ../patches/ramdisk/0013-parted-musl_riscv64-bin-parted-add-missing-parted-fo.patch

# add busybox full version, because we need udhcpd
git am ../patches/ramdisk/0014-common_musl_riscv64-bin-busybox-add-busybox-full-ver.patch

# move kernel module load into S00board, S99user is too late
git am ../patches/ramdisk/0015-overlay-musl_riscv64-etc-init.d-S00board-move-system.patch

# if `/etc/dropbear not found, create it
git am ../patches/ramdisk/0016-rootfs-public-dropbear-musl_riscv64-etc-init.d-S50dr.patch
git am ../patches/ramdisk/0019-rootfs-public-dropbear-musl_riscv64-etc-init.d-S50dr.patch

# re-enable serial port autologin
git am ../patches/ramdisk/0017-rootfs-overlay-sg2002_licheervnano_sd-etc-inittab-re.patch

# some busybox not support mkdir -v, so remove it
git am ../patches/ramdisk/0018-rootfs-overlay-sg2002_licheervnano_sd-busybox-mkdir-.patch

# add sftp-server, use for file trans
git am ../patches/ramdisk/0020-rootfs-public-sftp-server-add-sftp-server.patch

# add package alsa, use for audio record/play
git am ../patches/ramdisk/0021-rootfs-public-alsa-add-package-alsa.patch

# alsamixer need terminfo
git am ../patches/ramdisk/0022-rootfs-public-alsa-add-package-terminfo-some-package.patch

# add strace, use for debug
git am ../patches/ramdisk/0023-rootfs-public-strace-add-package-strace.patch

# add ekermit, use for file trans
git am ../patches/ramdisk/0024-rootfs-public-ek-add-package-ek-ekermit.patch

# add evtest, use for touchscreen debug
git am ../patches/ramdisk/0025-rootfs-public-evtest-add-package-evtest.patch

# add empty, use for automate input, like (tcl expect)
git am ../patches/ramdisk/0026-rootfs-public-empty-add-package-empty.patch

# add LD_LIBRARY_PATH, fix sample_audio symbol missing
git am ../patches/ramdisk/0027-rootfs-common_musl_riscv64-etc-profile-set-default-l.patch

# save /var/log into disk
git am ../patches/ramdisk/0028-rootfs-common_musl_riscv64-var-save-log-in-disk.patch

# add package tpuddemo for tpu test
git am ../patches/ramdisk/0029-rootfs-public-tpudemo-add-tpudemo-for-test.patch

# add /etc/securtty fix root password login on serial port
git am ../patches/ramdisk/0030-rootfs-overlay-sg2002_licheervnano_sd-fix-root-passw.patch

cd ..

cd middleware
Expand All @@ -51,6 +136,18 @@ git am ../patches/middleware/0004-v2-sample-mipi_tx-sample_dsi_panel.h-add-dsi_s
# add gc4653 support for licheervnano
git am ../patches/middleware/0005-v2-component-isp-sensor-sg200x-gcore_gc4653-add-supp.patch

# add zct2133v1 7inch 800x1280 mipi lcd support
git am ../patches/middleware/0006-v2-component-panel-sg200x-dsi_zct2133v1.h-add-zct213.patch

# add zct2133v1 into sample_dsi
git am ../patches/middleware/0007-v2-sample-mipi_tx-sample_dsi.c-add-zct2133v1-into-sa.patch

# fix image color (fix sample_vio 6)
git am ../patches/middleware/0008-v2-sample-common-sample_common_sensor.c-fix-sensor-p.patch

# fix sample_vio crash, thank lxowalle
git am ../patches/middleware/0009-v2-sample-vio-sample_vio.c-fix-crash-thank-lxowalle.patch

cd ..


Expand Down Expand Up @@ -97,6 +194,33 @@ git am ../patches/build/0013-boards-sg200x-sg2002_licheervnano_sd-select-MIPI_PA
# default enable uboot lcd init
git am ../patches/build/0014-cvisetup.sh-enable-uboot-lcd-init-by-default.patch

# disable rndis script, enable acm script
git am ../patches/build/0015-boards-sg200x-sg2002_licheervnano_sd-sg2002_licheerv.patch

# change framebuffer max size, for 32bpp mode
git am ../patches/build/0016-boards-sg200x-sg2002_licheervnano_sd-memmap.py-chang.patch

# add zct2133v1 into panel list
git am ../patches/build/0017-panels-panel_list.json-add-zct2133v1.patch

# licheervnano default use zct2133v1 panel (7inch)
git am ../patches/build/0018-boards-sg200x-sg2002_licheervnano_sd-sg2002_licheerv.patch

# licheervnano enable package lcd, initial lcd on bootup
git am ../patches/build/0019-boards-sg200x-sg2002_licheervnano_sd-sg2002_licheerv.patch

# licheervnano enable a lot of package, for debug usage
git am ../patches/build/0020-boards-sg200x-sg2002_licheervnano_sd-sg2002_licheerv.patch

# change partition max size, 16MiB is too small, change to 32MiB
git am ../patches/build/0021-tools-common-sd_tools-genimage_rootless.cfg-change-m.patch

# licheervnano enable tpu demo for tpu test
git am ../patches/build/0022-boards-sg200x-sg2002_licheervnano_sd-sg2002_licheerv.patch

# licheervnano linux kernel enable some feature for systemd based distro
git am ../patches/build/0023-boards-sg200x-sg2002_licheervnano_sd-linux-sg2002_li.patch

cd ..


Expand All @@ -111,4 +235,10 @@ git am ../patches/u-boot-2021.10/0002-skip-cvitek_jpeg_dec-build-because-file-is
# add mipi panel st7701_hd22801c31
git am ../patches/u-boot-2021.10/0003-add-mipi-panel-st7701_hd22801c31.patch

# add mipi panel zct2133v1
git am ../patches/u-boot-2021.10/0004-include-cvitek-cvi_panels-dsi_zct2133v1.h-add-zct213.patch

# disable startvl on bootup, because it cause lcd show green background on blank
git am ../patches/u-boot-2021.10/0005-include-cvitek-cvi_panels-cvi_panel_diffs.h-disable-.patch

cd ..
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
From 5d822ddeb04a43af6de3af19d52cd00888c7f905 Mon Sep 17 00:00:00 2001
From: Lu Hui <[email protected]>
Date: Tue, 20 Feb 2024 10:41:53 +0800
Subject: [PATCH 15/17]
boards/sg200x/sg2002_licheervnano_sd/sg2002_licheervnano_sd_defconfig:
disable rndis script, enable acm script

---
.../sg2002_licheervnano_sd/sg2002_licheervnano_sd_defconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/boards/sg200x/sg2002_licheervnano_sd/sg2002_licheervnano_sd_defconfig b/boards/sg200x/sg2002_licheervnano_sd/sg2002_licheervnano_sd_defconfig
index 16c36c9..f685cbe 100644
--- a/boards/sg200x/sg2002_licheervnano_sd/sg2002_licheervnano_sd_defconfig
+++ b/boards/sg200x/sg2002_licheervnano_sd/sg2002_licheervnano_sd_defconfig
@@ -28,4 +28,4 @@ CONFIG_TARGET_PACKAGE_BUSYBOX_SYSLOGD_SCRIPT=y
CONFIG_TARGET_PACKAGE_GATORD=n
CONFIG_TARGET_PACKAGE_NTP=y
CONFIG_TARGET_PACKAGE_WIFI=y
-CONFIG_TARGET_PACKAGE_RNDIS_SCRIPT=y
+CONFIG_TARGET_PACKAGE_ACM_SCRIPT=y
--
2.40.1

Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
From 8f9c4918f57865812708e2fe8b959fa5e906d854 Mon Sep 17 00:00:00 2001
From: Lu Hui <[email protected]>
Date: Tue, 20 Feb 2024 10:42:24 +0800
Subject: [PATCH 16/17] boards/sg200x/sg2002_licheervnano_sd/memmap.py: change
framebuffer memory region size to 8000K

---
boards/sg200x/sg2002_licheervnano_sd/memmap.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/boards/sg200x/sg2002_licheervnano_sd/memmap.py b/boards/sg200x/sg2002_licheervnano_sd/memmap.py
index fcc097d..4c676f0 100755
--- a/boards/sg200x/sg2002_licheervnano_sd/memmap.py
+++ b/boards/sg200x/sg2002_licheervnano_sd/memmap.py
@@ -58,7 +58,7 @@ class MemoryMap:

# Boot logo is after the ION buffer
# Framebuffer uses boot logo's reserved memory
- BOOTLOGO_SIZE = 1800 * SIZE_1K
+ BOOTLOGO_SIZE = 8000 * SIZE_1K
BOOTLOGO_ADDR = ION_ADDR - BOOTLOGO_SIZE
FRAMEBUFFER_SIZE = BOOTLOGO_SIZE
FRAMEBUFFER_ADDR = BOOTLOGO_ADDR
--
2.40.1

24 changes: 24 additions & 0 deletions patches/build/0017-panels-panel_list.json-add-zct2133v1.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
From 909f1df2d358b6c9b6c6903691b1fdbcc2bc080a Mon Sep 17 00:00:00 2001
From: Lu Hui <[email protected]>
Date: Tue, 20 Feb 2024 10:42:41 +0800
Subject: [PATCH 17/17] panels/panel_list.json: add zct2133v1

---
panels/panel_list.json | 1 +
1 file changed, 1 insertion(+)

diff --git a/panels/panel_list.json b/panels/panel_list.json
index e90b7ca..94e2a67 100644
--- a/panels/panel_list.json
+++ b/panels/panel_list.json
@@ -1,6 +1,7 @@
{
"panel_list" : {
"mipi" : [
+ "zct2133v1",
"hx8394",
"ili9881c",
"ili9881d",
--
2.40.1

Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
From de6a11cc3eeed3f59290351205c75123507d6fe7 Mon Sep 17 00:00:00 2001
From: Lu Hui <[email protected]>
Date: Tue, 20 Feb 2024 11:18:29 +0800
Subject: [PATCH 18/18]
boards/sg200x/sg2002_licheervnano_sd/sg2002_licheervnano_sd_defconfig:
default use 7inch zct2133v1 panel

---
.../sg2002_licheervnano_sd/sg2002_licheervnano_sd_defconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/boards/sg200x/sg2002_licheervnano_sd/sg2002_licheervnano_sd_defconfig b/boards/sg200x/sg2002_licheervnano_sd/sg2002_licheervnano_sd_defconfig
index f685cbe..e13d98a 100644
--- a/boards/sg200x/sg2002_licheervnano_sd/sg2002_licheervnano_sd_defconfig
+++ b/boards/sg200x/sg2002_licheervnano_sd/sg2002_licheervnano_sd_defconfig
@@ -12,7 +12,7 @@ CONFIG_BOOT_IMAGE_SINGLE_DTB=y
# CONFIG_FLASH_SIZE_SHRINK is not set
CONFIG_CP_EXT_WIRELESS=y
CONFIG_STORAGE_TYPE_sd=y
-CONFIG_MIPI_PANEL_ST7701_HD228001C31=y
+CONFIG_MIPI_PANEL_ZCT2133V1=y
CONFIG_SENSOR_GCORE_GC4653=y
CONFIG_UBOOT_2021_10=y
CONFIG_KERNEL_SRC_5.10=y
--
2.40.1

Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
From 5ddee25a970ed65f1afee8668134cf4f58d3882d Mon Sep 17 00:00:00 2001
From: Lu Hui <[email protected]>
Date: Tue, 20 Feb 2024 11:28:59 +0800
Subject: [PATCH 19/19]
boards/sg200x/sg2002_licheervnano_sd/sg2002_licheervnano_sd_defconfig: enable
package lcd

---
.../sg2002_licheervnano_sd/sg2002_licheervnano_sd_defconfig | 1 +
1 file changed, 1 insertion(+)

diff --git a/boards/sg200x/sg2002_licheervnano_sd/sg2002_licheervnano_sd_defconfig b/boards/sg200x/sg2002_licheervnano_sd/sg2002_licheervnano_sd_defconfig
index e13d98a..51de8c2 100644
--- a/boards/sg200x/sg2002_licheervnano_sd/sg2002_licheervnano_sd_defconfig
+++ b/boards/sg200x/sg2002_licheervnano_sd/sg2002_licheervnano_sd_defconfig
@@ -29,3 +29,4 @@ CONFIG_TARGET_PACKAGE_GATORD=n
CONFIG_TARGET_PACKAGE_NTP=y
CONFIG_TARGET_PACKAGE_WIFI=y
CONFIG_TARGET_PACKAGE_ACM_SCRIPT=y
+CONFIG_TARGET_PACKAGE_LCD=y
--
2.40.1

Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
From 492e2e60b2b4bf08b89fe89f12daa44b1124491e Mon Sep 17 00:00:00 2001
From: Lu Hui <[email protected]>
Date: Tue, 20 Feb 2024 16:44:32 +0800
Subject: [PATCH 20/20]
boards/sg200x/sg2002_licheervnano_sd/sg2002_licheervnano_sd_defconfig: enable
a lot of package, for debug usage

---
.../sg2002_licheervnano_sd_defconfig | 11 +++++++++++
1 file changed, 11 insertions(+)

diff --git a/boards/sg200x/sg2002_licheervnano_sd/sg2002_licheervnano_sd_defconfig b/boards/sg200x/sg2002_licheervnano_sd/sg2002_licheervnano_sd_defconfig
index 51de8c2..7027f0b 100644
--- a/boards/sg200x/sg2002_licheervnano_sd/sg2002_licheervnano_sd_defconfig
+++ b/boards/sg200x/sg2002_licheervnano_sd/sg2002_licheervnano_sd_defconfig
@@ -30,3 +30,14 @@ CONFIG_TARGET_PACKAGE_NTP=y
CONFIG_TARGET_PACKAGE_WIFI=y
CONFIG_TARGET_PACKAGE_ACM_SCRIPT=y
CONFIG_TARGET_PACKAGE_LCD=y
+CONFIG_TARGET_PACKAGE_IPERF3=y
+CONFIG_TARGET_PACKAGE_E2FSPROGS=y
+CONFIG_TARGET_PACKAGE_STRESS=y
+CONFIG_TARGET_PACKAGE_PARTED=y
+CONFIG_TARGET_PACKAGE_ALSA=y
+CONFIG_TARGET_PACKAGE_TERMINFO=y
+CONFIG_TARGET_PACKAGE_SFTP_SERVER=y
+CONFIG_TARGET_PACKAGE_STRACE=y
+CONFIG_TARGET_PACKAGE_EK=y
+CONFIG_TARGET_PACKAGE_EVTEST=y
+CONFIG_TARGET_PACKAGE_EMPTY=y
--
2.40.1

Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
From 59b94c45fd1511a04c44639dfb887f04a717d3c4 Mon Sep 17 00:00:00 2001
From: Lu Hui <[email protected]>
Date: Tue, 20 Feb 2024 17:13:07 +0800
Subject: [PATCH 21/23] tools/common/sd_tools/genimage_rootless.cfg: change max
rootfs to 32MiB, change max user.ext4 size to 16MiB

---
tools/common/sd_tools/genimage_rootless.cfg | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tools/common/sd_tools/genimage_rootless.cfg b/tools/common/sd_tools/genimage_rootless.cfg
index 539db39..765d191 100644
--- a/tools/common/sd_tools/genimage_rootless.cfg
+++ b/tools/common/sd_tools/genimage_rootless.cfg
@@ -12,7 +12,7 @@ image boot.vfat {
image user.ext4 {
ext4 {
}
- size = 32M
+ size = 16M
}

image duo.img {
@@ -28,7 +28,7 @@ image duo.img {
partition rootfs {
partition-type = 0x83
image = "rootfs.sd"
- size = 16M
+ size = 32M
}

partition user {
--
2.40.1

Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
From 1320b365d85e416836e2b84adbb8638457375bb2 Mon Sep 17 00:00:00 2001
From: Lu Hui <[email protected]>
Date: Tue, 20 Feb 2024 17:15:58 +0800
Subject: [PATCH 22/23]
boards/sg200x/sg2002_licheervnano_sd/sg2002_licheervnano_sd_defconfig: enable
package tpudemo

---
.../sg2002_licheervnano_sd/sg2002_licheervnano_sd_defconfig | 1 +
1 file changed, 1 insertion(+)

diff --git a/boards/sg200x/sg2002_licheervnano_sd/sg2002_licheervnano_sd_defconfig b/boards/sg200x/sg2002_licheervnano_sd/sg2002_licheervnano_sd_defconfig
index 7027f0b..d78da3b 100644
--- a/boards/sg200x/sg2002_licheervnano_sd/sg2002_licheervnano_sd_defconfig
+++ b/boards/sg200x/sg2002_licheervnano_sd/sg2002_licheervnano_sd_defconfig
@@ -41,3 +41,4 @@ CONFIG_TARGET_PACKAGE_STRACE=y
CONFIG_TARGET_PACKAGE_EK=y
CONFIG_TARGET_PACKAGE_EVTEST=y
CONFIG_TARGET_PACKAGE_EMPTY=y
+CONFIG_TARGET_PACKAGE_TPUDEMO=y
--
2.40.1

Loading

0 comments on commit 2043c22

Please sign in to comment.