pmaports/main/linux-postmarketos-allwinner/APKBUILD
Danct12 d44646737e
device-pine-pinetab: enable bluetooth (!553)
[ci:skip-build]: does not finish on CI

Signed-off-by: Danct12 <danct12@disroot.org>
2019-08-19 16:57:22 +02:00

95 lines
3.1 KiB
Text

_flavor=postmarketos-allwinner
_config="config-${_flavor}.${CARCH}"
pkgname=linux-${_flavor}
pkgver=5.3.0_git20190726
pkgrel=4
arch="aarch64"
pkgdesc="Kernel fork with PinePhone Don't be evil patches"
url="https://gitlab.com/pine64-org/linux/"
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="577c793d924a0455b2b555d468cf50f97985b6f6"
_commit_rtl8723cs="1c9c0cb9d335626a66d8063399c6e16751ecc1a8"
source="
${pkgname}-${_commit}.tar.gz::https://gitlab.com/pine64-org/linux/-/archive/${_commit}/linux-${_commit}.tar.gz
rtl8723cs-${_commit_rtl8723cs}.tar.gz::https://github.com/Icenowy/rtl8723cs/archive/${_commit_rtl8723cs}.tar.gz
config-${_flavor}.aarch64
touch-dts.patch
rtl8723cs.patch
"
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 -rv "$srcdir"/rtl8723cs-${_commit_rtl8723cs} "$builddir"/drivers/staging/rtl8723cs
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="88aab0956b4bb3a240b40448b46b0edbfefd038759cd4c00fe89357e666e5be054ad3cd9455de2fc5670bd656c9414bbc66580723c8532a744d06ab2a4edbac2 linux-postmarketos-allwinner-577c793d924a0455b2b555d468cf50f97985b6f6.tar.gz
e4e585ce787301eeee07ff8e45a97343456808a47ed237053f0c83a49b4958a75514def4c5263f4507a282ea90bd2bb3f8f468839f7e5fd05ae947a796c8c6b9 rtl8723cs-1c9c0cb9d335626a66d8063399c6e16751ecc1a8.tar.gz
d5059f0303f84c0ca005c0fcd3bf1a1ea989377c8b3bee698ed05732a198046f6fd0eb3948c3bce8d643bdaa207197bd34c3bfb953ad937abd332dddcfdf6081 config-postmarketos-allwinner.aarch64
5f2285e4eb262a9429c73599871c3fecbb858a388774bc7cba7631987ed1dc4a14cd7606e8fefc655c5128851fc853132f0a081e3d710c9266739af92f4d37e8 touch-dts.patch
bf06f931fb543f4bf2f0567902c3021de237fc9684f92af2ed3e956f869d907c9cff1cf3e11a72eb97bda47c8f8b28aff226634f641bdffa04b08d434f419faa rtl8723cs.patch"