e4623227ef
@drebrez originally based klte port on lineage-16.0 branch (Android 9), but we need compatibility with Android 7.1, so use lineage-14.1 branch. Also tidy up downstream kernel config a little bit (pass it through pmbootstrap kconfig edit, change nothing, exit with saving).
88 lines
3.3 KiB
Text
88 lines
3.3 KiB
Text
# Reference: <https://postmarketos.org/vendorkernel>
|
|
# Kernel config based on: arch/arm/configs/msm8974_sec_defconfig
|
|
# arch/arm/configs/msm8974pro_sec_klte_eur_defconfig
|
|
# arch/arm/configs/selinux_defconfig
|
|
|
|
pkgname="linux-samsung-klte"
|
|
pkgver=3.4.113
|
|
pkgrel=3
|
|
pkgdesc="Samsung Galaxy S5 kernel fork"
|
|
arch="armv7"
|
|
_carch="arm"
|
|
_flavor="samsung-klte"
|
|
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 xz dtbtool devicepkg-dev gcc6"
|
|
|
|
# Compiler: GCC 6 (doesn't boot when compiled with newer versions)
|
|
if [ "${CC:0:5}" != "gcc6-" ]; then
|
|
CC="gcc6-$CC"
|
|
HOSTCC="gcc6-gcc"
|
|
CROSS_COMPILE="gcc6-$CROSS_COMPILE"
|
|
fi
|
|
|
|
# Source
|
|
_repository="android_kernel_samsung_msm8974"
|
|
_commit="fcdaf427a423de521f75831b1a49002b9d2a3fa5"
|
|
_config="config-${_flavor}.${arch}"
|
|
source="
|
|
$pkgname-$_commit.tar.gz::https://github.com/LineageOS/${_repository}/archive/${_commit}.tar.gz
|
|
$_config
|
|
00_fix_return_address.patch
|
|
01_gpu-msm-fix-gcc5-compile.patch
|
|
02-Reduce-battery-and-touchscreen-log-spam.patch
|
|
0001-fix-video-argb-setting.patch
|
|
"
|
|
builddir="$srcdir/${_repository}-${_commit}"
|
|
|
|
prepare() {
|
|
default_prepare
|
|
downstreamkernel_prepare "$srcdir" "$builddir" "$_config" "$_carch" "$HOSTCC"
|
|
}
|
|
|
|
build() {
|
|
unset LDFLAGS
|
|
make ARCH="$_carch" CC="${CC:-gcc}" \
|
|
KBUILD_BUILD_VERSION="$((pkgrel + 1 ))-postmarketOS"
|
|
|
|
# Generate master DTB
|
|
dtbTool -s 2048 -p "scripts/dtc/" -o "arch/arm/boot/dt.img" "arch/arm/boot/"
|
|
}
|
|
|
|
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
|
|
install -Dm644 "$builddir/arch/arm/boot/dt.img" \
|
|
"$pkgdir/boot/dt.img"
|
|
|
|
# External modules install
|
|
cd "$builddir"
|
|
make ARCH="$_carch" CC="${CC:-gcc}" \
|
|
KBUILD_BUILD_VERSION="$((pkgrel + 1 ))-postmarketOS" \
|
|
INSTALL_MOD_PATH="$pkgdir" modules_install
|
|
}
|
|
|
|
sha512sums="a0ed01d4beb4fd1b304ea1409e4e3d7ff60662de34999dcdb2901cb10eef217a6679d5cc42dfcc9c3e2b9fb96bc38a8adc431444092310e22af29c7d581f60af linux-samsung-klte-7a3b6080ee8d411acc2bb4a08de479aa8cc9c77a.tar.gz
|
|
2e660d0ac4ffdd5f1a63660a8b61cf83e94122f15126b134a27f58b84fc5424ce4935ef43ca5bff1ec956047b77f7fb7f67e5c1ec976c67712444b370ae6373e config-samsung-klte.armv7
|
|
3b4913415bcfe0ff222969f993890c656c7e12b6ee06532bded485d5201c9855b2c87996c5b63423702b89b6b0ca214b5aceeb402571d9c5af084093c157ccb4 00_fix_return_address.patch
|
|
0fc4b1782dfd3bd94fa9ae8ab74b19713f25e9f4a48dcf830072634f247aa3dd8847f001a3e87e9728e057657efd4ae751510e7c408d9b960c907665ca64e61f 01_gpu-msm-fix-gcc5-compile.patch
|
|
b55fc9ab3e21bc85d66ee08d7e1cd7fdc3b236249212fbcd0055e60ed3e6cef3e4d2b8058a4b7d70c78b2bbc7a11111b55d4d82490b4e3579b8e61657806ac09 02-Reduce-battery-and-touchscreen-log-spam.patch
|
|
a48336bbfead6ad0c84d2fce0c40a3f5530aebdff356a6835cceaf59a50a6f860d2f8027703a92927955fbb18857ba78788e010d017bf67730f069b36e96fe87 0001-fix-video-argb-setting.patch"
|