2019-09-20 21:23:33 +00:00
|
|
|
# Kernel config based on: arch/arm/configs/qcom_defconfig
|
|
|
|
# APKBUILD based on linux-postmarketos-mainline
|
|
|
|
# See: https://gitlab.com/postmarketOS/pmaports/issues/184
|
|
|
|
|
|
|
|
_flavor=sony-nicki-mainline
|
2020-02-28 09:59:56 +00:00
|
|
|
_config="config-$_flavor.$CARCH"
|
2019-09-20 21:23:33 +00:00
|
|
|
|
2020-02-28 09:59:56 +00:00
|
|
|
pkgname=linux-$_flavor
|
2019-09-20 21:23:33 +00:00
|
|
|
|
|
|
|
pkgver=5.3
|
|
|
|
_pkgver=${pkgver/_/-}
|
|
|
|
_kernver=${pkgver%_rc*}
|
|
|
|
_mainver=${_kernver%.*}
|
|
|
|
_patchlevel=${_kernver/$_mainver./}
|
2020-02-28 09:59:56 +00:00
|
|
|
_basever=$_mainver.$((_patchlevel-1))
|
*/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=2
|
2019-09-20 21:23:33 +00:00
|
|
|
|
|
|
|
arch="armv7"
|
2020-07-11 09:16:39 +00:00
|
|
|
pkgdesc="Sony Xperia M kernel fork, close to mainline"
|
2019-09-20 21:23:33 +00:00
|
|
|
url="https://kernel.org/"
|
|
|
|
makedepends="perl sed installkernel bash gmp-dev bc linux-headers elfutils-dev openssl-dev file bison flex"
|
2020-04-21 01:24:27 +00:00
|
|
|
options="!strip !check !tracedeps pmb:cross-native"
|
2019-09-20 21:23:33 +00:00
|
|
|
|
|
|
|
_repository="linux"
|
|
|
|
_commit="ad6ab7f8c57896cb3829e6a80408e0912d6096c2"
|
|
|
|
|
|
|
|
source="
|
2020-02-28 10:17:04 +00:00
|
|
|
$pkgname-$_commit.tar.gz::https://github.com/konradybcio/$_repository/archive/$_commit.tar.gz
|
2020-02-28 09:59:56 +00:00
|
|
|
config-$_flavor.armv7
|
2019-09-20 21:23:33 +00:00
|
|
|
"
|
|
|
|
|
|
|
|
license="GPL2"
|
|
|
|
_abi_release=$_pkgver
|
2020-02-28 09:59:56 +00:00
|
|
|
_carch=$CARCH
|
2019-09-20 21:23:33 +00:00
|
|
|
case "$_carch" in
|
|
|
|
aarch64*) _carch="arm64" ;;
|
|
|
|
arm*) _carch="arm" ;;
|
|
|
|
ppc*) _carch="powerpc" ;;
|
|
|
|
s390*) _carch="s390" ;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
builddir="$srcdir/linux-$_commit"
|
|
|
|
|
|
|
|
prepare() {
|
|
|
|
local _patch_failed=
|
|
|
|
# first apply patches in specified order
|
|
|
|
for i in $source; do
|
|
|
|
case $i in
|
|
|
|
*.patch|*.patch::*)
|
|
|
|
_patch=${i%::*}
|
|
|
|
msg "Applying $_patch..."
|
|
|
|
if ! patch -s -p1 -N -i "$srcdir"/$_patch; then
|
|
|
|
echo $_patch >>failed
|
|
|
|
_patch_failed=1
|
|
|
|
fi
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
done
|
|
|
|
|
|
|
|
if ! [ -z "$_patch_failed" ]; then
|
|
|
|
error "The following patches failed:"
|
|
|
|
cat failed
|
|
|
|
return 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
mkdir -p "$srcdir"/build
|
|
|
|
cp -v "$srcdir"/$_config "$srcdir"/build/.config
|
2020-02-28 09:22:58 +00:00
|
|
|
make -C "$builddir" O="$srcdir"/build ARCH="$_carch" \
|
2019-09-20 21:23:33 +00:00
|
|
|
olddefconfig
|
|
|
|
}
|
|
|
|
|
|
|
|
build() {
|
|
|
|
cd "$srcdir"/build
|
|
|
|
unset LDFLAGS
|
|
|
|
make ARCH="$_carch" CC="${CC:-gcc}" \
|
2020-02-28 09:59:56 +00:00
|
|
|
KBUILD_BUILD_VERSION="$((pkgrel + 1 ))-$_flavor" \
|
2019-09-20 21:23:33 +00:00
|
|
|
CFLAGS_MODULE=-fno-pic
|
|
|
|
}
|
|
|
|
|
|
|
|
package() {
|
2020-02-28 09:59:56 +00:00
|
|
|
cd "$srcdir/build/arch/$_carch/boot"
|
2019-09-20 21:23:33 +00:00
|
|
|
|
|
|
|
if [ "$CARCH" == "aarch64" ]; then
|
2020-02-28 09:59:56 +00:00
|
|
|
install -Dm644 "$srcdir/build/arch/$_carch/boot/Image.gz" \
|
2019-09-20 21:23:33 +00:00
|
|
|
"$pkgdir/boot/vmlinuz-$_flavor"
|
|
|
|
else
|
2020-02-28 09:59:56 +00:00
|
|
|
install -Dm644 "$srcdir/build/arch/$_carch/boot/"*zImage \
|
2019-09-20 21:23:33 +00:00
|
|
|
"$pkgdir/boot/vmlinuz-$_flavor"
|
|
|
|
fi
|
|
|
|
|
|
|
|
install -D "$srcdir/build/include/config/kernel.release" \
|
|
|
|
"$pkgdir/usr/share/kernel/$_flavor/kernel.release"
|
|
|
|
|
|
|
|
cd "$srcdir"/build
|
|
|
|
|
|
|
|
local _install
|
|
|
|
case "$CARCH" in
|
|
|
|
aarch64*|arm*) _install="modules_install dtbs_install" ;;
|
|
|
|
*) _install="modules_install" ;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
make -j1 $_install \
|
|
|
|
ARCH="$_carch" \
|
|
|
|
INSTALL_MOD_PATH="$pkgdir" \
|
|
|
|
INSTALL_DTBS_PATH="$pkgdir/usr/share/dtb"
|
|
|
|
}
|
|
|
|
|
|
|
|
sha512sums="31e9ef9b3e956df38824865c291530fa5dda067bfea8b0169a3871d7876cfe192a42ae631e51a8a02f7c64319269c8af2688d8ae180805173bf2c1c84c390a59 linux-sony-nicki-mainline-ad6ab7f8c57896cb3829e6a80408e0912d6096c2.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
|
|
|
ff8f970e313bd0568aa9e3b8f1251258dfd5006531dd76b0e19ca08a0bc7ecfb19929297b173e402cd7cfc15c9b76f89e385592e3f81df058f16fd1b66fee505 config-sony-nicki-mainline.armv7"
|