Difference between revisions of "User:DolphinChips/Spreadtrum"

From postmarketOS
Jump to navigation Jump to search
(Created page with "This page contains information about devices based on Spreadtrum's SoC and tricks for porting postmarketOS on such devices. = Kernel compiling errors = == No valid dts found =...")
 
 
Line 1: Line 1:
 
This page contains information about devices based on Spreadtrum's SoC and tricks for porting postmarketOS on such devices.
 
This page contains information about devices based on Spreadtrum's SoC and tricks for porting postmarketOS on such devices.
= Kernel compiling errors =
+
= Kernel compilation errors =
 
== No valid dts found ==
 
== No valid dts found ==
Solution: replace `sprd,sc-id` with `qcom,msm-id` in dts files for your device. See [https://gitlab.com/postmarketOS/pmaports/blob/master/device/linux-samsung-j1mini3g/fix-dts.patch this] and [https://gitlab.com/postmarketOS/pmaports/blob/master/device/linux-zte-p731a20/qcom,msm-id_fix.patch this] patches for example.
+
Open APKBUILD for kernel and change
 +
 
 +
<code>makedepends="perl sed installkernel bash gmp-dev bc linux-headers elfutils-dev devicepkg-dev dtbtool"</code>
 +
 
 +
to
 +
 
 +
<code>makedepends="perl sed installkernel bash gmp-dev bc linux-headers elfutils-dev devicepkg-dev dtbtool-sprd"</code>
 +
 
 +
and change
 +
 
 +
<code>dtbTool -s 2048 -p "scripts/dtc/" -o "arch/arm/boot/dt.img" "arch/arm/boot/"</code>
 +
 
 +
to
 +
 
 +
<code>dtbTool-sprd -s 2048 -p "scripts/dtc/" -o "arch/arm/boot/dt.img" "arch/arm/boot/dts/"</code>
 +
 
 
= Screen =
 
= Screen =
 
== Device doesn't show postmarketOS splash screen even after it booted ==
 
== Device doesn't show postmarketOS splash screen even after it booted ==
Add `msm-fb-refresher` to device package depends or use [https://gitlab.com/postmarketOS/pmaports/blob/master/device/device-samsung-j1mini3g/initfs-hook.sh this initfs-hook.sh].
+
Add <code>msm-fb-refresher</code> to device package depends.
 
== X11 crashes with FBIOPUT_VSCREENINFO error ==
 
== X11 crashes with FBIOPUT_VSCREENINFO error ==
 
Following patch might help you:
 
Following patch might help you:

Latest revision as of 06:04, 26 March 2020

This page contains information about devices based on Spreadtrum's SoC and tricks for porting postmarketOS on such devices.

Kernel compilation errors

No valid dts found

Open APKBUILD for kernel and change

makedepends="perl sed installkernel bash gmp-dev bc linux-headers elfutils-dev devicepkg-dev dtbtool"

to

makedepends="perl sed installkernel bash gmp-dev bc linux-headers elfutils-dev devicepkg-dev dtbtool-sprd"

and change

dtbTool -s 2048 -p "scripts/dtc/" -o "arch/arm/boot/dt.img" "arch/arm/boot/"

to

dtbTool-sprd -s 2048 -p "scripts/dtc/" -o "arch/arm/boot/dt.img" "arch/arm/boot/dts/"

Screen

Device doesn't show postmarketOS splash screen even after it booted

Add msm-fb-refresher to device package depends.

X11 crashes with FBIOPUT_VSCREENINFO error

Following patch might help you:

From c5bb0d59161730e546f279bfbbd097f5eb3e3a7e Mon Sep 17 00:00:00 2001
From: DolphinChips <DoIphinChips@protonmail.com>
Date: Mon, 21 Oct 2019 19:58:45 +0500
Subject: [PATCH] Add a little hack to sprdfb_main.c

---
 drivers/video/sprdfb/sprdfb_main.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/video/sprdfb/sprdfb_main.c b/drivers/video/sprdfb/sprdfb_main.c
index 43876285..751616a1 100644
--- a/drivers/video/sprdfb/sprdfb_main.c
+++ b/drivers/video/sprdfb/sprdfb_main.c
@@ -531,7 +531,8 @@ static int sprdfb_check_var(struct fb_var_screeninfo *var, struct fb_info *fb)
 	if ((var->xres != fb->var.xres) ||
 		(var->yres != fb->var.yres) ||
 		(var->xres_virtual != fb->var.xres_virtual) ||
-		(var->yres_virtual != fb->var.yres_virtual) ||
+		// (var->yres_virtual != fb->var.yres_virtual) ||
+	    	(fb->var.yres_virtual % var->yres_virtual != 0) ||
 		(var->xoffset != fb->var.xoffset) ||
 #ifndef BIT_PER_PIXEL_SURPPORT
 		(var->bits_per_pixel != fb->var.bits_per_pixel) ||