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

61 lines
1.8 KiB
Text
Raw Normal View History

_flavor=postmarketos-grate
_commit="79c504641f2f2cecc4e345b5a2890f82d12d6a11"
_config="config-$_flavor.armv7"
pkgname=linux-postmarketos-grate
pkgver=5.8.0
pkgrel=0
arch="armv7"
pkgdesc="Linux kernel with experimental patches for Tegra"
url="https://postmarketos.org"
makedepends="perl sed installkernel bash gmp-dev bc linux-headers elfutils-dev
devicepkg-dev bison flex openssl-dev xz findutils"
options="!strip !check !tracedeps pmb:cross-native"
source="
$pkgname-$pkgver-$_commit.tar.gz::https://github.com/grate-driver/linux/archive/$_commit.tar.gz
$_config
"
license="GPL-2.0-only"
_carch="arm"
_ksrcdir="$srcdir/linux-$_commit"
prepare() {
default_prepare
mkdir -p "$srcdir"/build
cp -v "$srcdir"/$_config "$srcdir"/build/.config
make -C "$_ksrcdir" O="$srcdir"/build ARCH="$_carch" \
olddefconfig
}
build() {
cd "$srcdir"/build
unset LDFLAGS
make ARCH="$_carch" CC="${CC:-gcc}" \
KBUILD_BUILD_VERSION="$((pkgrel + 1 ))-Alpine"
}
package() {
install -Dm644 "$srcdir/build/arch/$_carch/boot/"*zImage \
"$pkgdir/boot/vmlinuz-$_flavor"
install -D "$srcdir/build/include/config/kernel.release" \
"$pkgdir/usr/share/kernel/$_flavor/kernel.release"
cd "$srcdir"/build
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="a678be8e466400b57266dca856f28274c00e9d3d1ebcfe1a142b64c1e88754d6fcd04587664f65c464028e898382e30faf49c8ecc04f7e076323163d0a2fa519 linux-postmarketos-grate-5.8.0-79c504641f2f2cecc4e345b5a2890f82d12d6a11.tar.gz
46dd50c6ba8fd01bf6a69f5b907da40c47c0412466fbb80f5aa79f3f9bd424bd609ecee11dd557d12649759be626aa4dd37071585b8ce0e026d48be1f4612d0c config-postmarketos-grate.armv7"