pmaports/main/linux-postmarketos-allwinner/APKBUILD
Martijn Braam 74142b4d67 pine-dontbeevil: Touch and wifi (!331)
* Inverted the X-axis on the touchscreen
* Enabled the driver for the wifi/bluetooth chip and added it to the dts
* Added a horrible hack for making the touchscreen work

This also decreases the kernel version because the previous version I've
used was technically incorrect.

[ci:skip-build]: doesn't finish in time
2019-04-24 13:50:00 +00:00

92 lines
2.9 KiB
Text

_flavor=postmarketos-allwinner
_config="config-${_flavor}.${CARCH}"
pkgname=linux-${_flavor}
pkgver=5.0.0_git20190420
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="4b05d9617e12dc72882e652307effaaa25d1a468"
source="
${pkgname}-${_commit}.tar.gz::https://gitlab.com/pine64-org/linux/-/archive/${_commit}/linux-${_commit}.tar.gz
config-${_flavor}.aarch64
dtb-add.patch
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="42818ce72ee8ca4d5017ac2ff1d1837bd7a39b34eabeff9aca8f616aa019fd97536e906e768c1673c6afecbbe05513991d05c01a835c8f0f9e8cfa794de42ea7 linux-postmarketos-allwinner-4b05d9617e12dc72882e652307effaaa25d1a468.tar.gz
2d48abe7f7122b726cc02a7e6d9970dfe1a5fe5d35e6b4231de29e51fcca975cff7c6613ffb3bf9f4c1b991ee6c9ad309fc40bfd452d88e05fd4b69eaa9c419f config-postmarketos-allwinner.aarch64
3b5580adb3c8a4c88da5cd23d1cfdb7bfad9f544207c21d7d80b2086733460a627d9a49f4d67ac4b1d954f078af655580c7fa0b8d75980ea08df319ff3e757be dtb-add.patch
a063fdfc5fd67de8fd6daf21bc6815fe7b4422e20484761b425ce8bc72e50d1e16c2bcad81786c58781b603c82e390150fb7065c7fd678f18fe2622ee9230f67 sun50i-a64-dontbeevil.dts"