2020-06-18 20:31:25 +00:00
|
|
|
# Reference: <https://postmarketos.org/vendorkernel>
|
2017-11-04 02:45:37 +00:00
|
|
|
# Kernel config based on: arch/arm/configs/lineageos_onyx_defconfig
|
|
|
|
|
2020-06-18 20:31:25 +00:00
|
|
|
# NOTE: The gcc option CONFIG_NO_ERROR_ON_MISMATCH=y was temporarily added to
|
|
|
|
# make the kernel compile with GCC4, the resulting kernel compiles and boots.
|
2017-11-04 02:45:37 +00:00
|
|
|
|
2020-06-18 20:31:25 +00:00
|
|
|
pkgname=linux-oneplus-onyx
|
2017-11-04 02:45:37 +00:00
|
|
|
pkgver=3.4.0
|
*/linux-*: enable CONFIG_CRYPTO_XTS (MR 1405)
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.
2020-07-11 13:24:19 +00:00
|
|
|
pkgrel=6
|
2020-06-18 20:31:25 +00:00
|
|
|
pkgdesc="OnePlus X kernel fork"
|
|
|
|
arch="armv7"
|
2017-11-04 02:45:37 +00:00
|
|
|
_carch="arm"
|
2020-06-18 20:31:25 +00:00
|
|
|
_flavor="oneplus-onyx"
|
|
|
|
url="https://kernel.org"
|
|
|
|
license="GPL-2.0-only"
|
|
|
|
options="!strip !check !tracedeps pmb:cross-native"
|
|
|
|
makedepends="bash bc bison devicepkg-dev flex openssl-dev perl xz gcc4"
|
2018-10-01 06:44:18 +00:00
|
|
|
|
2020-06-18 20:31:25 +00:00
|
|
|
# Compiler: GCC 4 (doesn't boot when compiled with newer versions)
|
|
|
|
if [ "${CC:0:5}" != "gcc4-" ]; then
|
|
|
|
CC="gcc4-$CC"
|
|
|
|
HOSTCC="gcc4-gcc"
|
|
|
|
CROSS_COMPILE="gcc4-$CROSS_COMPILE"
|
2018-10-01 06:44:18 +00:00
|
|
|
fi
|
2017-11-04 02:45:37 +00:00
|
|
|
|
2020-06-18 20:31:25 +00:00
|
|
|
# Source
|
|
|
|
_repository="android_kernel_oneplus_onyx"
|
|
|
|
_commit="3d82ae9121f3863c8aa6f49fe5935d975e564138"
|
|
|
|
_config="config-$_flavor.$arch"
|
|
|
|
source="
|
|
|
|
$pkgname-$_commit.tar.gz::https://github.com/LineageOS/$_repository/archive/$_commit.tar.gz
|
|
|
|
$_config
|
|
|
|
kernel-use-the-gnu89-standard-explicitly.patch
|
|
|
|
"
|
|
|
|
builddir="$srcdir/$_repository-$_commit"
|
|
|
|
_outdir="out"
|
2017-11-04 02:45:37 +00:00
|
|
|
|
|
|
|
prepare() {
|
2020-06-18 20:31:25 +00:00
|
|
|
default_prepare
|
|
|
|
. downstreamkernel_prepare
|
2017-11-04 02:45:37 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
build() {
|
|
|
|
unset LDFLAGS
|
2020-06-18 20:31:25 +00:00
|
|
|
make O="$_outdir" ARCH="$_carch" CC="${CC:-gcc}" \
|
|
|
|
KBUILD_BUILD_VERSION="$((pkgrel + 1 ))-postmarketOS" \
|
|
|
|
CONFIG_NO_ERROR_ON_MISMATCH=y
|
2017-11-04 02:45:37 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
package() {
|
2020-06-18 20:31:25 +00:00
|
|
|
downstreamkernel_package "$builddir" "$pkgdir" "$_carch" "$_flavor" "$_outdir"
|
2017-11-04 02:45:37 +00:00
|
|
|
}
|
|
|
|
|
2020-06-18 20:31:25 +00:00
|
|
|
sha512sums="a44507d013ec12aadc134daca7ed255da9ec78d5627db6edbf9a3e178b89c292810a1cbe801bc1d98cc3ae2a5bf04239c9d555fa5fa0db701b399c39c02c1013 linux-oneplus-onyx-3d82ae9121f3863c8aa6f49fe5935d975e564138.tar.gz
|
*/linux-*: enable CONFIG_CRYPTO_XTS (MR 1405)
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.
2020-07-11 13:24:19 +00:00
|
|
|
f25b62a0d0d323e6e0dc71e91ab6506c9bd23068c8d1a81705ba4b17815dff7a599a769fae54f84241447a17c183b8997b3417f924ec7122ed1f76090d67eda8 config-oneplus-onyx.armv7
|
2020-06-18 20:31:25 +00:00
|
|
|
ad0182a483791fc88e058838bc331b2f04a75ba291e763767babdb815efadfc3b4fda97e69e2e3f00a426cabea088e35297a92bd287592597d1e309be68ee92c kernel-use-the-gnu89-standard-explicitly.patch"
|