130 lines
4.1 KiB
Bash
130 lines
4.1 KiB
Bash
# Co-Maintainer: Achill Gilgenast <achill@achill.org>
|
|
maintainer="Aelin <aelin@postmarketos.org>"
|
|
pkgname=linux-next
|
|
pkgver=7.2_git20260720
|
|
pkgrel=0
|
|
_nextver="${pkgver#*_git}"
|
|
pkgdesc="Linux next kernel"
|
|
# armhf: pmbootstrap cannot dynamically choose a defconfig, so it ends up using multi_v7_defconfig which isn't correct
|
|
# s390x: kconfigcheck is not ready for it yet
|
|
arch="all !armhf !s390x"
|
|
_flavor="next"
|
|
url="https://kernel.org"
|
|
license="GPL-2.0-only"
|
|
options="
|
|
!check
|
|
!strip
|
|
!tracedeps
|
|
pmb:cross-native
|
|
pmb:generic-kernel
|
|
pmb:kconfigcheck-community
|
|
pmb:kconfigcheck-immutable
|
|
pmb:kconfigcheck-lockdown
|
|
pmb:kconfigcheck-rust
|
|
pmb:kconfigcheck-selinux
|
|
pmb:kconfigcheck-uefi
|
|
pmb:kconfigcheck-virt
|
|
"
|
|
makedepends="
|
|
bash
|
|
bison
|
|
clang
|
|
clang-libclang
|
|
diffutils
|
|
elfutils-dev
|
|
findutils
|
|
flex
|
|
kmod
|
|
linux-headers
|
|
lld
|
|
llvm
|
|
openssl-dev
|
|
pahole
|
|
perl
|
|
postmarketos-installkernel
|
|
python3
|
|
rust
|
|
rust-bindgen
|
|
rust-src
|
|
rustfmt
|
|
sed
|
|
zstd
|
|
"
|
|
|
|
# powerpc boot wrapper patches:
|
|
# Necessary for compilation without cross GCC in PATH, cherry-picked from
|
|
# Nathan's fork, he does not have time to upstream them right now but would be
|
|
# happy if someone else did:
|
|
# https://lore.kernel.org/linuxppc-dev/aXs8sgAcci9FKKpx@luna/
|
|
source="
|
|
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/snapshot/linux-next-next-$_nextver.tar.gz
|
|
|
|
0001-WIP-arch-powerpc-boot-Support-LLVM-1-in-wrapper-scri.patch
|
|
0002-WIP-arch-powerpc-boot-Add-z-norelro.patch
|
|
|
|
config-next.aarch64
|
|
config-next.armv7
|
|
config-next.loongarch64
|
|
config-next.ppc64le
|
|
config-next.riscv64
|
|
config-next.x86
|
|
config-next.x86_64
|
|
"
|
|
builddir="$srcdir/linux-next-next-$_nextver"
|
|
|
|
case "$CARCH" in
|
|
aarch64*) _carch="arm64" ;;
|
|
arm*) _carch="arm" ;;
|
|
loongarch*) _carch="loongarch" ;;
|
|
ppc*) _carch="powerpc" ;;
|
|
riscv*) _carch="riscv" ;;
|
|
s390x) _carch="s390" ;;
|
|
x86) _carch="i386" ;;
|
|
x86_64) _carch="x86_64" ;;
|
|
esac
|
|
|
|
prepare() {
|
|
default_prepare
|
|
cp "$srcdir/config-$_flavor.$CARCH" .config
|
|
}
|
|
|
|
build() {
|
|
unset LDFLAGS
|
|
make ARCH="$_carch" LLVM=1 \
|
|
KBUILD_BUILD_VERSION="$((pkgrel + 1 ))-$_flavor"
|
|
}
|
|
|
|
package() {
|
|
local _install
|
|
case "$CARCH" in
|
|
arm*|aarch64|riscv*) _install="zinstall dtbs_install" ;;
|
|
*) _install="install" ;;
|
|
esac
|
|
|
|
make modules_install $_install \
|
|
ARCH="$_carch" \
|
|
LLVM=1 \
|
|
INSTALL_PATH="$pkgdir"/boot \
|
|
INSTALL_MOD_PATH="$pkgdir"/usr \
|
|
INSTALL_MOD_STRIP=1 \
|
|
INSTALL_DTBS_PATH="$pkgdir"/boot/dtbs
|
|
|
|
rm -f "$pkgdir"/usr/lib/modules/*/build "$pkgdir"/usr/lib/modules/*/source
|
|
|
|
install -D "$builddir"/include/config/kernel.release \
|
|
"$pkgdir"/usr/share/kernel/"$_flavor"/kernel.release
|
|
}
|
|
|
|
sha512sums="
|
|
abd78bf69ed42ea0856ef955e9d42ce98cd8ab12cff9eeaf7e7c4d1a642be0e90e1e9e8a718d4badc290192d872294f9411578bb467a7e8c1f64354559ba94c8 linux-next-next-20260720.tar.gz
|
|
1f11df2480e9f691573283597160b4c806e492cdca4825f3acb3afb70bde43abfab487bcde1f5553b431a702a0039479d041b0ce7859970e706b5a51d2ad8fb0 0001-WIP-arch-powerpc-boot-Support-LLVM-1-in-wrapper-scri.patch
|
|
302c20c85559fc9b3b2420ed25be1bfbb76c87f2a470e4141c32e9542cf1f5c6b3b5a7847231a3eaa0f6bc0e5942d0c1599e807175dcf5e63469704c3d6adde3 0002-WIP-arch-powerpc-boot-Add-z-norelro.patch
|
|
5c9c513315948f1bb7780175d1d593edbf3efb7e9421d5504dc9f9204a5cb8d00ca1747262c71785fd997596b4075bf892f285b7b703cf11d89bd888cc8b7590 config-next.aarch64
|
|
09e3c8b8eed7941e9694dac882568ccaf22ab4f49f88dc8f3958c6996833c8810aaa783f63b6ac81266c99966a77d48497d8b88428bae6e4ea6d5862df3e6a27 config-next.armv7
|
|
85185ef86b7977e71a910edc0bd63e057c507fbcd8d4dbbebc0d57cd2c7e476afaff1833f971235ec4a1df3e1703dc7e8df97ba4a1d93fa37dbdbb1877dccdaa config-next.loongarch64
|
|
489d237dc3cbdcc3e7f327c9ef270425fe1a2350859c8f77a765571d3d39706aac93ba8307e2bb368b7ebb7bac059de773f7a5d8802b18b4eb665809160744cc config-next.ppc64le
|
|
525bb7c87562cfa792676cb2e75abd57aa9074f33d15daced45b6526614438aee460747fb03a77cc8ba3082cd9f469799d90c221616f7a1aa4cd99ce4a2f7266 config-next.riscv64
|
|
c9b3d8fbc2a0c22818f9f0a095df4e362fb14c4e21c1f4c4736be5442ae71d4e1b536b6d6fbb25b84da05bf87fc8e8db3a081645fe0d228d97065c141caa57b9 config-next.x86
|
|
cf9b73533491934c110794b3150d63046ebd6bb4af02268639c1645f74c051538b858d8db0a912f64ed2f551c534b5ffe90039d913e10baa8f6f3b0731b4a77d config-next.x86_64
|
|
"
|