Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7966>
120 lines
3.4 KiB
Bash
120 lines
3.4 KiB
Bash
# Co-Maintainer: Achill Gilgenast <achill@achill.org>
|
|
maintainer="Aelin <aelin@postmarketos.org>"
|
|
pkgname=linux-postmarketos-mainline
|
|
pkgver=6.19
|
|
pkgrel=0
|
|
_rel=${pkgver#*_p}
|
|
_kver=${pkgver%_p*}
|
|
_kver=${_kver//_/-}
|
|
pkgdesc="Mainline 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="mainline"
|
|
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-rust
|
|
pmb:kconfigcheck-uefi
|
|
pmb:kconfigcheck-virt
|
|
"
|
|
makedepends="
|
|
bison
|
|
clang
|
|
clang-libclang
|
|
diffutils
|
|
elfutils-dev
|
|
findutils
|
|
flex
|
|
linux-headers
|
|
lld
|
|
llvm
|
|
openssl-dev
|
|
pahole
|
|
perl
|
|
postmarketos-installkernel
|
|
python3
|
|
rust
|
|
rust-bindgen
|
|
rust-src
|
|
rustfmt
|
|
sed
|
|
zstd
|
|
"
|
|
|
|
# Source
|
|
source="
|
|
$pkgname-$pkgver.tar.gz::https://git.kernel.org/torvalds/t/linux-${pkgver/_/-}.tar.gz
|
|
|
|
config-mainline.aarch64
|
|
config-mainline.armv7
|
|
config-mainline.loongarch64
|
|
config-mainline.ppc64le
|
|
config-mainline.riscv64
|
|
config-mainline.x86
|
|
config-mainline.x86_64
|
|
"
|
|
builddir="$srcdir/linux-${pkgver/_/-}"
|
|
_defconfig="defconfig"
|
|
|
|
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" \
|
|
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/$_flavor/kernel.release
|
|
}
|
|
|
|
sha512sums="
|
|
e7767f81fea0656d91c778db730c746e90cf33f509093baedc9181c54c8d0ea3ad521b5838b4ec78f2d4288d4f2160e854dae2ed28a696c827d2ae8b65e39d6f linux-postmarketos-mainline-6.19.tar.gz
|
|
1cb5d9d7aec9f2ef82492b3ec70766cba74c3b0b54f48fe0699a45d27a1ada01757887278f4290085711c216aba7677a64452090dc494fb8937f0e641e8d4dd5 config-mainline.aarch64
|
|
6ea5778e90e22b8abd0b2aeef5c3ff77d5f5851e8a7f370a408df0d7bd7bf2d11db3eef0c30c3d6768db610ea40f8866d868e8c36a7b245ac624d1cdae948ce2 config-mainline.armv7
|
|
b71b0f52e8539656bdf27eb0643e0e944a9d1207c0f4e2d60baf9c7828f24825cdc2f25d0595ab54f06cc4b4ce423f2c5c5ab443bf4f1211f776ece9d35e049c config-mainline.loongarch64
|
|
387a50493aa7d72ac3756c145c06c5730787b0eba7921724a2b12a4ace5c9dc955837fba1518ecb32b9ec3b7fd7a2d7efbbb392722a455485b79db0ccab6c1fb config-mainline.ppc64le
|
|
48490ec5ee0cf5040b325d84de725cd11f53855e15fa085748096221cf6dfb8b3cb485b32623ed26e00a9740b4df6d79d272e7b30a5e4dcc5ec4a56db32389fd config-mainline.riscv64
|
|
813bfdb7b5d894b474db039bdef3e7e84a281deaecfffbb9e22abe6fda47a5acb5792795adfe66f9aca704f45ea606a797de3a719779b3cb2f7861e5f027c954 config-mainline.x86
|
|
f475a838a6d2295ccbbbe01b2fffbcc1f911419784836a1c9eae07053a98da8253794308793b458016ae06258584af1bf6a03ba73ff025d79e91b83319020e86 config-mainline.x86_64
|
|
"
|