89 lines
2.7 KiB
Bash
89 lines
2.7 KiB
Bash
# Maintainer: Casey Connolly <kcxt@postmarketos.org>
|
|
# Kernel config based on: arch/arm64/configs/defconfig
|
|
|
|
pkgname=linux-next
|
|
pkgver=6.15_git20250522
|
|
pkgrel=0
|
|
_nextver="${pkgver#*_git}"
|
|
pkgdesc="Linux next kernel"
|
|
arch="armv7 aarch64"
|
|
case "$CARCH" in
|
|
aarch64) _carch="arm64";_defconfig="defconfig";;
|
|
# FIXME: We should not be using qcom_defconfig. Instead we should be using multi_v7_defconfig.
|
|
# The problem is two-fold:
|
|
# - We need to reduce the amount of mainline kernels.
|
|
# - We need to find a way to not duplicate upstream defconfigs into our repo.
|
|
# Please see: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6133#note_468011
|
|
armv7) _carch="arm";_defconfig="qcom_defconfig";;
|
|
esac
|
|
_flavor="generic-trailblazer"
|
|
url="https://kernel.org"
|
|
license="GPL-2.0-only"
|
|
# FIXME: kconfigcheck isn't supported since we use fragments
|
|
options="!strip !check !tracedeps pmb:cross-native"
|
|
source="
|
|
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/snapshot/linux-next-next-$_nextver.tar.gz
|
|
devices.config
|
|
pmos.config
|
|
"
|
|
makedepends="
|
|
bash
|
|
bc
|
|
bison
|
|
devicepkg-dev
|
|
findutils
|
|
flex
|
|
git
|
|
openssl-dev
|
|
perl
|
|
postmarketos-installkernel
|
|
python3
|
|
zstd
|
|
"
|
|
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() {
|
|
if [ "$CARCH" != "armv7" ]; then
|
|
install -Dm644 "$builddir/arch/$_carch/boot/vmlinuz.efi" \
|
|
"$pkgdir/boot/linux.efi"
|
|
fi
|
|
|
|
mkdir -p "$pkgdir"/boot
|
|
|
|
make zinstall 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="
|
|
4413d03948bf66d8ed0c8b404ad1939bfc67861df3c584219b0459fe37a54d003866595356b4304288d7f5c194a240f837246742ec3fd9b01e1809da3655d8d6 linux-next-next-20250522.tar.gz
|
|
094f414e291894d8014088d89d0843a545fc09f896733da1a451b6badc05611b38ed3310f51981e8faebcd1de3b0aa2f2b1728007004125d810339cd17f19b62 devices.config
|
|
8d695fd4616354b224cf9862832ae95deb9647793e3454a136d655a143a00244d65b303b8b8540f65e693f6895576e1b51e18a8c42642f7f5e9331c21fbedbc1 pmos.config
|
|
"
|