samsung-gts210velte: new device (SM-T819) (!346)
device is very similar to samsung-gts210vewifi (SM-T813), just has additional LTE modem. Have to use gcc6 for kernel compilation, otherwise get 'Unhandled fault: alignment fault (0x96000061) at 0xffffff8001787f4c' errors on kernel startup, and device always reboots. [ci:skip-build]: already built successfully in CI
This commit is contained in:
parent
eb0622513b
commit
2978dfd42a
6 changed files with 4923 additions and 0 deletions
18
device/device-samsung-gts210velte/90-sec_touchscreen.rules
Normal file
18
device/device-samsung-gts210velte/90-sec_touchscreen.rules
Normal file
|
@ -0,0 +1,18 @@
|
|||
# * need ATTRS{name}=="sec_touchscreen" else device not detected as touchscreen
|
||||
# * give size hint (in mm) otherwise too small size is assumed
|
||||
# * to avoid palm detection, need LIBINPUT_ATTR_PALM_PRESSURE_THRESHOLD=256
|
||||
# and libinput>1.10
|
||||
# * set calibration matrix for 270 degree clockwise rotation, see [1]
|
||||
# * remove TOUCHPAD, add TOUCHSCREEN to ensure that device is seen as
|
||||
# touchscreen only, see [2]
|
||||
#
|
||||
# [1] https://wayland.freedesktop.org/libinput/doc/latest/udev_config.html
|
||||
# [2] https://wayland.freedesktop.org/libinput/doc/latest/udev_config.html#udev_device_type
|
||||
#
|
||||
ACTION=="add|change", SUBSYSTEM=="input", ATTRS{name}=="sec_touchscreen", \
|
||||
ENV{LIBINPUT_ATTR_SIZE_HINT}="190x140", \
|
||||
ENV{LIBINPUT_ATTR_PALM_PRESSURE_THRESHOLD}="256", \
|
||||
ENV{LIBINPUT_CALIBRATION_MATRIX}="0 1 0 -1 0 1", \
|
||||
ENV{ID_INPUT}="1", \
|
||||
ENV{ID_INPUT_TOUCHPAD}="", \
|
||||
ENV{ID_INPUT_TOUCHSCREEN}="1"
|
26
device/device-samsung-gts210velte/APKBUILD
Normal file
26
device/device-samsung-gts210velte/APKBUILD
Normal file
|
@ -0,0 +1,26 @@
|
|||
# Reference: <https://postmarketos.org/devicepkg>
|
||||
pkgname="device-samsung-gts210velte"
|
||||
pkgdesc="Samsung Galaxy Tab S2 9.7 LTE (SM-T819)"
|
||||
pkgver=0.1
|
||||
pkgrel=0
|
||||
url="https://postmarketos.org"
|
||||
license="MIT"
|
||||
arch="aarch64"
|
||||
options="!check !archcheck"
|
||||
depends="postmarketos-base linux-samsung-gts210velte mkbootimg mesa-dri-swrast mdss-fb-init-hack"
|
||||
makedepends="devicepkg-dev"
|
||||
source="deviceinfo 90-sec_touchscreen.rules"
|
||||
|
||||
build() {
|
||||
devicepkg_build $startdir $pkgname
|
||||
}
|
||||
|
||||
package() {
|
||||
devicepkg_package $startdir $pkgname
|
||||
install -D -m644 "$srcdir"/90-sec_touchscreen.rules \
|
||||
"$pkgdir"/etc/udev/rules.d/90-sec_touchscreen.rules
|
||||
}
|
||||
|
||||
|
||||
sha512sums="58ef7874dc145f613cfe88427eff21f49351427e2d20168bed64a5e70e684093940ad833f555fe8fadaa52c1a671ac43e396f26ae80ac73cbba500ee4ce9805c deviceinfo
|
||||
0d23fae6de9b04a36f395068278b8a9054c33e435b24de943da1e55a0ee2d88ee932a3fd2f660596377b14474483edecb8357684f9b7bc2c53979c7f863fae52 90-sec_touchscreen.rules"
|
35
device/device-samsung-gts210velte/deviceinfo
Normal file
35
device/device-samsung-gts210velte/deviceinfo
Normal file
|
@ -0,0 +1,35 @@
|
|||
# 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 S2 9.7 LTE (SM-T819)"
|
||||
deviceinfo_manufacturer="Samsung"
|
||||
deviceinfo_codename="samsung-gts210velte"
|
||||
deviceinfo_date="2016"
|
||||
deviceinfo_dtb=""
|
||||
deviceinfo_modules_initfs=""
|
||||
deviceinfo_arch="aarch64"
|
||||
|
||||
# Device related
|
||||
deviceinfo_keyboard="false"
|
||||
deviceinfo_external_storage="true"
|
||||
deviceinfo_screen_width="2048"
|
||||
deviceinfo_screen_height="1536"
|
||||
deviceinfo_dev_touchscreen="/dev/input/event2"
|
||||
deviceinfo_dev_touchscreen_calibration="0 1 1.342 -1 0 1536"
|
||||
deviceinfo_dev_keyboard=""
|
||||
|
||||
# Bootloader related
|
||||
deviceinfo_flash_method="heimdall-bootimg"
|
||||
deviceinfo_kernel_cmdline="console=null androidboot.hardware=qcom androidboot.wificountrycode=00 firmware_class.path=/lib/firmware/postmarketos msm_rtb.filter=0x237 ehci-hcd.park=3 androidboot.bootdevice=7824900.sdhci lpm_levels.sleep_disabled=1 earlyprintk androidboot.selinux=permissive buildvariant=userdebug androidboot.sec_atd.tty=/dev/ttyHSL0 sec_log=0x200000@0xa0200000 sec_dbg=0x1ff000@0xa0000000 androidboot.revision=4 androidboot.warranty_bit=1 androidboot.bootloader=T819XXS2BRB1 androidboot.boot_recovery=0 sec_debug.reset_reason=0x0 sec_dbg_ex_info=0x400@0xa01ff000 charging_mode=0x00 pmic_info=3 androidboot.debug_level=0x4f4c sec_debug.enable=0 sec_debug.enable_user=0 msm_rtb.enable=0 androidboot.cp_debug_level=0x55FF sec_debug.enable_cp_debug=0 vmalloc=450M sysscope=0xff000000 fg_reset=0 androidboot.security_mode=1526595584 androidboot.ucs_mode=0 androidboot.emmc=true gpt androidboot.baseband=msm lcd_id=0x424015 lcd_id2=0xffffff hall_ic=0x0 mdss_mdp.panel=1:dsi:0:ss_dsi_panel_ANA38401_AMS968HH01_QXGA:1:ss_dsi_panel_ANA38"
|
||||
deviceinfo_generate_bootimg="true"
|
||||
deviceinfo_bootimg_qcdt="true"
|
||||
deviceinfo_flash_offset_base="0x80000000"
|
||||
deviceinfo_flash_offset_kernel="0x00008000"
|
||||
deviceinfo_flash_offset_ramdisk="0x02000000"
|
||||
deviceinfo_flash_offset_second="0x00f00000"
|
||||
deviceinfo_flash_offset_tags="0x01e00000"
|
||||
deviceinfo_flash_pagesize="2048"
|
||||
deviceinfo_flash_heimdall_partition_kernel="BOOT"
|
||||
deviceinfo_flash_heimdall_partition_system="SYSTEM"
|
||||
|
13
device/linux-samsung-gts210velte/01_fix_msm_dba.patch
Normal file
13
device/linux-samsung-gts210velte/01_fix_msm_dba.patch
Normal file
|
@ -0,0 +1,13 @@
|
|||
diff --git a/drivers/video/msm/msm_dba/msm_dba.c b/drivers/video/msm/msm_dba/msm_dba.c
|
||||
index cc6512a..eb073a7 100644
|
||||
--- a/drivers/video/msm/msm_dba/msm_dba.c
|
||||
+++ b/drivers/video/msm/msm_dba/msm_dba.c
|
||||
@@ -22,7 +22,7 @@
|
||||
#include <linux/err.h>
|
||||
|
||||
#include <video/msm_dba.h>
|
||||
-#include <msm_dba_internal.h>
|
||||
+#include "msm_dba_internal.h"
|
||||
|
||||
static DEFINE_MUTEX(register_mutex);
|
||||
|
79
device/linux-samsung-gts210velte/APKBUILD
Normal file
79
device/linux-samsung-gts210velte/APKBUILD
Normal file
|
@ -0,0 +1,79 @@
|
|||
# Reference: <https://postmarketos.org/vendorkernel>
|
||||
# Kernel config based on: (kernel/samsung/msm8976/)arch/arm64/configs/gts210velte_defconfig
|
||||
|
||||
pkgname="linux-samsung-gts210velte"
|
||||
pkgver=3.10.102
|
||||
pkgrel=1
|
||||
pkgdesc="Samsung Galaxy Tab S2 9.7 LTE (SM-T819) kernel fork"
|
||||
arch="aarch64"
|
||||
_carch="arm64"
|
||||
_flavor="samsung-gts210velte"
|
||||
url="https://kernel.org"
|
||||
license="GPL-2.0-only"
|
||||
options="!strip !check !tracedeps"
|
||||
makedepends="perl sed installkernel bash gmp-dev bc linux-headers elfutils-dev dtbtool gcc6 devicepkg-dev"
|
||||
|
||||
# Compiler: this kernel was only tested with GCC6. Feel free to make a merge
|
||||
# request if you find out that it is booting working with newer GCCs as
|
||||
# well. See <https://postmarketos.org/vendorkernel> for instructions.
|
||||
if [ "${CC:0:5}" != "gcc6-" ]; then
|
||||
CC="gcc6-$CC"
|
||||
HOSTCC="gcc6-gcc"
|
||||
CROSS_COMPILE="gcc6-$CROSS_COMPILE"
|
||||
fi
|
||||
|
||||
# Source
|
||||
# gts210velte uses msm8976 kernel
|
||||
_repository="android_kernel_samsung_msm8976"
|
||||
_commit="f6ab8eed124e3adc1c90d9f3106abd21c0bd0397"
|
||||
_config="config-${_flavor}.${arch}"
|
||||
source="
|
||||
$pkgname-$_commit.tar.gz::https://github.com/LineageOS/${_repository}/archive/${_commit}.tar.gz
|
||||
$_config
|
||||
01_fix_msm_dba.patch
|
||||
"
|
||||
builddir="$srcdir/${_repository}-${_commit}"
|
||||
|
||||
prepare() {
|
||||
default_prepare
|
||||
|
||||
downstreamkernel_prepare "$srcdir" "$builddir" "$_config" "$_carch" "$HOSTCC"
|
||||
}
|
||||
|
||||
build() {
|
||||
unset LDFLAGS
|
||||
make ARCH="$_carch" CC="${CC:-gcc}" \
|
||||
C_INCLUDE_PATH="./arch/arm/mach-msm:./sound/soc/msm/qdsp6v2" \
|
||||
KBUILD_BUILD_VERSION="$((pkgrel + 1 ))-postmarketOS"
|
||||
# As path is symlinked from arm64 to arm, dtb files end up below arm, not arm64
|
||||
echo dtbTool -s 2048 -p "scripts/dtc/" -o "arch/arm64/boot/dt.img" "arch/arm/boot/dts/"
|
||||
# Generate master DTB (deviceinfo_bootimg_qcdt).
|
||||
dtbTool -s 2048 -p "scripts/dtc/" -o "arch/arm64/boot/dt.img" "arch/arm/boot/dts/"
|
||||
}
|
||||
|
||||
package() {
|
||||
# kernel.release
|
||||
install -D "$builddir/include/config/kernel.release" \
|
||||
"$pkgdir/usr/share/kernel/$_flavor/kernel.release"
|
||||
|
||||
# zImage (find the right one)
|
||||
cd "$builddir/arch/$_carch/boot"
|
||||
_target="$pkgdir/boot/vmlinuz-$_flavor"
|
||||
for _zimg in zImage-dtb Image.gz-dtb *zImage Image; do
|
||||
[ -e "$_zimg" ] || continue
|
||||
msg "zImage found: $_zimg"
|
||||
install -Dm644 "$_zimg" "$_target"
|
||||
break
|
||||
done
|
||||
if ! [ -e "$_target" ]; then
|
||||
error "Could not find zImage in $PWD!"
|
||||
return 1
|
||||
fi
|
||||
# Master DTB (deviceinfo_bootimg_qcdt)
|
||||
install -Dm644 "$builddir/arch/arm64/boot/dt.img" \
|
||||
"$pkgdir/boot/dt.img"
|
||||
}
|
||||
|
||||
sha512sums="4fd6cbb31e389bdc50defb586d4a2d86d8bb51556b45b8f974c5ecb11de4900d36d0af65090f61664e32a48a7cef3f89f57157b460f4d6d5d05fa71e1400a099 linux-samsung-gts210velte-f6ab8eed124e3adc1c90d9f3106abd21c0bd0397.tar.gz
|
||||
0dc4d943e8effe6778d2c6f0353990757435f1fce59083b7bfaa834328fa91d7df3c2543758cbb20e7c115c9f28b7d9eb7e936024331af995f9da88223e45c6e config-samsung-gts210velte.aarch64
|
||||
7e765cb696fa8c3dfbc305b05cbf1fad85fb9572613d5391e945341dae5974a745f4906c795dc841e5562b19ab77d5257f9741e514af2c2573aa4bb8b262ce51 01_fix_msm_dba.patch"
|
4752
device/linux-samsung-gts210velte/config-samsung-gts210velte.aarch64
Normal file
4752
device/linux-samsung-gts210velte/config-samsung-gts210velte.aarch64
Normal file
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue