Skip to content

Commit 9632e71

Browse files
committed
Fixes for #41 (licheervnano) and bump kernel to latest release
1 parent aa713be commit 9632e71

File tree

9 files changed

+27
-26
lines changed

9 files changed

+27
-26
lines changed

configs/licheervnano/dts/sg2002_licheervnano_sd.dts renamed to configs/licheervnano/dts/cv181x_licheervnano_sd.dts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
/dts-v1/;
2-
#include "sg200x_base_riscv.dtsi"
3-
#include "sg200x_asic_qfn.dtsi"
4-
#include "sg200x_asic_sd.dtsi"
5-
#include "sg200x_default_memmap.dtsi"
2+
#include "cv181x_base_riscv.dtsi"
3+
#include "cv181x_asic_qfn.dtsi"
4+
#include "cv181x_asic_sd.dtsi"
5+
#include "cv181x_default_memmap.dtsi"
66

77
#include <dt-bindings/input/linux-event-codes.h>
88
#include <dt-bindings/gpio/gpio.h>
@@ -47,11 +47,11 @@
4747
cooling-maps {
4848
map0 {
4949
trip = <&soc_thermal_trip_0>;
50-
cooling-device = <&cooling THERMAL_NO_LIMIT 1>;
50+
cooling-device = <&cv181x_cooling THERMAL_NO_LIMIT 1>;
5151
};
5252
map1 {
5353
trip = <&soc_thermal_trip_1>;
54-
cooling-device = <&cooling THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
54+
cooling-device = <&cv181x_cooling THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
5555
};
5656
};
5757
};

configs/licheervnano/patches/fsbl/0002-add-debug-mode.patch renamed to configs/licheervnano/patches/fsbl/0002-add-debug-mode.patch.old

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@ Date: Thu, 18 Apr 2024 13:38:27 +0000
44
Subject: [PATCH] add debug mode
55

66
---
7-
plat/sg200x/bl2/bl2_opt.c | 15 +++++++++++++++
7+
plat/cv180x/bl2/bl2_opt.c | 15 +++++++++++++++
88
1 file changed, 15 insertions(+)
99

10-
diff --git a/plat/sg200x/bl2/bl2_opt.c b/plat/sg200x/bl2/bl2_opt.c
10+
diff --git a/plat/cv180x/bl2/bl2_opt.c b/plat/cv180x/bl2/bl2_opt.c
1111
index c73fa55..013d5de 100644
12-
--- a/plat/sg200x/bl2/bl2_opt.c
13-
+++ b/plat/sg200x/bl2/bl2_opt.c
12+
--- a/plat/cv180x/bl2/bl2_opt.c
13+
+++ b/plat/cv180x/bl2/bl2_opt.c
1414
@@ -419,6 +419,21 @@ retry_from_flash:
1515

1616
switch_rtc_mode_2nd_stage();

configs/licheervnano/settings.mk

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
CHIP=sg200x
2-
UBOOT_CHIP=sg2002
1+
CHIP=cv181x
2+
UBOOT_CHIP=cv181x
33
UBOOT_BOARD=licheervnano_sd
44
BOOT_CPU=riscv
55
ARCH=riscv

configs/licheervnano/u-boot/defconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,4 +79,5 @@ CONFIG_CVI_SOUND_DRIVERS=y
7979
CONFIG_SPI=y
8080
CONFIG_LZ4=y
8181
CONFIG_LZMA=y
82+
CONFIG_TARGET_CVITEK_CV181X=y
8283
# CONFIG_TOOLS_LIBCRYPTO is not set

configs/settings.mk

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
KERNELREV="2"
2-
FSBLVERSION=1.0.0
1+
KERNELREV="3"
2+
FSBLVERSION=1.1.0
33
PACKAGES="ca-certificates debian-archive-keyring dosfstools binutils file tree sudo bash-completion u-boot-menu openssh-server network-manager dnsmasq-base libpam-systemd ppp libengine-pkcs11-openssl iptables systemd-timesyncd vim usbutils parted exfatprogs systemd-sysv i2c-tools net-tools ethtool avahi-utils sudo gnupg rsync gpiod u-boot-tools libubootenv-tool"
44

55
IMAGE_ADDITIONS="usb-gadget"

scripts/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ RUN apt-get update \
1414
git gperf kmod libexpat-dev \
1515
libgmp-dev libmpc-dev libmpfr-dev libssl-dev \
1616
libtool mmdebstrap openssl parted \
17-
patchutils python3 python3-dev python3-distutils \
17+
patchutils python3 python3-dev \
1818
python3-setuptools swig gnupg \
1919
systemd-container texinfo zlib1g-dev wget arch-test \
2020
linux-image-generic genimage joe mc zip \

scripts/Makefile

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ $(BUILDDIR)/linux-prepare-checkout-stamp:
3939
@echo "$(COLOUR_GREEN)Checking out Kernel for $(BOARD)$(END_COLOUR)"
4040
@mkdir -p $(BUILDDIR)
4141
@git clone -b sg200x-dev --depth 7 https://github.com/sophgo/linux_5.10.git /build/kernel
42-
@cd $(BUILDDIR)/kernel && git checkout 8b8fbf8
42+
@cd $(BUILDDIR)/kernel && git checkout e6ead53
4343
@touch $@
4444

4545
$(BUILDDIR)/linux-prepare-patch-stamp: $(BUILDDIR)/linux-prepare-checkout-stamp
@@ -100,13 +100,13 @@ $(BUILDDIR)/uboot-prepare-patch-stamp: $(BUILDDIR)/uboot-prepare-checkout-stamp
100100

101101
$(BUILDDIR)/uboot-prepare-configure-stamp: $(BUILDDIR)/uboot-prepare-patch-stamp
102102
@echo "$(COLOUR_GREEN)Configuring U-Boot for $(BOARD)$(END_COLOUR)"
103-
@cd $(BUILDDIR)/u-boot/ && $(MAKE) -j$(NPROCS) BOARD=cv181x CONFIG_USE_DEFAULT_ENV=y STORAGE_TYPE=$(STORAGE_TYPE) CHIP=$(UBOOT_CHIP) CVIBOARD=$(UBOOT_BOARD) CROSS_COMPILE="/host-tools/gcc/riscv64-linux-musl-x86_64/bin/riscv64-unknown-linux-musl-" $(BOARD)_defconfig
103+
cd $(BUILDDIR)/u-boot/ && $(MAKE) -j$(NPROCS) BOARD=cv181x CONFIG_USE_DEFAULT_ENV=y STORAGE_TYPE=$(STORAGE_TYPE) CHIP=$(UBOOT_CHIP) CVIBOARD=$(UBOOT_BOARD) CROSS_COMPILE="/host-tools/gcc/riscv64-linux-musl-x86_64/bin/riscv64-unknown-linux-musl-" $(BOARD)_defconfig
104104
@touch $@
105105

106106
$(BUILDDIR)/uboot-compile-stamp: $(BUILDDIR)/uboot-prepare-configure-stamp
107107
@echo "$(COLOUR_GREEN)Building U-Boot for $(BOARD)$(END_COLOUR)"
108-
@cd $(BUILDDIR)/u-boot/ && $(MAKE) -j$(NPROCS) BOARD=cv181x CONFIG_USE_DEFAULT_ENV=y STORAGE_TYPE=$(STORAGE_TYPE) CHIP=$(UBOOT_CHIP) CVIBOARD=$(UBOOT_BOARD) CROSS_COMPILE="/host-tools/gcc/riscv64-linux-musl-x86_64/bin/riscv64-unknown-linux-musl-"
109-
@cd $(BUILDDIR)/u-boot/ && $(MAKE) -j$(NPROCS) BOARD=cv181x CONFIG_USE_DEFAULT_ENV=y STORAGE_TYPE=$(STORAGE_TYPE) CHIP=$(UBOOT_CHIP) CVIBOARD=$(UBOOT_BOARD) CROSS_COMPILE="/host-tools/gcc/riscv64-linux-musl-x86_64/bin/riscv64-unknown-linux-musl-" u-boot-initial-env
108+
cd $(BUILDDIR)/u-boot/ && $(MAKE) -j$(NPROCS) BOARD=cv181x CONFIG_USE_DEFAULT_ENV=y STORAGE_TYPE=$(STORAGE_TYPE) CHIP=$(UBOOT_CHIP) CVIBOARD=$(UBOOT_BOARD) CROSS_COMPILE="/host-tools/gcc/riscv64-linux-musl-x86_64/bin/riscv64-unknown-linux-musl-"
109+
cd $(BUILDDIR)/u-boot/ && $(MAKE) -j$(NPROCS) BOARD=cv181x CONFIG_USE_DEFAULT_ENV=y STORAGE_TYPE=$(STORAGE_TYPE) CHIP=$(UBOOT_CHIP) CVIBOARD=$(UBOOT_BOARD) CROSS_COMPILE="/host-tools/gcc/riscv64-linux-musl-x86_64/bin/riscv64-unknown-linux-musl-" u-boot-initial-env
110110
@cp $(BUILDDIR)/u-boot/u-boot.bin $(BUILDDIR)
111111
@cp $(BUILDDIR)/u-boot/u-boot.dtb $(BUILDDIR)
112112
@cp $(BUILDDIR)/u-boot/u-boot-initial-env $(BUILDDIR)
@@ -157,8 +157,8 @@ $(BUILDDIR)/fsbl-prepare-checkout-stamp:
157157

158158
$(BUILDDIR)/fsbl-prepare-patch-stamp: $(BUILDDIR)/fsbl-prepare-checkout-stamp
159159
@echo "$(COLOUR_GREEN)Patching FSBL for $(BOARD)$(END_COLOUR)"
160-
@$(foreach file, $(wildcard /configs/common/patches/fsbl/*.patch), cd $(BUILDDIR)/fsbl && git apply --ignore-whitespace $(file);)
161-
@$(foreach file, $(wildcard /configs/$(BOARD)/patches/fsbl/*.patch), cd $(BUILDDIR)/fsbl && git apply --ignore-whitespace $(file);)
160+
$(foreach file, $(wildcard /configs/common/patches/fsbl/*.patch), cd $(BUILDDIR)/fsbl && git apply --ignore-whitespace $(file);)
161+
$(foreach file, $(wildcard /configs/$(BOARD)/patches/fsbl/*.patch), cd $(BUILDDIR)/fsbl && git apply --ignore-whitespace $(file);)
162162
@python3 /builder/python/mmap_conv.py --type h /configs/$(BOARD)/memmap.py $(BUILDDIR)/fsbl/plat/$(CHIP)/include/cvi_board_memmap.h
163163
@printf '\163\000\120\020\157\360\337\377' > $(BUILDDIR)/fsbl/blank.bin
164164
@touch $@
@@ -197,9 +197,8 @@ $(BUILDDIR)/image-prepare-stamp:
197197
@rm -rf /rootfs/
198198
@-rm $(addon-targets)
199199
@mkdir -p /rootfs/
200-
@curl -v -L https://sophgo.my-ho.st:8443/public-key.asc -o $(BUILDDIR)/public-key.asc
201-
@apt-key add $(BUILDDIR)/public-key.asc
202-
@mmdebstrap -v --architectures=riscv64 --include="$(_PACKAGES)" sid "/rootfs/" "deb http://deb.debian.org/debian/ sid main" "deb https://sophgo.my-ho.st:8443/ debian sophgo"
200+
@curl -v -L https://sophgo.my-ho.st/public-key.asc -o $(BUILDDIR)/public-key.asc
201+
@mmdebstrap -v --architectures=riscv64 --include="$(_PACKAGES)" sid "/rootfs/" "deb http://deb.debian.org/debian/ sid main" "deb [signed-by=$(BUILDDIR)/public-key.asc] https://sophgo.my-ho.st:8443/ debian sophgo"
203202
@touch $@
204203

205204
$(BUILDDIR)/image-addons-stamp: $(BUILDDIR)/image-prepare-stamp $(BUILDDIR)/fsbl-package-stamp $(BUILDDIR)/linux-compile-stamp $(addon-targets)

scripts/deb/cvitek-fsbl/DEBIAN/control

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@ Package: cvitek-fsbl
22
Architecture: riscv64
33
Maintainer: @fishwaldo
44
Priority: optional
5-
Version: 1.0.0
5+
Version: 1.1.0
66
Description: First Stage Boot Loader for the CV18xx and SG200X series of RISC-V SoC's

scripts/setup_rootfs.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,8 @@ fi
144144

145145
rm -rf /etc/apt/sources.list.d/multistrap-debian.list
146146

147-
apt-key add /tmp/install/public-key.asc
147+
#apt-key add /tmp/install/public-key.asc
148+
cp /tmp/install/public-key.asc /etc/apt/trusted.gpg.d/sophgo-myho-st.gpg
148149

149150
cat > /etc/apt/sources.list <<EOF
150151
deb http://deb.debian.org/debian sid main non-free-firmware

0 commit comments

Comments
 (0)