pmaports/device/testing/linux-huawei-kiwi/APKBUILD
BO41 53fc41e7d0
huawei-kiwi: rework to use mainline kernel (MR 1826)
[ci:skip-build]: already built successfully in CI
2021-01-08 00:07:57 -08:00

50 lines
1.6 KiB
Text

# Reference: <https://postmarketos.org/vendorkernel>
# Kernel config based on: arch/arm64/configs/msm8939_defconfig
pkgname=linux-huawei-kiwi
pkgver=5.9_rc7
pkgrel=0
pkgdesc="Huawei Honor 5X kernel fork"
arch="aarch64"
_carch="arm64"
_flavor="huawei-kiwi"
url="https://git.sr.ht/~bo41/msm8939-mainline-linux"
license="GPL-2.0-only"
options="!strip !check !tracedeps pmb:cross-native"
makedepends="bash bc bison devicepkg-dev installkernel flex openssl-dev perl"
_repository="msm8939-mainline-linux"
_commit="cf997bbb83ffb33f40d3707419e0141bb668dbbc"
_config="config-$_flavor.$arch"
source="
$pkgname-$_commit.tar.gz::$url/archive/$_commit.tar.gz
$_config
"
builddir="$srcdir/$_repository-$_commit"
prepare() {
default_prepare
cp "$srcdir/config-$_flavor.$CARCH" .config
}
build() {
unset LDFLAGS
make ARCH="$_carch" CC="${CC:-gcc}" \
KBUILD_BUILD_VERSION="$((pkgrel + 1 ))-postmarketOS"
}
package() {
mkdir -p "$pkgdir"/boot
make zinstall modules_install dtbs_install \
ARCH="$_carch" \
INSTALL_PATH="$pkgdir"/boot \
INSTALL_MOD_PATH="$pkgdir" \
INSTALL_DTBS_PATH="$pkgdir"/usr/share/dtb
rm -f "$pkgdir"/lib/modules/*/build "$pkgdir"/lib/modules/*/source
install -D "$builddir"/include/config/kernel.release \
"$pkgdir"/usr/share/kernel/$_flavor/kernel.release
}
sha512sums="d0126c017b5253039800c6e743e7e8c178e6745c76f15078fee025dcd9584cfd888c1cc2acac5d8718f2635e0db30c4e2867124a818eb77b64da5cc4d866d0ba linux-huawei-kiwi-cf997bbb83ffb33f40d3707419e0141bb668dbbc.tar.gz
89fb4b215a3e6144b6c3ccd57af694f561c91bfa3c4c93093cb15fc57717b81720d68f9c0298c66eb9efe2173b71a5c7ccbbb812387bc2af63f010fec2918a52 config-huawei-kiwi.aarch64"