new device: gts210vewifi (Samsung Galaxy Tab S2 9.7 Wifi) (#1493)
Touch screen does not work yet, see the device page for details: https://wiki.postmarketos.org/wiki/Samsung_Galaxy_Tab_S2_9.7_Wifi_(samsung-gts210vewifi)
This commit is contained in:
parent
8e8c6b053c
commit
c89e5ff737
6 changed files with 4986 additions and 0 deletions
22
device/device-samsung-gts210vewifi/APKBUILD
Normal file
22
device/device-samsung-gts210vewifi/APKBUILD
Normal file
|
@ -0,0 +1,22 @@
|
|||
# Reference: <https://postmarketos.org/devicepkg>
|
||||
pkgname="device-samsung-gts210vewifi"
|
||||
pkgdesc="Galaxy Tab S2 9.7 WiFi (SM-T813)"
|
||||
pkgver=0.1
|
||||
pkgrel=0
|
||||
url="https://postmarketos.org"
|
||||
license="MIT"
|
||||
arch="noarch"
|
||||
options="!check"
|
||||
depends="postmarketos-base linux-samsung-gts210vewifi mkbootimg mesa-dri-swrast mdss-fb-init-hack"
|
||||
makedepends="devicepkg-dev"
|
||||
source="deviceinfo"
|
||||
|
||||
build() {
|
||||
devicepkg_build $startdir $pkgname
|
||||
}
|
||||
|
||||
package() {
|
||||
devicepkg_package $startdir $pkgname
|
||||
}
|
||||
|
||||
sha512sums="bc4d64b148fb1039782af73bf931b77970d6b81e3a61459bbdfa11f6f9edecc1a0753d1fe15ec4b2bd9ff61b08b1c764e760847bdf4947d542efff7f4089fbf3 deviceinfo"
|
34
device/device-samsung-gts210vewifi/deviceinfo
Normal file
34
device/device-samsung-gts210vewifi/deviceinfo
Normal file
|
@ -0,0 +1,34 @@
|
|||
# Reference: <https://postmarketos.org/deviceinfo>
|
||||
# Please use double quotes only. You can source this file in shell scripts.
|
||||
|
||||
deviceinfo_format_version="0"
|
||||
deviceinfo_name="Galaxy Tab S2 9.7 WiFi (SM-T813)"
|
||||
deviceinfo_manufacturer="Samsung"
|
||||
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 buildvariant=userdebug androidboot.selinux=permissive androidboot.sec_atd.tty=/dev/ttyHSL0 sec_log=0x200000@0xa0200000 sec_dbg=0x1ff000@0xa0000000 androidboot.revision=4 androidboot.warranty_bit=1 androidboot.bootloader=T813XXU2BQD3 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 fg_reset=0 androidboot.security_mode=1526595584 androidboot.ucs_mode=0 androidboot.emmc=true gpt 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-gts210vewifi/01_fix_msm_dba.patch
Normal file
13
device/linux-samsung-gts210vewifi/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);
|
||||
|
94
device/linux-samsung-gts210vewifi/APKBUILD
Normal file
94
device/linux-samsung-gts210vewifi/APKBUILD
Normal file
|
@ -0,0 +1,94 @@
|
|||
# Kernel config based on: kernel/samsung/msm8976/arch/arm64/configs/gts210vewifi_defconfig
|
||||
|
||||
pkgname="linux-samsung-gts210vewifi"
|
||||
pkgver=3.10.102
|
||||
pkgrel=0
|
||||
pkgdesc="Galaxy Tab S2 9.7 WiFi (SM-T813) kernel fork"
|
||||
arch="aarch64"
|
||||
_carch="arm64"
|
||||
_flavor="samsung-gts210vewifi"
|
||||
url="https://kernel.org"
|
||||
license="GPL2"
|
||||
options="!strip !check !tracedeps"
|
||||
makedepends="perl sed installkernel bash gmp-dev bc linux-headers elfutils-dev dtbtool"
|
||||
HOSTCC="${CC:-gcc}"
|
||||
HOSTCC="${HOSTCC#${CROSS_COMPILE}}"
|
||||
|
||||
# Source
|
||||
# gts210vewifi uses msm8976 kernel
|
||||
_repository="android_kernel_samsung_msm8976"
|
||||
_commit="82d475a1952b9bbb6652b35e87671b5031bcf934"
|
||||
_config="config-${_flavor}.${arch}"
|
||||
source="
|
||||
$pkgname-$_commit.tar.gz::https://github.com/LineageOS/${_repository}/archive/${_commit}.tar.gz
|
||||
$_config
|
||||
compiler-gcc6.h
|
||||
01_fix_msm_dba.patch
|
||||
"
|
||||
builddir="$srcdir/${_repository}-${_commit}"
|
||||
|
||||
prepare() {
|
||||
default_prepare
|
||||
|
||||
# gcc6 support
|
||||
cp -v "$srcdir/compiler-gcc6.h" "$builddir/include/linux/"
|
||||
|
||||
# Remove -Werror from all makefiles
|
||||
local i
|
||||
local makefiles="$(find . -type f -name Makefile)
|
||||
$(find . -type f -name Kbuild)"
|
||||
for i in $makefiles; do
|
||||
sed -i 's/-Werror-/-W/g' "$i"
|
||||
sed -i 's/-Werror//g' "$i"
|
||||
done
|
||||
|
||||
# Prepare kernel config ('yes ""' for kernels lacking olddefconfig)
|
||||
cp "$srcdir"/$_config "$builddir"/.config
|
||||
yes "" | make ARCH="$_carch" HOSTCC="$HOSTCC" oldconfig
|
||||
}
|
||||
|
||||
menuconfig() {
|
||||
cd "$builddir"
|
||||
make ARCH="$_carch" menuconfig
|
||||
cp .config "$startdir"/$_config
|
||||
}
|
||||
|
||||
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="37e55b3e64308a29deb8932d8d2452ff76601558bdcb9ff58f3a016f5ec63c2941e5fe7cdcced50d5039d3cdadaa5d43004c4e27cb8b105f8fda7596d676fb9e linux-samsung-gts210vewifi-82d475a1952b9bbb6652b35e87671b5031bcf934.tar.gz
|
||||
31d6b7356ac1c1053dce3319371b18298a4a6e815abcd910a7e0ff0a4dc03bcff15da14f8e8d485c80da29169788754f019f2b158355c3768bae7c2b17f3047b config-samsung-gts210vewifi.aarch64
|
||||
d80980e9474c82ba0ef1a6903b434d8bd1b092c40367ba543e72d2c119301c8b2d05265740e4104ca1ac5d15f6c4aa49e8776cb44264a9a28dc551e0d1850dcc compiler-gcc6.h
|
||||
7e765cb696fa8c3dfbc305b05cbf1fad85fb9572613d5391e945341dae5974a745f4906c795dc841e5562b19ab77d5257f9741e514af2c2573aa4bb8b262ce51 01_fix_msm_dba.patch"
|
69
device/linux-samsung-gts210vewifi/compiler-gcc6.h
Normal file
69
device/linux-samsung-gts210vewifi/compiler-gcc6.h
Normal file
|
@ -0,0 +1,69 @@
|
|||
// SOURCE:
|
||||
// https://github.com/NextThingCo/CHIP-u-boot/issues/10#issuecomment-287515505
|
||||
|
||||
#ifndef __LINUX_COMPILER_H
|
||||
#error "Please don't include <linux/compiler-gcc6.h> directly, include <linux/compiler.h> instead."
|
||||
#endif
|
||||
|
||||
#define __used __attribute__((__used__))
|
||||
#define __must_check __attribute__((warn_unused_result))
|
||||
#define __compiler_offsetof(a, b) __builtin_offsetof(a, b)
|
||||
|
||||
/* Mark functions as cold. gcc will assume any path leading to a call
|
||||
to them will be unlikely. This means a lot of manual unlikely()s
|
||||
are unnecessary now for any paths leading to the usual suspects
|
||||
like BUG(), printk(), panic() etc. [but let's keep them for now for
|
||||
older compilers]
|
||||
|
||||
Early snapshots of gcc 4.3 don't support this and we can't detect this
|
||||
in the preprocessor, but we can live with this because they're unreleased.
|
||||
Maketime probing would be overkill here.
|
||||
|
||||
gcc also has a __attribute__((__hot__)) to move hot functions into
|
||||
a special section, but I don't see any sense in this right now in
|
||||
the kernel context */
|
||||
#define __cold __attribute__((__cold__))
|
||||
|
||||
#define __UNIQUE_ID(prefix) __PASTE(__PASTE(__UNIQUE_ID_, prefix), __COUNTER__)
|
||||
|
||||
#ifndef __CHECKER__
|
||||
# define __compiletime_warning(message) __attribute__((warning(message)))
|
||||
# define __compiletime_error(message) __attribute__((error(message)))
|
||||
#endif /* __CHECKER__ */
|
||||
|
||||
/*
|
||||
* Mark a position in code as unreachable. This can be used to
|
||||
* suppress control flow warnings after asm blocks that transfer
|
||||
* control elsewhere.
|
||||
*
|
||||
* Early snapshots of gcc 4.5 don't support this and we can't detect
|
||||
* this in the preprocessor, but we can live with this because they're
|
||||
* unreleased. Really, we need to have autoconf for the kernel.
|
||||
*/
|
||||
#define unreachable() __builtin_unreachable()
|
||||
|
||||
/* Mark a function definition as prohibited from being cloned. */
|
||||
#define __noclone __attribute__((__noclone__))
|
||||
|
||||
/*
|
||||
* Tell the optimizer that something else uses this function or variable.
|
||||
*/
|
||||
#define __visible __attribute__((externally_visible))
|
||||
|
||||
/*
|
||||
* GCC 'asm goto' miscompiles certain code sequences:
|
||||
*
|
||||
* http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58670
|
||||
*
|
||||
* Work it around via a compiler barrier quirk suggested by Jakub Jelinek.
|
||||
*
|
||||
* (asm goto is automatically volatile - the naming reflects this.)
|
||||
*/
|
||||
#define asm_volatile_goto(x...) do { asm goto(x); asm (""); } while (0)
|
||||
|
||||
#ifdef CONFIG_ARCH_USE_BUILTIN_BSWAP
|
||||
#define __HAVE_BUILTIN_BSWAP32__
|
||||
#define __HAVE_BUILTIN_BSWAP64__
|
||||
#define __HAVE_BUILTIN_BSWAP16__
|
||||
#endif /* CONFIG_ARCH_USE_BUILTIN_BSWAP */
|
||||
|
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue