2978dfd42a
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
79 lines
2.9 KiB
Text
79 lines
2.9 KiB
Text
# 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"
|