add linux6.11

This commit is contained in:
joborun linux 2024-09-19 18:53:29 +03:00
parent 5f176375e0
commit 88b88bcf7c
9 changed files with 26122 additions and 0 deletions

282
linux6.11/PKGBUILD Normal file
View file

@ -0,0 +1,282 @@
#!/usr/bin/bash
# JOBoRun : Jwm OpenBox Obarun RUNit
# Maintainer : Joe Bo Run <joborun@disroot.org>
# PkgSource : url="https://gittea.disroot.org/joborun-pkg/jobcomm/$pkgname"
# Website : https://pozol.eu
#-----------------------------------------| DESCRIPTION |---------------------------------------
pkgbase=linux6.11
_tag=v6.11
pkgver=6.11
pkgrel=02
pkgdesc="Linux 6.11 w/o zstd ipv6 & rust"
url="https://kernel.org/"
makedepends=(bc cpio kmod libelf pahole perl tar xz)
# gettext)
# htmldocs ( graphviz imagemagick python-sphinx texlive-latexextra )
options=('!strip')
_srcname=linux-$pkgver
#https://cdn.kernel.org/pub/linux/kernel/v6.x/linux-$pkgver.tar.xz
url="https://cdn.kernel.org/pub/linux/kernel"
source=($url/v6.x/$_srcname.tar.{xz,sign}
config # the main kernel config file
sha256sums::https://cdn.kernel.org/pub/linux/kernel/v6.x/sha256sums.asc)
# 0001-ZEN-Add-sysctl-and-CONFIG-to-disallow-unprivileged-C.patch)
# 0002-skip-simpledrm-if-nvidia-drm.modeset=1-is.patch)
# 0003-Default-to-maximum-amount-of-ASLR-bits.patch) # already in config
#install=linux.install
export KBUILD_BUILD_HOST=joborun
export KBUILD_BUILD_USER=$pkgbase
export KBUILD_BUILD_TIMESTAMP="$(date -Ru${SOURCE_DATE_EPOCH:+d @$SOURCE_DATE_EPOCH})"
_make() {
test -s version
make KERNELRELEASE="$(<version)" "$@"
}
prepare() {
cd $_srcname
# cp ".config" "config.kernel.org"
# diff -Nuar config,kernel.org config >../config.diffs
echo "Setting version..."
echo "-$pkgrel" > localversion.10-pkgrel
echo "${pkgbase#linux}" > localversion.20-pkgname
make defconfig
make -s kernelrelease > version
# make mrproper
make clean
local src
for src in "${source[@]}"; do
src="${src%%::*}"
src="${src##*/}"
src="${src%.xz}"
[[ $src = *.patch ]] || continue
echo "Applying patch $src..."
patch -Np1 < "../$src"
done
echo "Setting joborun config..."
cp ../config .config
_make olddefconfig
diff -u ../config .config || :
make -s kernelrelease > version
echo "Prepared $pkgbase version $(<version)"
}
build() {
cd $_srcname
_make all
# make -C tools/bpf/bpftool vmlinux.h feature-clang-bpf-co-re=1
# _make htmldocs
}
_package() {
pkgdesc="The $pkgdesc kernel and modules w/o zstd ipv6"
depends=(coreutils initramfs kmod)
optdepends=('wireless-regdb: to set the correct wireless channels of your country'
'linux-firmware: firmware images needed for some devices')
provides=(KSMBD-MODULE VIRTUALBOX-GUEST-MODULES WIREGUARD-MODULE)
replaces=(virtualbox-guest-modules wireguard
virtualbox-guest-modules-arch
wireguard-arch)
cd $_srcname
# local kernver="$(<version)"
# localversion.* version vmlinux
# local modulesdir="$pkgdir/usr/lib/modules/$kernver"
local modulesdir="$pkgdir/usr/lib/modules/$(<version)"
echo "Installing boot image..."
# systemd expects to find the kernel here to allow hibernation
# https://github.com/systemd/systemd/commit/edda44605f06a41fb86b7ab8128dcf99161d2344
install -Dm644 "$(_make -s image_name)" "$modulesdir/vmlinuz"
# Used by mkinitcpio to name the kernel
echo "$pkgbase" | install -Dm644 /dev/stdin "$modulesdir/pkgbase"
echo "Installing modules..."
_make INSTALL_MOD_PATH="$pkgdir/usr" INSTALL_MOD_STRIP=1 \
DEPMOD=/doesnt/exist modules_install # Suppress depmod
# remove build and source links
rm -f "$modulesdir"/{source,build}
# licenses
install -vDm 644 LICENSES/deprecated/{GPL-1.0,ISC,Linux-OpenIB,X11,Zlib} -t "$pkgdir/usr/share/licenses/$pkgname/"
install -vDm 644 LICENSES/preferred/{BSD,MIT}* -t "$pkgdir/usr/share/licenses/$pkgname/"
install -vDm 644 LICENSES/exceptions/* -t "$pkgdir/usr/share/licenses/$pkgname/"
}
_package-headers() {
pkgdesc="Headers and scripts for building modules for the $pkgdesc kernel"
depends=(pahole)
cd $_srcname
local builddir="$pkgdir/usr/lib/modules/$(<version)/build"
echo "Installing build files..."
install -Dt "$builddir" -m644 .config Makefile Module.symvers System.map \
localversion.* version vmlinux
install -Dt "$builddir/kernel" -m644 kernel/Makefile
install -Dt "$builddir/arch/x86" -m644 arch/x86/Makefile
cp -t "$builddir" -a scripts
# required when STACK_VALIDATION is enabled
# add objtool for external module building and enabled VALIDATION_STACK option
install -Dt "$builddir/tools/objtool" tools/objtool/objtool
# required when DEBUG_INFO_BTF_MODULES is enabled
install -Dt "$builddir/tools/bpf/resolve_btfids" tools/bpf/resolve_btfids/resolve_btfids
echo "Installing headers..."
cp -t "$builddir" -a include
cp -t "$builddir/arch/x86" -a arch/x86/include
install -Dt "$builddir/arch/x86/kernel" -m644 arch/x86/kernel/asm-offsets.s
install -Dt "$builddir/drivers/md" -m644 drivers/md/*.h
install -Dt "$builddir/net/mac80211" -m644 net/mac80211/*.h
# https://bugs.archlinux.org/task/13146
install -Dt "$builddir/drivers/media/i2c" -m644 drivers/media/i2c/msp3400-driver.h
# https://bugs.archlinux.org/task/20402
install -Dt "$builddir/drivers/media/usb/dvb-usb" -m644 drivers/media/usb/dvb-usb/*.h
install -Dt "$builddir/drivers/media/dvb-frontends" -m644 drivers/media/dvb-frontends/*.h
install -Dt "$builddir/drivers/media/tuners" -m644 drivers/media/tuners/*.h
# https://bugs.archlinux.org/task/71392
install -Dt "$builddir/drivers/iio/common/hid-sensors" -m644 drivers/iio/common/hid-sensors/*.h
echo "Installing KConfig files..."
find . -name 'Kconfig*' -exec install -Dm644 {} "$builddir/{}" \;
echo "Removing unneeded architectures..."
local arch
for arch in "$builddir"/arch/*/; do
[[ $arch = */x86/ ]] && continue
echo "Removing $(basename "$arch")"
rm -r "$arch"
done
echo "Removing documentation..."
rm -r "$builddir/Documentation"
echo "Removing broken symlinks..."
find -L "$builddir" -type l -printf 'Removing %P\n' -delete
echo "Removing loose objects..."
find "$builddir" -type f -name '*.o' -printf 'Removing %P\n' -delete
echo "Stripping build tools..."
local file
while read -rd '' file; do
case "$(file -Sib "$file")" in
application/x-sharedlib\;*) # Libraries (.so)
strip -v $STRIP_SHARED "$file" ;;
application/x-archive\;*) # Libraries (.a)
strip -v $STRIP_STATIC "$file" ;;
application/x-executable\;*) # Binaries
strip -v $STRIP_BINARIES "$file" ;;
application/x-pie-executable\;*) # Relocatable binaries
strip -v $STRIP_SHARED "$file" ;;
esac
done < <(find "$builddir" -type f -perm -u+x ! -name vmlinux -print0)
echo "Stripping vmlinux..."
strip -v $STRIP_STATIC "$builddir/vmlinux"
echo "Adding symlink..."
mkdir -p "$pkgdir/usr/src"
ln -sr "$builddir" "$pkgdir/usr/src/$pkgbase"
# licenses
install -vDm 644 LICENSES/deprecated/{ISC,Linux-OpenIB,X11,Zlib} -t "$pkgdir/usr/share/licenses/$pkgname/"
install -vDm 644 LICENSES/preferred/{BSD*,MIT} -t "$pkgdir/usr/share/licenses/$pkgname/"
install -vDm 644 LICENSES/exceptions/* -t "$pkgdir/usr/share/licenses/$pkgname/"
}
#_package-docs() {
# pkgdesc="Documentation for the $pkgdesc kernel"
#
# cd $_srcname
# local builddir="$pkgdir/usr/lib/modules/$(<version)/build"
#
# echo "Installing documentation..."
# local src dst
# while read -rd '' src; do
# dst="${src#Documentation/}"
# dst="$builddir/Documentation/${dst#output/}"
# install -Dm644 "$src" "$dst"
# done < <(find Documentation -name '.*' -prune -o ! -type d -print0)
#
# echo "Adding symlink..."
# mkdir -p "$pkgdir/usr/share/doc"
# ln -sr "$builddir/Documentation" "$pkgdir/usr/share/doc/$pkgbase"
#}
pkgname=("$pkgbase" "$pkgbase-headers") # "$pkgbase-docs"
for _p in "${pkgname[@]}"; do
eval "package_$_p() {
$(declare -f "_package${_p#$pkgbase}")
_package${_p#$pkgbase}
}"
done
#---- arch license gpg-key & sha256sums ----
arch=(x86_64)
license=('Apache-2.0 OR MIT'
'BSD-2-Clause OR GPL-2.0-or-later'
BSD-3-Clause
'BSD-3-Clause OR GPL-2.0-only'
'BSD-3-Clause OR GPL-2.0-or-later'
BSD-3-Clause-Clear
GPL-1.0-or-later
'GPL-1.0-or-later OR BSD-3-Clause'
GPL-2.0-only
'GPL-2.0-only OR Apache-2.0'
'GPL-2.0-only OR BSD-2-Clause'
'GPL-2.0-only OR BSD-3-Clause'
'GPL-2.0-only OR CDDL-1.0'
'GPL-2.0-only OR Linux-OpenIB'
'GPL-2.0-only OR MIT'
'GPL-2.0-only OR MPL-1.1'
'GPL-2.0-only OR X11'
'GPL-2.0-only WITH Linux-syscall-note'
GPL-2.0-or-later
'GPL-2.0-or-later OR BSD-2-Clause'
'GPL-2.0-or-later OR BSD-3-Clause'
'GPL-2.0-or-later OR MIT'
'GPL-2.0-or-later OR X11'
'GPL-2.0-or-later WITH GCC-exception-2.0'
ISC
LGPL-2.0-or-later
'LGPL-2.1-only'
'LGPL-2.1-only OR BSD-2-Clause'
LGPL-2.1-or-later
MIT
MPL-1.1
X11
Zlib)
validpgpkeys=(ABAF11C65A2970B130ABE3C479BE3E4300411886 # Linus Torvalds
647F28654894E3BD457199BE38DBBDC86092693E) # Greg Kroah-Hartman
# https://www.kernel.org/pub/linux/kernel/v6.x/sha256sums.asc
## sha256sums::https://cdn.kernel.org/pub/linux/kernel/v6.x/sha256sums.asc
## 55d2c6c025ebc27810c748d66325dd5bc601e8d32f8581d9e77673529bdacb2e linux-6.11.tar.xz
sha256sums=(55d2c6c025ebc27810c748d66325dd5bc601e8d32f8581d9e77673529bdacb2e # linux-6.11.tar.xz
e2a26d9e5243027dd6a03e83c6ab6115a91ecc9baee7cb6cdb38c0f3e37289f7 # linux-6.11.tar.sign
81b6c62d49f1dc12e3217adb2b25623e7d1e69a89ba01b37986ba2a5b6d87ccd # config
1858c4a413357c11cc77e726507e4f2ba4404b0044d9052e42e9b6c6c31e2108) # sha256sums
# 21195509fded29d0256abfce947b5a8ce336d0d3e192f3f8ea90bde9dd95a889) # 0001-ZEN-Add-sysctl-and-CONFIG-to-disallow-unprivileged-C.patch
# 2f23be91455e529d16aa2bbf5f2c7fe3d10812749828fc752240c21b2b845849) # 0002-skip-simpledrm-if-nvidia-drm.modeset=1-is.patch

250
linux6.11/PKGBUILD-arch Normal file
View file

@ -0,0 +1,250 @@
# Maintainer: Jan Alexander Steffens (heftig) <heftig@archlinux.org>
pkgbase=linux
pkgver=6.11.arch1
pkgrel=1
pkgdesc='Linux'
url='https://github.com/archlinux/linux'
arch=(x86_64)
license=(GPL-2.0-only)
makedepends=(
bc
cpio
gettext
libelf
pahole
perl
python
rust
rust-bindgen
rust-src
tar
xz
# htmldocs
graphviz
imagemagick
python-sphinx
python-yaml
texlive-latexextra
)
options=(
!debug
!strip
)
_srcname=linux-${pkgver%.*}
_srctag=v${pkgver%.*}-${pkgver##*.}
source=(
https://cdn.kernel.org/pub/linux/kernel/v${pkgver%%.*}.x/${_srcname}.tar.{xz,sign}
$url/releases/download/$_srctag/linux-$_srctag.patch.zst{,.sig}
config # the main kernel config file
)
validpgpkeys=(
ABAF11C65A2970B130ABE3C479BE3E4300411886 # Linus Torvalds
647F28654894E3BD457199BE38DBBDC86092693E # Greg Kroah-Hartman
83BC8889351B5DEBBB68416EB8AC08600F108CDF # Jan Alexander Steffens (heftig)
)
# https://www.kernel.org/pub/linux/kernel/v6.x/sha256sums.asc
sha256sums=('55d2c6c025ebc27810c748d66325dd5bc601e8d32f8581d9e77673529bdacb2e'
'SKIP'
'ade8767de6e946acf29d9294c45f05d71b94f6e162317b6466d85cd04f5cf6f7'
'SKIP'
'bb5b077af2b1b01440835eec1ac4443fdd483a21505d2eb91d58254b2b49784b')
b2sums=('e7750c0878d71a56a0ce52d4c4c912199dad5bf5e2e8f872585a6494afbb37cbd852e612a6858936d2dc9b7776a3933818f540db408d57e90d18ea5249bba7ab'
'SKIP'
'09ecff50d0efe2ead6bcdbac9f47bba37c74eb5c0b2cdf00ee1624af9e633e3be8058a05373774b2a4e7b7c99df1f4cbac4c9b120f859b656fbb013fca173ab4'
'SKIP'
'0fff4286ddce5b66453a96129aa0682fd01e488d199c864564a7a77735fed4ce948056198ad83719e71c45054485305fde2c46eaad2f2f3abed10bc50d4e59e6')
export KBUILD_BUILD_HOST=archlinux
export KBUILD_BUILD_USER=$pkgbase
export KBUILD_BUILD_TIMESTAMP="$(date -Ru${SOURCE_DATE_EPOCH:+d @$SOURCE_DATE_EPOCH})"
prepare() {
cd $_srcname
echo "Setting version..."
echo "-$pkgrel" > localversion.10-pkgrel
echo "${pkgbase#linux}" > localversion.20-pkgname
local src
for src in "${source[@]}"; do
src="${src%%::*}"
src="${src##*/}"
src="${src%.zst}"
[[ $src = *.patch ]] || continue
echo "Applying patch $src..."
patch -Np1 < "../$src"
done
echo "Setting config..."
cp ../config .config
make olddefconfig
diff -u ../config .config || :
make -s kernelrelease > version
echo "Prepared $pkgbase version $(<version)"
}
build() {
cd $_srcname
make all
make -C tools/bpf/bpftool vmlinux.h feature-clang-bpf-co-re=1
make htmldocs
}
_package() {
pkgdesc="The $pkgdesc kernel and modules"
depends=(
coreutils
initramfs
kmod
)
optdepends=(
'wireless-regdb: to set the correct wireless channels of your country'
'linux-firmware: firmware images needed for some devices'
)
provides=(
KSMBD-MODULE
VIRTUALBOX-GUEST-MODULES
WIREGUARD-MODULE
)
replaces=(
virtualbox-guest-modules-arch
wireguard-arch
)
cd $_srcname
local modulesdir="$pkgdir/usr/lib/modules/$(<version)"
echo "Installing boot image..."
# systemd expects to find the kernel here to allow hibernation
# https://github.com/systemd/systemd/commit/edda44605f06a41fb86b7ab8128dcf99161d2344
install -Dm644 "$(make -s image_name)" "$modulesdir/vmlinuz"
# Used by mkinitcpio to name the kernel
echo "$pkgbase" | install -Dm644 /dev/stdin "$modulesdir/pkgbase"
echo "Installing modules..."
ZSTD_CLEVEL=19 make INSTALL_MOD_PATH="$pkgdir/usr" INSTALL_MOD_STRIP=1 \
DEPMOD=/doesnt/exist modules_install # Suppress depmod
# remove build link
rm "$modulesdir"/build
}
_package-headers() {
pkgdesc="Headers and scripts for building modules for the $pkgdesc kernel"
depends=(pahole)
cd $_srcname
local builddir="$pkgdir/usr/lib/modules/$(<version)/build"
echo "Installing build files..."
install -Dt "$builddir" -m644 .config Makefile Module.symvers System.map \
localversion.* version vmlinux tools/bpf/bpftool/vmlinux.h
install -Dt "$builddir/kernel" -m644 kernel/Makefile
install -Dt "$builddir/arch/x86" -m644 arch/x86/Makefile
cp -t "$builddir" -a scripts
ln -srt "$builddir" "$builddir/scripts/gdb/vmlinux-gdb.py"
# required when STACK_VALIDATION is enabled
install -Dt "$builddir/tools/objtool" tools/objtool/objtool
# required when DEBUG_INFO_BTF_MODULES is enabled
install -Dt "$builddir/tools/bpf/resolve_btfids" tools/bpf/resolve_btfids/resolve_btfids
echo "Installing headers..."
cp -t "$builddir" -a include
cp -t "$builddir/arch/x86" -a arch/x86/include
install -Dt "$builddir/arch/x86/kernel" -m644 arch/x86/kernel/asm-offsets.s
install -Dt "$builddir/drivers/md" -m644 drivers/md/*.h
install -Dt "$builddir/net/mac80211" -m644 net/mac80211/*.h
# https://bugs.archlinux.org/task/13146
install -Dt "$builddir/drivers/media/i2c" -m644 drivers/media/i2c/msp3400-driver.h
# https://bugs.archlinux.org/task/20402
install -Dt "$builddir/drivers/media/usb/dvb-usb" -m644 drivers/media/usb/dvb-usb/*.h
install -Dt "$builddir/drivers/media/dvb-frontends" -m644 drivers/media/dvb-frontends/*.h
install -Dt "$builddir/drivers/media/tuners" -m644 drivers/media/tuners/*.h
# https://bugs.archlinux.org/task/71392
install -Dt "$builddir/drivers/iio/common/hid-sensors" -m644 drivers/iio/common/hid-sensors/*.h
echo "Installing KConfig files..."
find . -name 'Kconfig*' -exec install -Dm644 {} "$builddir/{}" \;
echo "Removing unneeded architectures..."
local arch
for arch in "$builddir"/arch/*/; do
[[ $arch = */x86/ ]] && continue
echo "Removing $(basename "$arch")"
rm -r "$arch"
done
echo "Removing documentation..."
rm -r "$builddir/Documentation"
echo "Removing broken symlinks..."
find -L "$builddir" -type l -printf 'Removing %P\n' -delete
echo "Removing loose objects..."
find "$builddir" -type f -name '*.o' -printf 'Removing %P\n' -delete
echo "Stripping build tools..."
local file
while read -rd '' file; do
case "$(file -Sib "$file")" in
application/x-sharedlib\;*) # Libraries (.so)
strip -v $STRIP_SHARED "$file" ;;
application/x-archive\;*) # Libraries (.a)
strip -v $STRIP_STATIC "$file" ;;
application/x-executable\;*) # Binaries
strip -v $STRIP_BINARIES "$file" ;;
application/x-pie-executable\;*) # Relocatable binaries
strip -v $STRIP_SHARED "$file" ;;
esac
done < <(find "$builddir" -type f -perm -u+x ! -name vmlinux -print0)
echo "Stripping vmlinux..."
strip -v $STRIP_STATIC "$builddir/vmlinux"
echo "Adding symlink..."
mkdir -p "$pkgdir/usr/src"
ln -sr "$builddir" "$pkgdir/usr/src/$pkgbase"
}
_package-docs() {
pkgdesc="Documentation for the $pkgdesc kernel"
cd $_srcname
local builddir="$pkgdir/usr/lib/modules/$(<version)/build"
echo "Installing documentation..."
local src dst
while read -rd '' src; do
dst="${src#Documentation/}"
dst="$builddir/Documentation/${dst#output/}"
install -Dm644 "$src" "$dst"
done < <(find Documentation -name '.*' -prune -o ! -type d -print0)
echo "Adding symlink..."
mkdir -p "$pkgdir/usr/share/doc"
ln -sr "$builddir/Documentation" "$pkgdir/usr/share/doc/$pkgbase"
}
pkgname=(
"$pkgbase"
"$pkgbase-headers"
"$pkgbase-docs"
)
for _p in "${pkgname[@]}"; do
eval "package_$_p() {
$(declare -f "_package${_p#$pkgbase}")
_package${_p#$pkgbase}
}"
done
# vim:set ts=8 sts=2 sw=2 et:

242
linux6.11/PKGBUILD-aur Normal file
View file

@ -0,0 +1,242 @@
#
# Maintainer: Mikael Eriksson <mikael_eriksson@miffe.org>
#
# Based on the linux package by:
# Maintainer: Jan Alexander Steffens (heftig) <heftig@archlinux.org>
pkgbase=linux-mainline
#pkgbase=linux-custom # Build kernel with a different name
_tag=v6.11
pkgver=6.11
pkgrel=1
pkgdesc="Linux Mainline"
arch=(x86_64)
url="https://kernel.org/"
license=(GPL-2.0-only)
makedepends=(
bc
cpio
gettext
git
libelf
pahole
perl
python
tar
xz
# htmldocs
graphviz
imagemagick
python-sphinx
python-yaml
texlive-latexextra
)
options=(
!debug
!strip
)
_srcname=linux-mainline
source=(
"$_srcname::git+https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git#tag=$_tag"
config # the main kernel config file
)
validpgpkeys=(
ABAF11C65A2970B130ABE3C479BE3E4300411886 # Linus Torvalds
647F28654894E3BD457199BE38DBBDC86092693E # Greg Kroah-Hartman
83BC8889351B5DEBBB68416EB8AC08600F108CDF # Jan Alexander Steffens (heftig)
)
sha256sums=('SKIP'
'db35dc40884ec866a32225b2f7916fa7ae24273e08f9e204cddb010816255e17')
export KBUILD_BUILD_HOST=archlinux
export KBUILD_BUILD_USER=$pkgbase
export KBUILD_BUILD_TIMESTAMP="$(date -Ru${SOURCE_DATE_EPOCH:+d @$SOURCE_DATE_EPOCH})"
prepare() {
cd $_srcname
echo "Setting version..."
echo "-$pkgrel" > localversion.10-pkgrel
echo "${pkgbase#linux}" > localversion.20-pkgname
local src
for src in "${source[@]}"; do
src="${src%%::*}"
src="${src##*/}"
src="${src%.zst}"
[[ $src = *.patch ]] || continue
echo "Applying patch $src..."
patch -Np1 < "../$src"
done
echo "Setting config..."
cp ../config .config
make olddefconfig
diff -u ../config .config || :
make -s kernelrelease > version
echo "Prepared $pkgbase version $(<version)"
}
build() {
cd $_srcname
make all
make -C tools/bpf/bpftool vmlinux.h feature-clang-bpf-co-re=1
make htmldocs
}
_package() {
pkgdesc="The $pkgdesc kernel and modules"
depends=(
coreutils
initramfs
kmod
)
optdepends=(
'wireless-regdb: to set the correct wireless channels of your country'
'linux-firmware: firmware images needed for some devices'
)
provides=(
KSMBD-MODULE
VIRTUALBOX-GUEST-MODULES
WIREGUARD-MODULE
)
replaces=(
virtualbox-guest-modules-arch
wireguard-arch
)
cd $_srcname
local modulesdir="$pkgdir/usr/lib/modules/$(<version)"
echo "Installing boot image..."
# systemd expects to find the kernel here to allow hibernation
# https://github.com/systemd/systemd/commit/edda44605f06a41fb86b7ab8128dcf99161d2344
install -Dm644 "$(make -s image_name)" "$modulesdir/vmlinuz"
# Used by mkinitcpio to name the kernel
echo "$pkgbase" | install -Dm644 /dev/stdin "$modulesdir/pkgbase"
echo "Installing modules..."
ZSTD_CLEVEL=19 make INSTALL_MOD_PATH="$pkgdir/usr" INSTALL_MOD_STRIP=1 \
DEPMOD=/doesnt/exist modules_install # Suppress depmod
# remove build link
rm "$modulesdir"/build
}
_package-headers() {
pkgdesc="Headers and scripts for building modules for the $pkgdesc kernel"
depends=(pahole)
cd $_srcname
local builddir="$pkgdir/usr/lib/modules/$(<version)/build"
echo "Installing build files..."
install -Dt "$builddir" -m644 .config Makefile Module.symvers System.map \
localversion.* version vmlinux tools/bpf/bpftool/vmlinux.h
install -Dt "$builddir/kernel" -m644 kernel/Makefile
install -Dt "$builddir/arch/x86" -m644 arch/x86/Makefile
cp -t "$builddir" -a scripts
# required when STACK_VALIDATION is enabled
install -Dt "$builddir/tools/objtool" tools/objtool/objtool
# required when DEBUG_INFO_BTF_MODULES is enabled
install -Dt "$builddir/tools/bpf/resolve_btfids" tools/bpf/resolve_btfids/resolve_btfids
echo "Installing headers..."
cp -t "$builddir" -a include
cp -t "$builddir/arch/x86" -a arch/x86/include
install -Dt "$builddir/arch/x86/kernel" -m644 arch/x86/kernel/asm-offsets.s
install -Dt "$builddir/drivers/md" -m644 drivers/md/*.h
install -Dt "$builddir/net/mac80211" -m644 net/mac80211/*.h
# https://bugs.archlinux.org/task/13146
install -Dt "$builddir/drivers/media/i2c" -m644 drivers/media/i2c/msp3400-driver.h
# https://bugs.archlinux.org/task/20402
install -Dt "$builddir/drivers/media/usb/dvb-usb" -m644 drivers/media/usb/dvb-usb/*.h
install -Dt "$builddir/drivers/media/dvb-frontends" -m644 drivers/media/dvb-frontends/*.h
install -Dt "$builddir/drivers/media/tuners" -m644 drivers/media/tuners/*.h
# https://bugs.archlinux.org/task/71392
install -Dt "$builddir/drivers/iio/common/hid-sensors" -m644 drivers/iio/common/hid-sensors/*.h
echo "Installing KConfig files..."
find . -name 'Kconfig*' -exec install -Dm644 {} "$builddir/{}" \;
echo "Removing unneeded architectures..."
local arch
for arch in "$builddir"/arch/*/; do
[[ $arch = */x86/ ]] && continue
echo "Removing $(basename "$arch")"
rm -r "$arch"
done
echo "Removing documentation..."
rm -r "$builddir/Documentation"
echo "Removing broken symlinks..."
find -L "$builddir" -type l -printf 'Removing %P\n' -delete
echo "Removing loose objects..."
find "$builddir" -type f -name '*.o' -printf 'Removing %P\n' -delete
echo "Stripping build tools..."
local file
while read -rd '' file; do
case "$(file -Sib "$file")" in
application/x-sharedlib\;*) # Libraries (.so)
strip -v $STRIP_SHARED "$file" ;;
application/x-archive\;*) # Libraries (.a)
strip -v $STRIP_STATIC "$file" ;;
application/x-executable\;*) # Binaries
strip -v $STRIP_BINARIES "$file" ;;
application/x-pie-executable\;*) # Relocatable binaries
strip -v $STRIP_SHARED "$file" ;;
esac
done < <(find "$builddir" -type f -perm -u+x ! -name vmlinux -print0)
echo "Stripping vmlinux..."
strip -v $STRIP_STATIC "$builddir/vmlinux"
echo "Adding symlink..."
mkdir -p "$pkgdir/usr/src"
ln -sr "$builddir" "$pkgdir/usr/src/$pkgbase"
}
_package-docs() {
pkgdesc="Documentation for the $pkgdesc kernel"
cd $_srcname
local builddir="$pkgdir/usr/lib/modules/$(<version)/build"
echo "Installing documentation..."
local src dst
while read -rd '' src; do
dst="${src#Documentation/}"
dst="$builddir/Documentation/${dst#output/}"
install -Dm644 "$src" "$dst"
done < <(find Documentation -name '.*' -prune -o ! -type d -print0)
echo "Adding symlink..."
mkdir -p "$pkgdir/usr/share/doc"
ln -sr "$builddir/Documentation" "$pkgdir/usr/share/doc/$pkgbase"
}
pkgname=(
"$pkgbase"
"$pkgbase-headers"
"$pkgbase-docs"
)
for _p in "${pkgname[@]}"; do
eval "package_$_p() {
$(declare -f "_package${_p#$pkgbase}")
_package${_p#$pkgbase}
}"
done
# vim:set ts=8 sts=2 sw=2 et:

12155
linux6.11/config Normal file

File diff suppressed because it is too large Load diff

11953
linux6.11/config-arch Normal file

File diff suppressed because it is too large Load diff

15
linux6.11/deps Normal file
View file

@ -0,0 +1,15 @@
bc
cpio
graphviz
imagemagick
bison
pahole
libgit2
python-fuse
libjpeg-turbo
graphite
python
rav1e

3
linux6.11/key Normal file
View file

@ -0,0 +1,3 @@
gpg -v --recv-key 38DBBDC86092693E
gpg --recv-key 79BE3E4300411886

1216
linux6.11/sha256sums Normal file

File diff suppressed because it is too large Load diff

6
linux6.11/time Normal file
View file

@ -0,0 +1,6 @@
real 323m48.311s
user 301m55.894s
sys 23m32.082s