pmaports/main/linux-postmarketos-stericsson/APKBUILD

50 lines
1.5 KiB
Text
Raw Normal View History

# Reference: <https://postmarketos.org/vendorkernel>
# Kernel config based on: arch/arm/configs/u8500_defconfig
_flavor="postmarketos-stericsson"
pkgname=linux-$_flavor
pkgver=5.8_rc2
pkgrel=1
pkgdesc="Mainline kernel fork for ST-Ericsson NovaThor devices"
arch="armv7"
_carch="arm"
url="https://github.com/stericsson-mainline/linux"
license="GPL-2.0-only"
options="!strip !check !tracedeps pmb:cross-native"
makedepends="bison findutils flex installkernel openssl-dev perl"
# Source
_tag=v${pkgver//_/-}-stericsson
source="
$pkgname-$_tag.tar.gz::$url/archive/$_tag.tar.gz
config-$_flavor.armv7
"
builddir="$srcdir/linux-${_tag#v}"
prepare() {
default_prepare
cp "$srcdir/config-$_flavor.$CARCH" .config
}
build() {
unset LDFLAGS
make ARCH="$_carch" CC="${CC:-gcc}" \
KBUILD_BUILD_VERSION=$((pkgrel + 1 ))
}
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="c712ea22e4f89d82464be20b8a5a9192b71abae3cfcc1cd64cf20af5a5c0c8b04decd17a149ba6f134ce2a697c5deb8c603c4894641adae7e3028ecb7de3051c linux-postmarketos-stericsson-v5.8-rc2-stericsson.tar.gz
a6e8197fb981af5e4915cb037afb31c1f75e169a351eabe16ee7ac1a99e93ea8a90d453e954a7d58c25e66db1c5136ff3d3ce6340fcc6b362f120ab40ac7820d config-postmarketos-stericsson.armv7"