1ee8db41db
The problem behind swapped red and blue is inverted byte order in framebuffer driver pixel format. This patch sets the correct byte order in the framebuffer driver, solving the swapped red and blue problem. [ci:skip-build]: already built successfully in CI
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=2
|
|
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="7a3b6080ee8d411acc2bb4a08de479aa8cc9c77a"
|
|
_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
|
|
fef4b697b2af03f750016e521ac36f68e1e383b4900c9e55dc275ab9be802fb1095fc5c4bcb50d24d2983ed4675b3f1c659086c1f5c38f9d58b55453ac5ae6ad 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"
|