2017-09-04 17:11:42 +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/arm64/configs/lineageos_angler_defconfig
|
|
|
|
# Changes:
|
|
|
|
# - enable devtmpfs (needed for udev -> touch support in weston)
|
2017-10-11 15:11:05 +00:00
|
|
|
# - disable ANDROID_PARANOID_NETWORK (removes network restrictions)
|
2017-09-04 17:11:42 +00:00
|
|
|
|
|
|
|
_vendor=huawei
|
|
|
|
_flavor=huawei-angler
|
|
|
|
_hash="04d1557af1259b211609fa41adbe852b5f9cf2da"
|
|
|
|
_config="config-${_flavor}.aarch64"
|
|
|
|
|
|
|
|
pkgname=linux-${_flavor}
|
|
|
|
pkgver=3.10.73
|
|
|
|
case $pkgver in
|
|
|
|
*.*.*) _kernver=${pkgver%.*};;
|
|
|
|
*.*) _kernver=$pkgver;;
|
|
|
|
esac
|
2018-11-30 20:56:06 +00:00
|
|
|
pkgrel=8
|
2017-09-04 17:11:42 +00:00
|
|
|
arch="aarch64"
|
|
|
|
pkgdesc="LineageOS kernel for Nexus 6P Angler"
|
|
|
|
url="https://github.com/LineageOS/android_kernel_huawei_angler"
|
2018-02-17 17:26:31 +00:00
|
|
|
depends=""
|
2018-10-01 06:44:18 +00:00
|
|
|
makedepends="perl sed installkernel bash gmp-dev bc linux-headers elfutils-dev python2 gcc6"
|
2017-09-04 17:11:42 +00:00
|
|
|
options="!strip !check !tracedeps"
|
|
|
|
install=
|
|
|
|
source="
|
|
|
|
$pkgname-$_hash.tar.gz::https://github.com/LineageOS/android_kernel_huawei_angler/archive/${_hash}.tar.gz
|
|
|
|
${_config}
|
|
|
|
compiler-gcc6.h
|
|
|
|
kernel-use-the-gnu89-standard-explicitly.patch
|
|
|
|
"
|
|
|
|
subpackages=""
|
|
|
|
license="GPL2"
|
|
|
|
|
|
|
|
_abi_release=${pkgver}
|
|
|
|
_carch="arm64"
|
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-09-04 17:11:42 +00:00
|
|
|
|
|
|
|
ksrcdir="$srcdir/android_kernel_huawei_angler-${_hash}"
|
|
|
|
|
|
|
|
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/"
|
|
|
|
|
2017-10-20 00:07:00 +00:00
|
|
|
mkdir -p "$srcdir"/build
|
|
|
|
cp "$srcdir"/$_config "$srcdir"/build/.config
|
2017-09-04 17:11:42 +00:00
|
|
|
echo "--[ silentoldconfig ]--"
|
2017-10-20 00:07:00 +00:00
|
|
|
yes "" | make -C "$ksrcdir" O="$srcdir"/build ARCH="$_carch" HOSTCC="$HOSTCC" \
|
|
|
|
oldconfig
|
2017-09-04 17:11:42 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
build() {
|
|
|
|
cd "$srcdir"/build
|
|
|
|
unset LDFLAGS
|
|
|
|
make ARCH="$_carch" CC="${CC:-gcc}" \
|
2017-10-04 15:05:00 +00:00
|
|
|
KBUILD_BUILD_VERSION="$((pkgrel + 1 ))-Alpine" CONFIG_NO_ERROR_ON_MISMATCH=y
|
2017-09-04 17:11:42 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
package() {
|
|
|
|
install -Dm644 "$srcdir/build/arch/arm64/boot/Image.gz-dtb" \
|
|
|
|
"$pkgdir/boot/vmlinuz-$_flavor"
|
|
|
|
|
|
|
|
install -D "$srcdir/build/include/config/kernel.release" \
|
|
|
|
"$pkgdir/usr/share/kernel/$_flavor/kernel.release"
|
|
|
|
}
|
|
|
|
|
2017-09-14 18:16:16 +00:00
|
|
|
sha512sums="de3f5ab1c6609b94d416b0eebd5ae948698f0f6ec81e84fbee152df7c2778d8df94cec43b5abca583fe5977bb28037b3b6d2c3ff652a50493a1f24da31dadd7f linux-huawei-angler-04d1557af1259b211609fa41adbe852b5f9cf2da.tar.gz
|
2017-10-23 19:25:40 +00:00
|
|
|
aa46647bd35d1938ddf03ca2d2240e06d928bf83408b50642f9f8bfa3227d4d897dd3b609b77db25ccce7c09332163345ff70beeb6b99b4921624298bbd3d332 config-huawei-angler.aarch64
|
2017-09-04 17:11:42 +00:00
|
|
|
d80980e9474c82ba0ef1a6903b434d8bd1b092c40367ba543e72d2c119301c8b2d05265740e4104ca1ac5d15f6c4aa49e8776cb44264a9a28dc551e0d1850dcc compiler-gcc6.h
|
|
|
|
ad0182a483791fc88e058838bc331b2f04a75ba291e763767babdb815efadfc3b4fda97e69e2e3f00a426cabea088e35297a92bd287592597d1e309be68ee92c kernel-use-the-gnu89-standard-explicitly.patch"
|