110 lines
3.3 KiB
Text
110 lines
3.3 KiB
Text
|
# 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)
|
||
|
|
||
|
_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
|
||
|
pkgrel=0
|
||
|
arch="aarch64"
|
||
|
pkgdesc="LineageOS kernel for Nexus 6P Angler"
|
||
|
url="https://github.com/LineageOS/android_kernel_huawei_angler"
|
||
|
depends="postmarketos-mkinitfs"
|
||
|
makedepends="perl sed installkernel bash gmp-dev bc linux-headers elfutils-dev python2"
|
||
|
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"
|
||
|
HOSTCC="${CC:-gcc}"
|
||
|
HOSTCC="${HOSTCC#${CROSS_COMPILE}}"
|
||
|
|
||
|
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/"
|
||
|
|
||
|
mkdir -p "$srcdir"/build
|
||
|
cp "$srcdir"/$_config "$srcdir"/build/.config || return 1
|
||
|
echo "--[ silentoldconfig ]--"
|
||
|
yes "" | make -C "$ksrcdir" O="$srcdir"/build ARCH="$_carch" HOSTCC="$HOSTCC" \
|
||
|
oldconfig
|
||
|
}
|
||
|
|
||
|
|
||
|
|
||
|
# this is so we can do: 'abuild menuconfig' to reconfigure kernel
|
||
|
menuconfig() {
|
||
|
cd "$srcdir"/build || return 1
|
||
|
echo "--[ menuconfig ]--"
|
||
|
make ARCH="$_carch" menuconfig
|
||
|
cp .config "$startdir"/$_config
|
||
|
}
|
||
|
|
||
|
build() {
|
||
|
cd "$srcdir"/build
|
||
|
unset LDFLAGS
|
||
|
make ARCH="$_carch" CC="${CC:-gcc}" \
|
||
|
KBUILD_BUILD_VERSION="$((pkgrel + 1 ))-Alpine" CONFIG_NO_ERROR_ON_MISMATCH=y \
|
||
|
|| return 1
|
||
|
}
|
||
|
|
||
|
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"
|
||
|
}
|
||
|
|
||
|
sha512sums="fb4328a3ade80670ca3c2674a61a4c524771d6eaebdc477943f2cc4bb33d845e8bcd7282941db708026bfefe6820cc1010d784d8afed5b91289d4e7e9ea1d7cd linux-huawei-angler-04d1557af1259b211609fa41adbe852b5f9cf2da.tar.gz
|
||
|
ca281ff4a694725ebb1a8bad597220d3d74cf40d1037f69236ed3ece58c5246264b9ea7e0e1e46046d8597a4c6582bf24c972990461ab15b0b426606d3aaab9f config-huawei-angler.aarch64
|
||
|
d80980e9474c82ba0ef1a6903b434d8bd1b092c40367ba543e72d2c119301c8b2d05265740e4104ca1ac5d15f6c4aa49e8776cb44264a9a28dc551e0d1850dcc compiler-gcc6.h
|
||
|
ad0182a483791fc88e058838bc331b2f04a75ba291e763767babdb815efadfc3b4fda97e69e2e3f00a426cabea088e35297a92bd287592597d1e309be68ee92c kernel-use-the-gnu89-standard-explicitly.patch"
|