diff options
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 137 |
1 files changed, 81 insertions, 56 deletions
@@ -21,11 +21,6 @@ _makexconfig= ### Tweak kernel options prior to a build via gconfig _makegconfig= -# NUMA is optimized for multi-socket motherboards. -# A single multi-core CPU actually runs slower with NUMA enabled. -# See, https://bugs.archlinux.org/task/31187 -_NUMAdisable=y - # Compile ONLY used modules to VASTLYreduce the number of modules built # and the build time. # @@ -56,36 +51,59 @@ _htmldocs_enable= ### Do not edit below this line unless you know what you're doing # pkgname=('linux-lqx' 'linux-lqx-headers' 'linux-lqx-docs') -_major=5.14 +_major=6.8 _srcname=linux-${_major} _lqxpatchname=liquorix-package -_lqxpatchrel=5 +_lqxpatchrel=14 _lqxpatchver=${_lqxpatchname}-${_major}-${_lqxpatchrel} pkgbase=linux-lqx -pkgver=5.14.7.lqx1 -pkgrel=1 +pkgver=6.8.9.lqx2 +pkgrel=4 pkgdesc='Linux Liquorix' url='https://liquorix.net/' arch=(x86_64) -license=(GPL2) -makedepends=(bc kmod libelf cpio python pahole) +license=(GPL-2.0-only) +makedepends=( + bc + cpio + gettext + git + libelf + pahole + perl + python + tar + xz + zstd +) + if [ -n "$_htmldocs_enable" ]; then - makedepends+=(xmlto python-sphinx python-sphinx_rtd_theme graphviz imagemagick) + makedepends+=( + graphviz + imagemagick + python-sphinx + texlive-latexextra + xmlto + ) fi -options=('!strip') + +options=( + !debug + !strip +) #_lucjanpath="https://raw.githubusercontent.com/sirlucjan/kernel-patches/master/${_major}" _lucjanpath="https://gitlab.com/sirlucjan/kernel-patches/raw/master/${_major}" -source=("https://cdn.kernel.org/pub/linux/kernel/v5.x/${_srcname}.tar.xz" - "https://cdn.kernel.org/pub/linux/kernel/v5.x/${_srcname}.tar.sign" +source=("https://cdn.kernel.org/pub/linux/kernel/v6.x/${_srcname}.tar.xz" + "https://cdn.kernel.org/pub/linux/kernel/v6.x/${_srcname}.tar.sign" "https://github.com/damentz/${_lqxpatchname}/archive/${_major}-${_lqxpatchrel}.tar.gz") validpgpkeys=( 'ABAF11C65A2970B130ABE3C479BE3E4300411886' # Linus Torvalds '647F28654894E3BD457199BE38DBBDC86092693E' # Greg Kroah-Hartman ) -sha512sums=('8e4f3ec3d36f774280f75dc7b004a43e09417af58f12e9c9f8348976659d4cfda7ad905f306f43fed66a27922e5c45db22e46bbfa7a0b9f365012380de3b6f64' +sha512sums=('5c4eb4aa1d3f7d1ea01c0f7ddeadacdece6e144fd4bdfc16b2b925d3e10dc04de3a6db69320b79a96c3560052616f001d2c09e7a1bb4f7b731e2380a7ecce068' 'SKIP' - '7b5d16656742568236d190723affa642d95025a2314dbc1ed243a8fd6f9414508db1e004fa2af424d61fe2404d62fedaf67027b5eccf4d8159471e8052f2544d') + 'd6fbf8df538eef20c7358f8d691097240f41b21ed20642a46fad03581dcd6c691d15d49c17b3b5d7264f246f9cc66a74af553616e78f046f899cf77ad785c51b') @@ -94,23 +112,23 @@ export KBUILD_BUILD_USER=$pkgbase export KBUILD_BUILD_TIMESTAMP="$(date -Ru${SOURCE_DATE_EPOCH:+d @$SOURCE_DATE_EPOCH})" prepare() { - cd $_srcname + cd $_srcname ### Set package version variables _abiname="$(cat ${srcdir}/${_lqxpatchver}/linux-liquorix/debian/config/defines | grep 'abiname:' | sed -r 's/abiname:\s*//')" - _minor="$(echo "$_abiname" | cut -f1 -d .)" - _patchrel="$(echo "$_abiname" | cut -f2 -d .)" + _minor="$(echo "$_abiname" | cut -f1 -d -)" + _patchrel="$(echo "$_abiname" | cut -f2 -d -)" ### Add Liquorix patches - local _patchrx='^zen/v\d+\.\d+\.\d+-lqx\d+.patch$' local _patchfolder="${srcdir}/${_lqxpatchver}/linux-liquorix/debian/patches" - local _patchpath="$(grep -P "$_patchrx" "$_patchfolder/series")" - echo "Patching sources with ${_patchpath#*/}" - patch -Np1 -i "$_patchfolder/$_patchpath" + grep -P '^(zen|lqx)/' "$_patchfolder/series" | while IFS= read -r line + do + echo "Patching sources with $line" + patch -Np1 -i "$_patchfolder/$line" + done ### Setting version echo "Setting version..." - scripts/setlocalversion --save-scmversion echo "-$pkgrel" > localversion.10-pkgrel echo "${pkgbase#linux}" > localversion.20-pkgname @@ -119,6 +137,7 @@ prepare() { for src in "${source[@]}"; do src="${src%%::*}" src="${src##*/}" + src="${src%.zst}" [[ $src = *.patch ]] || continue echo "Applying patch $src..." patch -Np1 < "../$src" @@ -128,6 +147,7 @@ prepare() { echo "Setting config..." cat ${srcdir}/${_lqxpatchver}/linux-liquorix/debian/config/kernelarch-x86/config-arch-64 >./.config make olddefconfig + diff -u ${srcdir}/${_lqxpatchver}/linux-liquorix/debian/config/kernelarch-x86/config-arch-64 .config || : ### Prepared version make -s kernelrelease > version @@ -151,15 +171,15 @@ prepare() { ### Selecting the CPU scheduler if [ "$_projectc" = "bmq" ]; then echo "Selecting BMQ CPU scheduler..." - scripts/config --enable CONFIG_SCHED_BMQ - scripts/config --disable CONFIG_SCHED_PDS + scripts/config -e CONFIG_SCHED_BMQ + scripts/config -d CONFIG_SCHED_PDS elif [ "$_projectc" = "pds" ]; then echo "Selecting PDS CPU scheduler..." - scripts/config --disable CONFIG_SCHED_BMQ - scripts/config --enable CONFIG_SCHED_PDS + scripts/config -d CONFIG_SCHED_BMQ + scripts/config -e CONFIG_SCHED_PDS elif [ "$_projectc" = "none" ]; then echo "Selecting Completely Fair Scheduler..." - scripts/config --disable CONFIG_SCHED_ALT + scripts/config -d CONFIG_SCHED_ALT else if [ -n "$_projectc" ]; then error "The value $_projectc is invalid. Choose the correct one again." @@ -170,13 +190,6 @@ prepare() { exit fi - ### Optionally disable NUMA for 64-bit kernels only - # (x86 kernels do not support NUMA) - if [ -n "$_NUMAdisable" ]; then - echo "Disabling NUMA from kernel config..." - scripts/config --disable CONFIG_NUMA - fi - ### Optionally load needed modules for the make localmodconfig # See https://aur.archlinux.org/packages/modprobed-db if [ -n "$_localmodcfg" ]; then @@ -189,6 +202,10 @@ prepare() { fi fi + ## Use DWARF5 debug info for Arch + echo "Upgrading debug info from toolchain default to DWARF v5..." + scripts/config -e CONFIG_DEBUG_INFO_DWARF5 + ### Running make nconfig [[ -z "$_makenconfig" ]] || make nconfig @@ -212,19 +229,21 @@ build() { if [ -n "$_htmldocs_enable" ]; then make htmldocs fi + make -C tools/bpf/bpftool vmlinux.h feature-clang-bpf-co-re=1 } _package() { - pkgdesc="The $pkgdesc kernel and modules" - depends=(coreutils kmod initramfs) - optdepends=('crda: to set the correct wireless channels of your country' - 'linux-firmware: firmware images needed for some devices' - 'sof-firmware: firmware images needed for Sound Open Firmware capable devices') - provides=(VIRTUALBOX-GUEST-MODULES WIREGUARD-MODULE) + pkgdesc="The $pkgdesc kernel and modules" + depends=(coreutils kmod initramfs) + optdepends=('wireless-regdb: to set the correct wireless channels of your country' + 'linux-firmware: firmware images needed for some devices' + 'sof-firmware: firmware images needed for Sound Open Firmware capable devices' + 'modprobed-db: Keeps track of EVERY kernel module that has ever been probed - useful for those of us who make localmodconfig' + 'uksmd: Userspace KSM helper daemon') + provides=(VIRTUALBOX-GUEST-MODULES WIREGUARD-MODULE UKSMD-BUILTIN VHBA-MODULE) cd $_srcname - local kernver="$(<version)" - 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 @@ -235,31 +254,33 @@ _package() { echo "$pkgbase" | install -Dm644 /dev/stdin "$modulesdir/pkgbase" echo "Installing modules..." - make INSTALL_MOD_PATH="$pkgdir/usr" INSTALL_MOD_STRIP=1 modules_install + make INSTALL_MOD_PATH="$pkgdir/usr" INSTALL_MOD_STRIP=1 \ + DEPMOD=/doesnt/exist modules_install # Suppress depmod - # remove build and source links - rm "$modulesdir"/{source,build} + # remove build link + rm "$modulesdir"/build } _package-headers() { - pkgdesc="Headers and scripts for building modules for the $pkgdesc kernel" - depends=('linux-lqx' 'pahole') + pkgdesc="Headers and scripts for building modules for the $pkgdesc kernel" + depends=('linux-lqx' '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 + 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 - # add objtool for external module building and enabled VALIDATION_STACK option + # required when STACK_VALIDATION is enabled install -Dt "$builddir/tools/objtool" tools/objtool/objtool - # add xfs and shmem for aufs building - mkdir -p "$builddir"/{fs/xfs,mm} + # required when DEBUG_INFO_BTF_MODULES is enabled + install -Dt "$builddir/tools/bpf/resolve_btfids" tools/bpf/resolve_btfids/resolve_btfids \ + || true echo "Installing headers..." cp -t "$builddir" -a include @@ -303,7 +324,7 @@ _package-headers() { echo "Stripping build tools..." local file while read -rd '' file; do - case "$(file -bi "$file")" in + case "$(file -Sib "$file")" in application/x-sharedlib\;*) # Libraries (.so) strip -v $STRIP_SHARED "$file" ;; application/x-archive\;*) # Libraries (.a) @@ -343,7 +364,11 @@ _package-docs() { ln -sr "$builddir/Documentation" "$pkgdir/usr/share/doc/$pkgbase" } -pkgname=("$pkgbase" "$pkgbase-headers" "$pkgbase-docs") +pkgname=( + "$pkgbase" + "$pkgbase-headers" + "$pkgbase-docs" +) for _p in "${pkgname[@]}"; do eval "package_$_p() { $(declare -f "_package${_p#$pkgbase}") |