pmaports/device/testing/linux-postmarketos-stericsson/APKBUILD

78 lines
2.3 KiB
Text
Raw Normal View History

# Reference: <https://postmarketos.org/vendorkernel>
# Maintainer: Newbyte <newbyte@disroot.org>
# Kernel config based on: arch/arm/configs/u8500_defconfig
_flavor="postmarketos-stericsson"
_config="config-$_flavor.armv7"
pkgname=linux-$_flavor
pkgver=6.1
pkgrel=1
pkgdesc="Mainline kernel for ST-Ericsson NovaThor devices"
arch="armv7"
_carch="arm"
url="https://kernel.org"
license="GPL-2.0-only"
options="!strip !check !tracedeps
pmb:cross-native
pmb:kconfigcheck-waydroid
pmb:kconfigcheck-containers
pmb:kconfigcheck-zram
pmb:kconfigcheck-nftables
"
makedepends="
bash
bison
findutils
gmp-dev
flex
mpc1-dev
mpfr-dev
openssl-dev
perl
postmarketos-installkernel
"
case $pkgver in
*.*.*) _kernver=${pkgver%.0};;
*.*) _kernver=$pkgver;;
esac
source="
https://cdn.kernel.org/pub/linux/kernel/v${_kernver%%.*}.x/linux-$_kernver.tar.xz
config-$_flavor.armv7
0001-Disable-busy-detect-on-Ux500-MMCI.patch
0002-pwm-ab8500-Get-HW-ID-from-reg-value.patch
"
builddir="$srcdir/linux-${_kernver//_/-}"
prepare() {
default_prepare
cp "$srcdir/config-$_flavor.$CARCH" .config
}
build() {
unset LDFLAGS
# V=1: workaround for pma#1990
make ARCH="$_carch" CC="${CC:-gcc}" \
KBUILD_BUILD_VERSION=$((pkgrel + 1 )) \
V=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"/boot/dtbs
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="
6ed2a73c2699d0810e54753715635736fc370288ad5ce95c594f2379959b0e418665cd71bc512a0273fe226fe90074d8b10d14c209080a6466498417a4fdda68 linux-6.1.tar.xz
a84a5fbd68f8d68ab92a8c181eeec65309a5f062b93e3b5b143aa0adc4201bfb4d2f7daafa55d31ce593cf73b3bb9251ace9a02848f0c236e53861d12f2692f6 config-postmarketos-stericsson.armv7
2850f2c7a4405ed13c6ae18c97a1e8b3b0be545fb517a0b692666e559efdc00981a177f556c4c8fb6c8115d1c29674b6487a10700d9c30317ffb8d953c595281 0001-Disable-busy-detect-on-Ux500-MMCI.patch
3abf1a2b28077a2784c33f468facf44c2312f8bb54422463cffcb92a0eaa1f8954f1fa5f8f5acac0262495c08692a2161325c1ca68f7d23aecb36c1f9138d7ef 0002-pwm-ab8500-Get-HW-ID-from-reg-value.patch
"