pmaports/device/testing/linux-next/APKBUILD
Caleb Connolly 18462c566a
testing/linux-next: new aport (MR 4967)
Introduce a linux-next kernel with postmarketOS configs and some
additional device specific configs enabled.

This kernel package will be updated daily to the latest -next tag.
breakages expected. It is designed to be used in tandem with a generic
ARM64 device package to provide a bleeding edge option for those with
EFI capable bootloaders.

Signed-off-by: Caleb Connolly <caleb@postmarketos.org>
2024-06-19 22:43:36 +02:00

73 lines
2 KiB
Text

# Reference: <https://postmarketos.org/vendorkernel>
# Kernel config based on: arch/arm64/configs/defconfig
pkgname=linux-next
pkgver=6.9_git20240325
pkgrel=0
_nextver="${pkgver#*_git}"
pkgdesc="Linux next kernel"
arch="aarch64"
_carch="arm64"
_flavor="generic-trailblazer"
url="https://kernel.org"
license="GPL-2.0-only"
options="!strip !check !tracedeps pmb:cross-native"
source="
https://gitlab.com/linux-kernel/linux-next/-/archive/next-$_nextver/linux-next-next-$_nextver.tar.gz
devices.config
pmos.config
"
makedepends="
bash
bc
bison
devicepkg-dev
findutils
flex
openssl-dev
perl
zstd
git
"
builddir="$srcdir/linux-next-next-$_nextver"
prepare() {
default_prepare
cp "$srcdir/pmos.config" "$builddir"/arch/"$_carch"/configs/
cp "$srcdir/devices.config" "$builddir"/arch/"$_carch"/configs/
# Generate .config
unset LDFLAGS
make ARCH="$_carch" CC="${CC:-gcc}" \
KBUILD_BUILD_VERSION="$((pkgrel + 1 ))-next-$_nextver" \
defconfig pmos.config devices.config
}
build() {
unset LDFLAGS
make O="$_outdir" ARCH="$_carch" CC="${CC:-gcc}" \
KBUILD_BUILD_VERSION="$((pkgrel + 1 ))-postmarketOS"
}
package() {
install -Dm644 "$builddir/arch/$_carch/boot/vmlinuz.efi" \
"$pkgdir/boot/linux.efi"
make modules_install dtbs_install \
ARCH="$_carch" \
INSTALL_PATH="$pkgdir"/boot/ \
INSTALL_MOD_PATH="$pkgdir" \
INSTALL_MOD_STRIP=1 \
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/next-"$_nextver"/kernel.release
}
sha512sums="
8b0aa0b150887f56fadb7ce2fbb67a77118595ad1f0a0166bfd6539e93b43b6156b9af25e5f62c44cc9e0c7bb3c8948c9c2e4cc4d3821b2d1e6c4bcb115b80fc linux-next-next-20240325.tar.gz
e5b8530b8410d41d60c6c3a5cb4f73cdcdbcf432a8453ddb0b8901bf20083df4ae8c44ff2771aaa17c4a78afddfd604f929f05839bb513ad60809fbd7adb7056 devices.config
4be8c6f12ab31b709cb67cb783830badae019a79a8e81bf050d509cdfc3b3295b84392b15f357e4c84bc4222fda34979e7a945544e1b5cb4916fb111d56aa70c pmos.config
"