pmaports/device/linux-huawei-angler/APKBUILD

110 lines
3.3 KiB
Text
Raw Normal View History

# 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=2
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="de3f5ab1c6609b94d416b0eebd5ae948698f0f6ec81e84fbee152df7c2778d8df94cec43b5abca583fe5977bb28037b3b6d2c3ff652a50493a1f24da31dadd7f linux-huawei-angler-04d1557af1259b211609fa41adbe852b5f9cf2da.tar.gz
79eef863f3d6355511cb35673a368155574dad13f4f8f24fa92bd36af6ffb74c8036f1d5fc773e644676d72bf96c7443bc26d8036e8d7ba0ac3eece167556a71 config-huawei-angler.aarch64
d80980e9474c82ba0ef1a6903b434d8bd1b092c40367ba543e72d2c119301c8b2d05265740e4104ca1ac5d15f6c4aa49e8776cb44264a9a28dc551e0d1850dcc compiler-gcc6.h
ad0182a483791fc88e058838bc331b2f04a75ba291e763767babdb815efadfc3b4fda97e69e2e3f00a426cabea088e35297a92bd287592597d1e309be68ee92c kernel-use-the-gnu89-standard-explicitly.patch"