pmaports/main/linux-postmarketos-allwinner/APKBUILD
Martijn Braam 5cf1ee92e8 pine-dontbeevil: Fixed sound and battery (!348)
* Fixed audio
* Fixed battery handeling
* Added fix for touchscreen not working for everyone
* Use newer upstream kernel

[ci:skip-build]: won't finish in time, Martijn made sure that it builds.
2019-05-06 22:01:34 +00:00

90 lines
2.7 KiB
Text

_flavor=postmarketos-allwinner
_config="config-${_flavor}.${CARCH}"
pkgname=linux-${_flavor}
pkgver=5.1.0_git20190506
pkgrel=0
arch="aarch64"
pkgdesc="Kernel fork with PinePhone Don't be evil patches"
url="https://kernel.org/"
depends=""
makedepends="devicepkg-dev perl sed installkernel bash gmp-dev bc linux-headers elfutils-dev openssl-dev file bison flex"
options="!strip !check !tracedeps"
install=
_commit="45eccd979a56d86e337e070b9a0aceecc43c20db"
source="
${pkgname}-${_commit}.tar.gz::https://gitlab.com/pine64-org/linux/-/archive/${_commit}/linux-${_commit}.tar.gz
config-${_flavor}.aarch64
sun50i-a64-dontbeevil.dts
"
subpackages=""
license="GPL2"
_abi_release=$_pkgver
_carch=${CARCH}
case "$_carch" in
aarch64*) _carch="arm64" ;;
arm*) _carch="arm" ;;
ppc*) _carch="powerpc" ;;
s390*) _carch="s390" ;;
esac
HOSTCC="${CC:-gcc}"
HOSTCC="${HOSTCC#${CROSS_COMPILE}}"
builddir="$srcdir/linux-${_commit}"
prepare() {
default_prepare
cp "$srcdir"/sun50i-a64-dontbeevil.dts "$builddir"/arch/arm64/boot/dts/allwinner/
REPLACE_GCCH=0 \
downstreamkernel_prepare "$srcdir" "$builddir" "$_config" "$_carch" "$HOSTCC"
}
build() {
unset LDFLAGS
make ARCH="$_carch" CC="${CC:-gcc}" \
KBUILD_BUILD_VERSION="$((pkgrel + 1 ))-${_flavor}" \
CFLAGS_MODULE=-fno-pic
}
package() {
# kernel.release
install -D "$builddir/include/config/kernel.release" \
"$pkgdir/usr/share/kernel/$_flavor/kernel.release"
# zImage (find the right one)
cd "$builddir/arch/$_carch/boot"
_target="$pkgdir/boot/vmlinuz-$_flavor"
for _zimg in zImage-dtb Image.gz-dtb *zImage Image; do
[ -e "$_zimg" ] || continue
msg "zImage found: $_zimg"
install -Dm644 "$_zimg" "$_target"
break
done
if ! [ -e "$_target" ]; then
error "Could not find zImage in $PWD!"
return 1
fi
cd "$builddir"
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="ec525dc86ce680aaba7edc2d2be8e3b38e3d4957d27c701e0f82b8d45f81694cdabacc3cb0dde375921afbd225b5e0cb83fde98694bd85d653ceb8c5f3f0af24 linux-postmarketos-allwinner-45eccd979a56d86e337e070b9a0aceecc43c20db.tar.gz
5a04df0f76344b247cab894c8a41b2683e75b08209f1a957948a91f99979080ab07a1695ee266d17a4a85146145cb677ccc63a40722b1ae43ba0a7886f28de92 config-postmarketos-allwinner.aarch64
79496ca4fbb48d27acef4e7592a05f31d5548aeae0f4a7032325b7baf8defc358359912aedd8ce136b266766f24f42e2a15d2ad9ef4d33d8398608ac74ba71f3 sun50i-a64-dontbeevil.dts"