0cfcc52e0d
Enable CONFIG_CRYPTO_XTS for each kernel, so we can switch to using aes-xts-plain64 as default cipher for cryptsetup (override with "pmbootstrap --cipher"), instead of aes-cbc-plain64 (pmbootstrap#1940). I have executed "pmbootstrap kconfig edit" on each kernel, and manually toggled the option. The diff is not always clean, because for some kernels it is apparently the first time, that menuconfig was executed on the configs like that. In a few instances, it turned out that CONFIG_ANDROID_PARANOID_NETWORK needed to be disabled too (this is already a requirement, but as the config was incomplete, it was not visible that this option was enabled). Very few times, I had to enable CONFIG_EXPERIMENTAL in order to see and enable CONFIG_CRYPTO_XTS. It would be great if we could automate such mass kconfig edits in the future, see pmbootstrap#1942. [skip ci]: I have verified, that every single one of these kernels builds. CI will likely run out of time while downloading source tarballs.
113 lines
3.4 KiB
Text
113 lines
3.4 KiB
Text
# APKBUILD based on linux-vanilla aport. Changes:
|
|
# - add !check !tracedeps
|
|
# - package: just install zImage-dtb and kernel.release, because the kernel config
|
|
# does not generate modules or dtb files
|
|
# - do not create -dev subpackage (makes no sense without module support)
|
|
#
|
|
# Kernel config changes, based on: arch/arm/configs/aosp_rhine_amami_defconfig
|
|
# - enable devtmpfs (needed for udev -> touch support in weston)
|
|
# - change compression from CONFIG_KERNEL_LZMA=y to
|
|
# CONFIG_KERNEL_GZIP=y (so it works with busybox)
|
|
# - disable proprietary graphics driver
|
|
|
|
_flavor=sony-castor-windy
|
|
_branch=next
|
|
_config="config-$_flavor.armhf"
|
|
|
|
pkgname=linux-$_flavor
|
|
pkgver=4.3
|
|
case $pkgver in
|
|
*.*.*) _kernver=${pkgver%.*};;
|
|
*.*) _kernver=$pkgver;;
|
|
esac
|
|
pkgrel=7
|
|
arch="armhf"
|
|
pkgdesc="Sony Xperia Z2 Tablet kernel"
|
|
url="https://github.com/andersson"
|
|
makedepends="perl sed installkernel bash gmp-dev bc linux-headers elfutils-dev gcc6"
|
|
options="!strip !check !tracedeps pmb:cross-native"
|
|
source="
|
|
$pkgname-$_branch.tar.gz::https://github.com/andersson/kernel/archive/$_branch.tar.gz
|
|
$_config
|
|
mmc-wifi-fix.patch
|
|
compiler-gcc6.h
|
|
"
|
|
license="GPL2"
|
|
|
|
_abi_release=$pkgver
|
|
_carch="arm"
|
|
|
|
# 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
|
|
|
|
ksrcdir="$srcdir/kernel-$_branch"
|
|
|
|
prepare() {
|
|
local _patch_failed=
|
|
cd "$ksrcdir"
|
|
|
|
# first apply patches in specified order
|
|
for i in $source; do
|
|
case $i in
|
|
*.patch)
|
|
msg "Applying $i..."
|
|
if ! patch -s -p1 -N -i "$srcdir"/$i; then
|
|
echo $i >>failed
|
|
_patch_failed=1
|
|
fi
|
|
;;
|
|
esac
|
|
done
|
|
|
|
if ! [ -z "$_patch_failed" ]; then
|
|
error "The following patches failed:"
|
|
cat failed
|
|
return 1
|
|
fi
|
|
|
|
# gcc6 support
|
|
cp -v "$srcdir/compiler-gcc6.h" "$ksrcdir/include/linux/"
|
|
|
|
mkdir -p "$srcdir"/build
|
|
cp "$srcdir"/$_config "$srcdir"/build/.config
|
|
make -C "$ksrcdir" O="$srcdir"/build ARCH="$_carch" HOSTCC="$HOSTCC" \
|
|
silentoldconfig
|
|
}
|
|
|
|
build() {
|
|
cd "$srcdir"/build
|
|
unset LDFLAGS
|
|
|
|
make ARCH="$_carch" CC="${CC:-gcc}" \
|
|
KBUILD_BUILD_VERSION="$((pkgrel + 1 ))-Alpine" \
|
|
CFLAGS_MODULE=-fno-pic
|
|
}
|
|
|
|
package() {
|
|
cat "$srcdir/build/arch/arm/boot/zImage" \
|
|
"$srcdir/build/arch/arm/boot/dts/qcom-msm8974-sony-xperia-castor.dtb" > \
|
|
"$srcdir/build/arch/arm/boot/zImage-dtb"
|
|
|
|
install -Dm644 "$srcdir/build/arch/arm/boot/zImage-dtb" \
|
|
"$pkgdir/boot/vmlinuz-$_flavor"
|
|
|
|
install -D "$srcdir/build/include/config/kernel.release" \
|
|
"$pkgdir/usr/share/kernel/$_flavor/kernel.release"
|
|
|
|
cd "$srcdir/build"
|
|
make -j1 modules_install \
|
|
ARCH="$_carch" \
|
|
INSTALL_MOD_STRIP=1 \
|
|
INSTALL_MOD_PATH="$pkgdir"
|
|
}
|
|
|
|
sha512sums="42e3d7ea75a2e69a7589e74409fe43f2abdee0f4cc1fcea1b138622e3845524145e4c41343abc57d71236b1e2f59715f719845fcf5e628a6c343e9b10d06942a linux-sony-castor-windy-next.tar.gz
|
|
c7faf5493882b929a9eefd4e97a93eae65eaebd2337a9b57f445cf12126ed82cbe221ff6b9baa9b4e6d8d6baa262efa0a7c0862618ecd251bdcba0d6fad7efaa config-sony-castor-windy.armhf
|
|
a13b17a151f732c2842df963019079cab07118fcdcdb2f2dfdfbd18571c7e2bd95a94734dc3a4eef1dae970e698f46047973efba6f355b26bf553fa6c2ac895d mmc-wifi-fix.patch
|
|
d80980e9474c82ba0ef1a6903b434d8bd1b092c40367ba543e72d2c119301c8b2d05265740e4104ca1ac5d15f6c4aa49e8776cb44264a9a28dc551e0d1850dcc compiler-gcc6.h"
|