2017-10-04 17:20:17 +00:00
|
|
|
# APKBUILD based on linux-vanilla aport. Changes:
|
|
|
|
# - disabled module installation
|
|
|
|
# - add !check !tracedeps
|
|
|
|
# - package: just install zimage 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 based on: arch/arm/configs/lineageos_i9305_defconfig
|
|
|
|
# Changes:
|
|
|
|
# - enable devtmpfs (needed for udev -> touch support in weston)
|
2018-07-31 22:16:24 +00:00
|
|
|
# - adding xz to makedepends because of lzma: unrecognized option: 9 (https://wiki.postmarketos.org/wiki/Troubleshooting:kernel)
|
2017-10-04 17:20:17 +00:00
|
|
|
# - add kernel modules installation
|
2017-10-11 15:11:05 +00:00
|
|
|
# - disable ANDROID_PARANOID_NETWORK (removes network restrictions)
|
2017-10-04 17:20:17 +00:00
|
|
|
|
|
|
|
_flavor=samsung-i9305
|
|
|
|
_hash="fa8fa332fdec11744ffe0c742775cc22efe0d041"
|
2020-02-28 09:59:56 +00:00
|
|
|
_config="config-$_flavor.armhf"
|
2017-10-04 17:20:17 +00:00
|
|
|
|
2020-02-28 09:59:56 +00:00
|
|
|
pkgname=linux-$_flavor
|
2017-10-04 17:20:17 +00:00
|
|
|
pkgver=3.0.101
|
|
|
|
case $pkgver in
|
|
|
|
*.*.*) _kernver=${pkgver%.*};;
|
|
|
|
*.*) _kernver=$pkgver;;
|
|
|
|
esac
|
*/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=7
|
2017-10-04 17:20:17 +00:00
|
|
|
arch="armhf"
|
|
|
|
pkgdesc="Samsung Galaxy SIII LTE kernel from LineageOS"
|
|
|
|
url="https://github.com/LineageOS/android_kernel_samsung_smdk4412"
|
2018-10-01 06:44:18 +00:00
|
|
|
makedepends="perl sed installkernel bash gmp-dev bc linux-headers elfutils-dev xz busybox-static-armhf gcc6"
|
2020-04-21 01:24:27 +00:00
|
|
|
options="!strip !check !tracedeps pmb:cross-native"
|
2017-10-04 17:20:17 +00:00
|
|
|
source="
|
2020-02-28 09:59:56 +00:00
|
|
|
$pkgname-$_hash.tar.gz::https://github.com/LineageOS/android_kernel_samsung_smdk4412/archive/$_hash.tar.gz
|
2017-10-04 17:20:17 +00:00
|
|
|
$_config
|
|
|
|
compiler-gcc6.h
|
|
|
|
"
|
|
|
|
license="GPL2"
|
|
|
|
|
2020-02-28 09:59:56 +00:00
|
|
|
_abi_release=$pkgver
|
2017-10-04 17:20:17 +00:00
|
|
|
_carch="arm"
|
2018-10-01 06:44:18 +00:00
|
|
|
|
|
|
|
# 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"
|
2018-11-30 20:56:06 +00:00
|
|
|
HOSTCC="gcc6-gcc"
|
2018-10-01 06:44:18 +00:00
|
|
|
CROSS_COMPILE="gcc6-$CROSS_COMPILE"
|
|
|
|
fi
|
2017-10-04 17:20:17 +00:00
|
|
|
|
2020-02-28 09:59:56 +00:00
|
|
|
ksrcdir="$srcdir/android_kernel_samsung_smdk4412-$_hash"
|
2017-10-04 17:20:17 +00:00
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
|
echo "-- [ Build kernel ] --"
|
|
|
|
make ARCH="$_carch" CC="${CC:-gcc}" \
|
|
|
|
KBUILD_BUILD_VERSION="$((pkgrel + 1))-Alpine"
|
|
|
|
|
|
|
|
echo "-- [ Build modules ] --"
|
2020-02-28 09:59:19 +00:00
|
|
|
# the 'no-pic' flag is necessary to avoid the
|
2017-10-04 17:20:17 +00:00
|
|
|
# error 'Unknown symbol _GLOBAL_OFFSET_TABLE_ (err 0)' when loading the module
|
|
|
|
make ARCH="$_carch" CC="${CC:-gcc}" CFLAGS_MODULE="-fno-pic" \
|
|
|
|
KBUILD_BUILD_VERSION="$((pkgrel + 1))-Alpine" CONFIG_NO_ERROR_ON_MISMATCH=y \
|
|
|
|
modules
|
|
|
|
}
|
|
|
|
|
|
|
|
package() {
|
|
|
|
echo "--[ Installing kernel ]--"
|
|
|
|
install -Dm644 "$srcdir/build/arch/arm/boot/zImage" \
|
|
|
|
"$pkgdir/boot/vmlinuz-$_flavor"
|
|
|
|
|
|
|
|
install -D "$srcdir/build/include/config/kernel.release" \
|
|
|
|
"$pkgdir/usr/share/kernel/$_flavor/kernel.release"
|
|
|
|
|
2020-02-28 09:59:19 +00:00
|
|
|
|
2017-10-04 17:20:17 +00:00
|
|
|
cd "$srcdir"/build
|
|
|
|
unset LDFLAGS
|
|
|
|
|
|
|
|
echo "--[ Installing modules ]--"
|
|
|
|
make ARCH="$_carch" CC="${CC:-gcc}" \
|
|
|
|
KBUILD_BUILD_VERSION="$((pkgrel + 1))-Alpine" CONFIG_NO_ERROR_ON_MISMATCH=y \
|
|
|
|
INSTALL_MOD_PATH="$pkgdir" modules_install
|
|
|
|
}
|
|
|
|
|
|
|
|
sha512sums="d87dd54152980b30012fead62e639dde6ff0862d376790eac32800aeffd91482a220c7b1f233933a1879796dcaa3722e86c42a5f0e4df4168ae1f65362952779 linux-samsung-i9305-fa8fa332fdec11744ffe0c742775cc22efe0d041.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
|
|
|
c1c667ff55603101ae0bb3cfb085a0536a4e817ee9e116b62bead734f758099b1abcbe21c2d8e4790de2a62bd48e3b60ae8e0eb529b829ad71e2ddf1e0296b8d config-samsung-i9305.armhf
|
2017-10-04 17:20:17 +00:00
|
|
|
d80980e9474c82ba0ef1a6903b434d8bd1b092c40367ba543e72d2c119301c8b2d05265740e4104ca1ac5d15f6c4aa49e8776cb44264a9a28dc551e0d1850dcc compiler-gcc6.h"
|