testing/samsung-goyavewifi: new device (MR 3377)

xorg, ssh, touchscreen, battery works
[ci:skip-build]: already built successfully in CI
This commit is contained in:
choc 2022-10-26 15:01:37 +08:00 committed by Oliver Smith
parent ccc870dcf9
commit 2b7036dd54
No known key found for this signature in database
GPG key ID: 5AE7F5513E0885CB
13 changed files with 3765 additions and 0 deletions

View file

@ -0,0 +1,29 @@
# Reference: <https://postmarketos.org/devicepkg>
pkgname=device-samsung-goyavewifi
pkgdesc="Samsung Galaxy Tab 3 Lite"
pkgver=0.1
pkgrel=0
url="https://postmarketos.org"
license="MIT"
arch="armv7"
options="!check !archcheck"
depends="
linux-samsung-goyavewifi
mkbootimg
msm-fb-refresher
postmarketos-base
"
makedepends="devicepkg-dev"
source="deviceinfo"
build() {
devicepkg_build $startdir $pkgname
}
package() {
devicepkg_package $startdir $pkgname
}
sha512sums="
3931347a664fb45f0a0d56d437aa9ee7cff7ad62ace88f21cf7aeb2f78d4c7da6219c78a75fab707f25666fc8e784b3e3da81dd4b51d42b05452c471f4c5e066 deviceinfo
"

View file

@ -0,0 +1,40 @@
# Reference: <https://postmarketos.org/deviceinfo>
# Please use double quotes only. You can source this file in shell
# scripts.
deviceinfo_format_version="0"
deviceinfo_name="Samsung Galaxy Tab 3 Lite"
deviceinfo_manufacturer="Samsung"
deviceinfo_codename="samsung-goyavewifi"
deviceinfo_year="2013"
deviceinfo_arch="armv7"
# Device related
deviceinfo_chassis="tablet"
deviceinfo_keyboard="false"
deviceinfo_external_storage="true"
deviceinfo_screen_width="1024"
deviceinfo_screen_height="600"
deviceinfo_framebuffer_landscape="true"
# Bootloader related
deviceinfo_flash_method="heimdall-bootimg"
deviceinfo_flash_sparse="true"
deviceinfo_flash_sparse_samsung_format="1"
deviceinfo_kernel_cmdline="console=ttyS1,115200n8"
deviceinfo_generate_bootimg="true"
deviceinfo_bootimg_qcdt="true"
deviceinfo_bootimg_mtk_mkimage="false"
deviceinfo_bootimg_dtb_second="false"
deviceinfo_flash_pagesize="2048"
deviceinfo_flash_offset_base="0x00000000"
deviceinfo_flash_offset_kernel="0x00008000"
deviceinfo_flash_offset_ramdisk="0x01000000"
deviceinfo_flash_offset_second="0x00f00000"
deviceinfo_flash_offset_tags="0x00000100"
deviceinfo_flash_heimdall_partition_kernel="KERNEL"
deviceinfo_flash_heimdall_partition_system="system"
# USB related
deviceinfo_usb_idVendor="0x04E8"
deviceinfo_usb_idProduct="0x6602"

View file

@ -0,0 +1,82 @@
# Reference: <https://postmarketos.org/vendorkernel>
# Kernel config based on: arch/arm/configs/goyavewifi-dt_hw04_defconfig
pkgname=linux-samsung-goyavewifi
pkgver=3.10.17
pkgrel=0
pkgdesc="Samsung Galaxy Tab 3 Lite kernel fork"
arch="armv7"
_carch="arm"
_flavor="samsung-goyavewifi"
url="https://kernel.org"
license="GPL-2.0-only"
options="!strip !check !tracedeps pmb:cross-native"
makedepends="
bash
bc
bison
devicepkg-dev
dtbtool-sprd
flex
linux-headers
openssl-dev
perl
"
# Source
_repository="linux"
_commit="e90d994cb5fe2531ff35ee13fb624f4bba2c07cc"
_config="config-$_flavor.$arch"
source="
$pkgname-$_commit.tar.gz::https://github.com/pstglia/$_repository/archive/$_commit.tar.gz
$_config
gcc7-give-up-on-ilog2-const-optimizations.patch
gcc8-fix-put-user.patch
gcc10-extern_YYLOC_global_declaration.patch
kernel-use-the-gnu89-standard-explicitly.patch
no-hardcoded-CROSS_COMPILE.patch
fix-dtb_qcom,msm-id.patch
fix-recordmcount.patch
sprdfb-check-for-buffering.patch
sprdfb-fix-swapped-colors.patch
"
# force_devices-sc8830-objfile.patch
builddir="$srcdir/$_repository-$_commit"
_outdir="out"
prepare() {
default_prepare
. downstreamkernel_prepare
}
build() {
unset LDFLAGS
make O="$_outdir" ARCH="$_carch" CC="${CC:-gcc}" \
KBUILD_BUILD_VERSION="$((pkgrel + 1 ))-postmarketOS"
# Master DTB (deviceinfo_bootimg_qcdt)
dtbTool-sprd -p "$_outdir/scripts/dtc/" \
-o "$_outdir/arch/$_carch/boot"/dt.img \
"$_outdir/arch/$_carch/boot/dts/"
}
package() {
downstreamkernel_package "$builddir" "$pkgdir" "$_carch" \
"$_flavor" "$_outdir"
install -Dm644 "$_outdir/arch/$_carch/boot"/dt.img \
"$pkgdir"/boot/dt.img
}
sha512sums="
80ca6746b5bb06539f18593733fd1c785f6d241c6c2aa026c6cf6d5e5865ffbfd887c4163e7de0db19bccde83ffbdeefaeddb9140366a1fafad591ef885f2415 linux-samsung-goyavewifi-e90d994cb5fe2531ff35ee13fb624f4bba2c07cc.tar.gz
9b6005d51f9536a6a550fb31427d8a4ff9c05b4152442a718a833c94b3fec33c9675e1abf152780dbad900a2cbde8c18a89dacf94d85b1e48fce92284d67d0e8 config-samsung-goyavewifi.armv7
77eba606a71eafb36c32e9c5fe5e77f5e4746caac292440d9fb720763d766074a964db1c12bc76fe583c5d1a5c864219c59941f5e53adad182dbc70bf2bc14a7 gcc7-give-up-on-ilog2-const-optimizations.patch
197d40a214ada87fcb2dfc0ae4911704b9a93354b75179cd6b4aadbb627a37ec262cf516921c84a8b1806809b70a7b440cdc8310a4a55fca5d2c0baa988e3967 gcc8-fix-put-user.patch
2b48f1bf0e3f70703d2cdafc47d5e615cc7c56c70bec56b2e3297d3fa4a7a1321d649a8679614553dde8fe52ff1051dae38d5990e3744c9ca986d92187dcdbeb gcc10-extern_YYLOC_global_declaration.patch
ad0182a483791fc88e058838bc331b2f04a75ba291e763767babdb815efadfc3b4fda97e69e2e3f00a426cabea088e35297a92bd287592597d1e309be68ee92c kernel-use-the-gnu89-standard-explicitly.patch
b3365e61eeb64b968d86cee41aa5edb909cc524cc0b5b0d972ba16b5bbb4266aa726f480c7d6c82a33d90fdead86f39ea5123404603a9c14fc972fd01c5f491c no-hardcoded-CROSS_COMPILE.patch
fb311072075f13d82742ff726fa0812447c22b29fb08f5bbdf05d6b1ca53e53b02324a81c2b858a63d076f4c033481a16af1fe4fb15fa3964715be20a6885018 fix-dtb_qcom,msm-id.patch
32911549f0c89972d06af838954978ee90fb2eabacc1393c0bffa12deb9d80ddec5322f859df772d90afea733965bd669e85d5e90657d4f69995ae9fc25dd4f3 fix-recordmcount.patch
fa11ab7040b83dad145a8f2ca3e5b17b3189b90ca43a8f64e63be4fcb4ba2debe8134b3e28f6f663bc8b7f1e72b1f3a68f342300eed45cb72de70cefba4fa0c2 sprdfb-check-for-buffering.patch
6836001b24508d413a059f19b0c6f6f547037f68886c22159ad51be91d1a089e3d1d9ed79c3c62724648df7f810cd81d96a83f4a34368b373524b649e5539656 sprdfb-fix-swapped-colors.patch
"

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,12 @@
diff --git a/arch/arm/boot/dts/sprd-scx35_goyavewifi_rev04.dts b/arch/arm/boot/dts/sprd-scx35_goyavewifi_rev04.dts
index ca10ca5d..49e28ad2 100644
--- a/arch/arm/boot/dts/sprd-scx35_goyavewifi_rev04.dts
+++ b/arch/arm/boot/dts/sprd-scx35_goyavewifi_rev04.dts
@@ -28,6 +28,7 @@
/ {
model = "Spreadtrum SP7730G board";
sprd,sc-id = <8830 4 0x20000>;
+ qcom,msm-id = <8830 2 0x20000>;
chosen {
bootargs = "init=/init root=/dev/ram0 rw";
linux,initrd-start = <0x85500000>;

View file

@ -0,0 +1,37 @@
This patch fixes the `R_METAG_NONE` error.
Found at: https://lore.kernel.org/patchwork/patch/696647/
The error message:
recordmcount.c: In function 'do_file':
scripts/recordmcount.c:351:28: error: 'R_METAG_ADDR32' undeclared (first use in this function)
351 | case EM_METAG: reltype = R_METAG_ADDR32;
| ^~~~~~~~~~~~~~
scripts/recordmcount.c:351:28: note: each undeclared identifier is reported only once for each function it appears in
scripts/recordmcount.c:353:20: error: 'R_METAG_NONE' undeclared (first use in this function); did you mean 'R_MIPS_NONE'?
353 | rel_type_nop = R_METAG_NONE;
| ^~~~~~~~~~~~
| R_MIPS_NONE
diff --git a/scripts/recordmcount.c b/scripts/recordmcount.c
index e1675927..42396a7 100644
--- a/scripts/recordmcount.c
+++ b/scripts/recordmcount.c
@@ -33,10 +33,17 @@
#include <string.h>
#include <unistd.h>
+/*
+ * glibc synced up and added the metag number but didn't add the relocations.
+ * Work around this in a crude manner for now.
+ */
#ifndef EM_METAG
-/* Remove this when these make it to the standard system elf.h. */
#define EM_METAG 174
+#endif
+#ifndef R_METAG_ADDR32
#define R_METAG_ADDR32 2
+#endif
+#ifndef R_METAG_NONE
#define R_METAG_NONE 3
#endif

View file

@ -0,0 +1 @@
../../.shared-patches/linux/gcc10-extern_YYLOC_global_declaration.patch

View file

@ -0,0 +1 @@
../../.shared-patches/linux/gcc7-give-up-on-ilog2-const-optimizations.patch

View file

@ -0,0 +1 @@
../../.shared-patches/linux/gcc8-fix-put-user.patch

View file

@ -0,0 +1 @@
../../.shared-patches/linux/kernel-use-the-gnu89-standard-explicitly.patch

View file

@ -0,0 +1,14 @@
diff --git a/Makefile b/Makefile
index b7291f3d..78b30681 100755
--- a/Makefile
+++ b/Makefile
@@ -193,7 +193,7 @@ SUBARCH := $(shell uname -m | sed -e s/i.86/x86/ -e s/x86_64/x86/ \
# Default value for CROSS_COMPILE is not to prefix executables
# Note: Some architectures assign CROSS_COMPILE in their arch/*/Makefile
ARCH =arm
-CROSS_COMPILE =/opt/toolchains/arm-eabi-4.7/bin/arm-eabi-
+CROSS_COMPILE ?= $(CONFIG_CROSS_COMPILE:"%"=%)
# Architecture as present in compile.h
UTS_MACHINE := $(ARCH)

View file

@ -0,0 +1,25 @@
From ffed22975488007667b005f41e2b189dafc76a29 Mon Sep 17 00:00:00 2001
From: realaravinth <realaravinth@batsense.net>
Date: Fri, 3 Jul 2020 20:31:01 +0530
Subject: [PATCH] buffere awareness to make x11 work
---
drivers/video/sprdfb/sprdfb_main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/video/sprdfb/sprdfb_main.c b/drivers/video/sprdfb/sprdfb_main.c
index 9d572f0d..7ad1445b 100755
--- a/drivers/video/sprdfb/sprdfb_main.c
+++ b/drivers/video/sprdfb/sprdfb_main.c
@@ -435,7 +435,7 @@ 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) ||
+ (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) ||
--
2.27.0

View file

@ -0,0 +1 @@
../../.shared-patches/linux/sprd/sprdfb-fix-swapped-colors.patch