From dbf6b048bf99b5991b7222fda8be5133edac7f06 Mon Sep 17 00:00:00 2001 From: Vasiliy Stelmachenok Date: Tue, 25 Mar 2025 18:43:51 +0300 Subject: [PATCH] Make real debug packages with makepkg Signed-off-by: Vasiliy Stelmachenok --- linux-cachyos-bmq/PKGBUILD | 33 +------------------------------ linux-cachyos-bmq/config | 4 ++-- linux-cachyos-bore/PKGBUILD | 33 +------------------------------ linux-cachyos-bore/config | 4 ++-- linux-cachyos-deckify/PKGBUILD | 30 +--------------------------- linux-cachyos-deckify/config | 4 ++-- linux-cachyos-eevdf/PKGBUILD | 33 +------------------------------ linux-cachyos-eevdf/config | 4 ++-- linux-cachyos-hardened/PKGBUILD | 33 +------------------------------ linux-cachyos-hardened/config | 4 ++-- linux-cachyos-lts/PKGBUILD | 33 +------------------------------ linux-cachyos-lts/config | 4 ++-- linux-cachyos-rc/PKGBUILD | 35 ++------------------------------- linux-cachyos-rc/config | 4 ++-- linux-cachyos-rt-bore/PKGBUILD | 33 +------------------------------ linux-cachyos-rt-bore/config | 4 ++-- linux-cachyos-server/PKGBUILD | 33 +------------------------------ linux-cachyos-server/config | 4 ++-- linux-cachyos/PKGBUILD | 35 ++------------------------------- linux-cachyos/config | 4 ++-- 20 files changed, 32 insertions(+), 339 deletions(-) diff --git a/linux-cachyos-bmq/PKGBUILD b/linux-cachyos-bmq/PKGBUILD index 9941f1f84..d9666f06b 100644 --- a/linux-cachyos-bmq/PKGBUILD +++ b/linux-cachyos-bmq/PKGBUILD @@ -127,9 +127,6 @@ # Use this only if you have Turing+ GPU : "${_build_nvidia_open:=no}" -# Build a debug package with non-stripped vmlinux -: "${_build_debug:=no}" - # ATTENTION: Do not modify after this line _is_lto_kernel() { [[ "$_use_llvm_lto" = "thin" || "$_use_llvm_lto" = "full" ]] @@ -162,7 +159,7 @@ _kernuname="${pkgver}-${_pkgsuffix}" arch=('x86_64') url="https://github.com/CachyOS/linux-cachyos" license=('GPL-2.0-only') -options=('!strip' '!debug' '!lto') +options=('!lto' 'zipkmod') makedepends=( bc cpio @@ -605,38 +602,11 @@ _package-headers() { 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-dbg(){ - pkgdesc="Non-stripped vmlinux file for the $pkgdesc kernel" - depends=("${pkgbase}-headers") - - cd "${_srcname}" - mkdir -p "$pkgdir/usr/src/debug/${pkgbase}" - install -Dt "$pkgdir/usr/src/debug/${pkgbase}" -m644 vmlinux -} - _package-zfs(){ pkgdesc="zfs module for the $pkgdesc kernel" depends=('pahole' "${pkgbase}=${_kernver}") @@ -689,7 +659,6 @@ _package-nvidia-open(){ } pkgname=("$pkgbase") -[ "$_build_debug" = "yes" ] && pkgname+=("$pkgbase-dbg") pkgname+=("$pkgbase-headers") [ "$_build_zfs" = "yes" ] && pkgname+=("$pkgbase-zfs") [ "$_build_nvidia" = "yes" ] && pkgname+=("$pkgbase-nvidia") diff --git a/linux-cachyos-bmq/config b/linux-cachyos-bmq/config index 14bd6390a..870f05eb5 100644 --- a/linux-cachyos-bmq/config +++ b/linux-cachyos-bmq/config @@ -1094,8 +1094,8 @@ CONFIG_MODULE_SIG_HASH="sha512" CONFIG_MODULE_COMPRESS=y # CONFIG_MODULE_COMPRESS_GZIP is not set # CONFIG_MODULE_COMPRESS_XZ is not set -CONFIG_MODULE_COMPRESS_ZSTD=y -CONFIG_MODULE_COMPRESS_ALL=y +# CONFIG_MODULE_COMPRESS_ZSTD is not set +# CONFIG_MODULE_COMPRESS_ALL is not set CONFIG_MODULE_DECOMPRESS=y CONFIG_MODULE_ALLOW_MISSING_NAMESPACE_IMPORTS=y CONFIG_MODPROBE_PATH="/sbin/modprobe" diff --git a/linux-cachyos-bore/PKGBUILD b/linux-cachyos-bore/PKGBUILD index c968c0aed..5a9caa684 100644 --- a/linux-cachyos-bore/PKGBUILD +++ b/linux-cachyos-bore/PKGBUILD @@ -127,9 +127,6 @@ # Use this only if you have Turing+ GPU : "${_build_nvidia_open:=no}" -# Build a debug package with non-stripped vmlinux -: "${_build_debug:=no}" - # ATTENTION: Do not modify after this line _is_lto_kernel() { [[ "$_use_llvm_lto" = "thin" || "$_use_llvm_lto" = "full" ]] @@ -162,7 +159,7 @@ _kernuname="${pkgver}-${_pkgsuffix}" arch=('x86_64') url="https://github.com/CachyOS/linux-cachyos" license=('GPL-2.0-only') -options=('!strip' '!debug' '!lto') +options=('!lto' 'zipkmod') makedepends=( bc cpio @@ -605,38 +602,11 @@ _package-headers() { 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-dbg(){ - pkgdesc="Non-stripped vmlinux file for the $pkgdesc kernel" - depends=("${pkgbase}-headers") - - cd "${_srcname}" - mkdir -p "$pkgdir/usr/src/debug/${pkgbase}" - install -Dt "$pkgdir/usr/src/debug/${pkgbase}" -m644 vmlinux -} - _package-zfs(){ pkgdesc="zfs module for the $pkgdesc kernel" depends=('pahole' "${pkgbase}=${_kernver}") @@ -689,7 +659,6 @@ _package-nvidia-open(){ } pkgname=("$pkgbase") -[ "$_build_debug" = "yes" ] && pkgname+=("$pkgbase-dbg") pkgname+=("$pkgbase-headers") [ "$_build_zfs" = "yes" ] && pkgname+=("$pkgbase-zfs") [ "$_build_nvidia" = "yes" ] && pkgname+=("$pkgbase-nvidia") diff --git a/linux-cachyos-bore/config b/linux-cachyos-bore/config index 14bd6390a..870f05eb5 100644 --- a/linux-cachyos-bore/config +++ b/linux-cachyos-bore/config @@ -1094,8 +1094,8 @@ CONFIG_MODULE_SIG_HASH="sha512" CONFIG_MODULE_COMPRESS=y # CONFIG_MODULE_COMPRESS_GZIP is not set # CONFIG_MODULE_COMPRESS_XZ is not set -CONFIG_MODULE_COMPRESS_ZSTD=y -CONFIG_MODULE_COMPRESS_ALL=y +# CONFIG_MODULE_COMPRESS_ZSTD is not set +# CONFIG_MODULE_COMPRESS_ALL is not set CONFIG_MODULE_DECOMPRESS=y CONFIG_MODULE_ALLOW_MISSING_NAMESPACE_IMPORTS=y CONFIG_MODPROBE_PATH="/sbin/modprobe" diff --git a/linux-cachyos-deckify/PKGBUILD b/linux-cachyos-deckify/PKGBUILD index e9ed499da..6ffc8ec99 100644 --- a/linux-cachyos-deckify/PKGBUILD +++ b/linux-cachyos-deckify/PKGBUILD @@ -161,7 +161,7 @@ _kernuname="${pkgver}-${_pkgsuffix}" arch=('x86_64') url="https://github.com/CachyOS/linux-cachyos" license=('GPL-2.0-only') -options=('!strip' '!debug' '!lto') +options=('!lto' 'zipkmod') makedepends=( bc cpio @@ -606,38 +606,11 @@ _package-headers() { 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-dbg(){ - pkgdesc="Non-stripped vmlinux file for the $pkgdesc kernel" - depends=("${pkgbase}-headers") - - cd "${_srcname}" - mkdir -p "$pkgdir/usr/src/debug/${pkgbase}" - install -Dt "$pkgdir/usr/src/debug/${pkgbase}" -m644 vmlinux -} - _package-zfs(){ pkgdesc="zfs module for the $pkgdesc kernel" depends=('pahole' "${pkgbase}=${_kernver}") @@ -690,7 +663,6 @@ _package-nvidia-open(){ } pkgname=("$pkgbase") -[ "$_build_debug" = "yes" ] && pkgname+=("$pkgbase-dbg") pkgname+=("$pkgbase-headers") [ "$_build_zfs" = "yes" ] && pkgname+=("$pkgbase-zfs") [ "$_build_nvidia" = "yes" ] && pkgname+=("$pkgbase-nvidia") diff --git a/linux-cachyos-deckify/config b/linux-cachyos-deckify/config index 88ad46815..fb778f3c2 100644 --- a/linux-cachyos-deckify/config +++ b/linux-cachyos-deckify/config @@ -1094,8 +1094,8 @@ CONFIG_MODULE_SIG_HASH="sha512" CONFIG_MODULE_COMPRESS=y # CONFIG_MODULE_COMPRESS_GZIP is not set # CONFIG_MODULE_COMPRESS_XZ is not set -CONFIG_MODULE_COMPRESS_ZSTD=y -CONFIG_MODULE_COMPRESS_ALL=y +# CONFIG_MODULE_COMPRESS_ZSTD is not set +# CONFIG_MODULE_COMPRESS_ALL is not set CONFIG_MODULE_DECOMPRESS=y CONFIG_MODULE_ALLOW_MISSING_NAMESPACE_IMPORTS=y CONFIG_MODPROBE_PATH="/sbin/modprobe" diff --git a/linux-cachyos-eevdf/PKGBUILD b/linux-cachyos-eevdf/PKGBUILD index 5abcd2510..a5392f69a 100644 --- a/linux-cachyos-eevdf/PKGBUILD +++ b/linux-cachyos-eevdf/PKGBUILD @@ -127,9 +127,6 @@ # Use this only if you have Turing+ GPU : "${_build_nvidia_open:=no}" -# Build a debug package with non-stripped vmlinux -: "${_build_debug:=no}" - # ATTENTION: Do not modify after this line _is_lto_kernel() { [[ "$_use_llvm_lto" = "thin" || "$_use_llvm_lto" = "full" ]] @@ -162,7 +159,7 @@ _kernuname="${pkgver}-${_pkgsuffix}" arch=('x86_64') url="https://github.com/CachyOS/linux-cachyos" license=('GPL-2.0-only') -options=('!strip' '!debug' '!lto') +options=('!lto' 'zipkmod') makedepends=( bc cpio @@ -605,38 +602,11 @@ _package-headers() { 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-dbg(){ - pkgdesc="Non-stripped vmlinux file for the $pkgdesc kernel" - depends=("${pkgbase}-headers") - - cd "${_srcname}" - mkdir -p "$pkgdir/usr/src/debug/${pkgbase}" - install -Dt "$pkgdir/usr/src/debug/${pkgbase}" -m644 vmlinux -} - _package-zfs(){ pkgdesc="zfs module for the $pkgdesc kernel" depends=('pahole' "${pkgbase}=${_kernver}") @@ -689,7 +659,6 @@ _package-nvidia-open(){ } pkgname=("$pkgbase") -[ "$_build_debug" = "yes" ] && pkgname+=("$pkgbase-dbg") pkgname+=("$pkgbase-headers") [ "$_build_zfs" = "yes" ] && pkgname+=("$pkgbase-zfs") [ "$_build_nvidia" = "yes" ] && pkgname+=("$pkgbase-nvidia") diff --git a/linux-cachyos-eevdf/config b/linux-cachyos-eevdf/config index 14bd6390a..870f05eb5 100644 --- a/linux-cachyos-eevdf/config +++ b/linux-cachyos-eevdf/config @@ -1094,8 +1094,8 @@ CONFIG_MODULE_SIG_HASH="sha512" CONFIG_MODULE_COMPRESS=y # CONFIG_MODULE_COMPRESS_GZIP is not set # CONFIG_MODULE_COMPRESS_XZ is not set -CONFIG_MODULE_COMPRESS_ZSTD=y -CONFIG_MODULE_COMPRESS_ALL=y +# CONFIG_MODULE_COMPRESS_ZSTD is not set +# CONFIG_MODULE_COMPRESS_ALL is not set CONFIG_MODULE_DECOMPRESS=y CONFIG_MODULE_ALLOW_MISSING_NAMESPACE_IMPORTS=y CONFIG_MODPROBE_PATH="/sbin/modprobe" diff --git a/linux-cachyos-hardened/PKGBUILD b/linux-cachyos-hardened/PKGBUILD index efcd24b10..17759cf06 100644 --- a/linux-cachyos-hardened/PKGBUILD +++ b/linux-cachyos-hardened/PKGBUILD @@ -127,9 +127,6 @@ # Use this only if you have Turing+ GPU : "${_build_nvidia_open:=no}" -# Build a debug package with non-stripped vmlinux -: "${_build_debug:=no}" - # ATTENTION: Do not modify after this line _is_lto_kernel() { [[ "$_use_llvm_lto" = "thin" || "$_use_llvm_lto" = "full" ]] @@ -162,7 +159,7 @@ _kernuname="${pkgver}-${_pkgsuffix}" arch=('x86_64') url="https://github.com/CachyOS/linux-cachyos" license=('GPL-2.0-only') -options=('!strip' '!debug' '!lto') +options=('!lto' 'zipkmod') makedepends=( bc cpio @@ -604,38 +601,11 @@ _package-headers() { 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-dbg(){ - pkgdesc="Non-stripped vmlinux file for the $pkgdesc kernel" - depends=("${pkgbase}-headers") - - cd "${_srcname}" - mkdir -p "$pkgdir/usr/src/debug/${pkgbase}" - install -Dt "$pkgdir/usr/src/debug/${pkgbase}" -m644 vmlinux -} - _package-zfs(){ pkgdesc="zfs module for the $pkgdesc kernel" depends=('pahole' "${pkgbase}=${_kernver}") @@ -688,7 +658,6 @@ _package-nvidia-open(){ } pkgname=("$pkgbase") -[ "$_build_debug" = "yes" ] && pkgname+=("$pkgbase-dbg") pkgname+=("$pkgbase-headers") [ "$_build_zfs" = "yes" ] && pkgname+=("$pkgbase-zfs") [ "$_build_nvidia" = "yes" ] && pkgname+=("$pkgbase-nvidia") diff --git a/linux-cachyos-hardened/config b/linux-cachyos-hardened/config index 05fe7fbce..bc0e7f5da 100644 --- a/linux-cachyos-hardened/config +++ b/linux-cachyos-hardened/config @@ -1067,8 +1067,8 @@ CONFIG_MODULE_SIG_HASH="sha512" CONFIG_MODULE_COMPRESS=y # CONFIG_MODULE_COMPRESS_GZIP is not set # CONFIG_MODULE_COMPRESS_XZ is not set -CONFIG_MODULE_COMPRESS_ZSTD=y -CONFIG_MODULE_COMPRESS_ALL=y +# CONFIG_MODULE_COMPRESS_ZSTD is not set +# CONFIG_MODULE_COMPRESS_ALL is not set CONFIG_MODULE_DECOMPRESS=y # CONFIG_MODULE_ALLOW_MISSING_NAMESPACE_IMPORTS is not set CONFIG_MODPROBE_PATH="/sbin/modprobe" diff --git a/linux-cachyos-lts/PKGBUILD b/linux-cachyos-lts/PKGBUILD index 2d31b64b1..bcd84c6a3 100644 --- a/linux-cachyos-lts/PKGBUILD +++ b/linux-cachyos-lts/PKGBUILD @@ -128,9 +128,6 @@ # Use this only if you have Turing+ GPU : "${_build_nvidia_open:=no}" -# Build a debug package with non-stripped vmlinux -: "${_build_debug:=no}" - # ATTENTION: Do not modify after this line _is_lto_kernel() { [[ "$_use_llvm_lto" = "thin" || "$_use_llvm_lto" = "full" ]] @@ -163,7 +160,7 @@ _kernuname="${pkgver}-${_pkgsuffix}" arch=('x86_64') url="https://github.com/CachyOS/linux-cachyos" license=('GPL-2.0-only') -options=('!strip' '!debug' '!lto') +options=('!lto' 'zipkmod') makedepends=( bc cpio @@ -605,38 +602,11 @@ _package-headers() { 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-dbg(){ - pkgdesc="Non-stripped vmlinux file for the $pkgdesc kernel" - depends=("${pkgbase}-headers") - - cd "${_srcname}" - mkdir -p "$pkgdir/usr/src/debug/${pkgbase}" - install -Dt "$pkgdir/usr/src/debug/${pkgbase}" -m644 vmlinux -} - _package-zfs(){ pkgdesc="zfs module for the $pkgdesc kernel" depends=('pahole' "${pkgbase}=${_kernver}") @@ -689,7 +659,6 @@ _package-nvidia-open(){ } pkgname=("$pkgbase") -[ "$_build_debug" = "yes" ] && pkgname+=("$pkgbase-dbg") pkgname+=("$pkgbase-headers") [ "$_build_zfs" = "yes" ] && pkgname+=("$pkgbase-zfs") [ "$_build_nvidia" = "yes" ] && pkgname+=("$pkgbase-nvidia") diff --git a/linux-cachyos-lts/config b/linux-cachyos-lts/config index 72eb2a82a..5751c71a0 100644 --- a/linux-cachyos-lts/config +++ b/linux-cachyos-lts/config @@ -1088,8 +1088,8 @@ CONFIG_MODULE_SIG_HASH="sha512" CONFIG_MODULE_COMPRESS=y # CONFIG_MODULE_COMPRESS_GZIP is not set # CONFIG_MODULE_COMPRESS_XZ is not set -CONFIG_MODULE_COMPRESS_ZSTD=y -CONFIG_MODULE_COMPRESS_ALL=y +# CONFIG_MODULE_COMPRESS_ZSTD is not set +# CONFIG_MODULE_COMPRESS_ALL is not set CONFIG_MODULE_DECOMPRESS=y CONFIG_MODULE_ALLOW_MISSING_NAMESPACE_IMPORTS=y CONFIG_MODPROBE_PATH="/sbin/modprobe" diff --git a/linux-cachyos-rc/PKGBUILD b/linux-cachyos-rc/PKGBUILD index 3742ce048..cf146055c 100644 --- a/linux-cachyos-rc/PKGBUILD +++ b/linux-cachyos-rc/PKGBUILD @@ -126,13 +126,10 @@ # Use this only if you have Turing+ GPU : "${_build_nvidia_open:=no}" -# Build a debug package with non-stripped vmlinux -: "${_build_debug:=no}" - # Enable AUTOFDO_CLANG for the first compilation to create a kernel, which can be used for profiling # Workflow: # https://cachyos.org/blog/2411-kernel-autofdo/ -# 1. Compile Kernel with _autofdo=yes and _build_debug=yes +# 1. Compile Kernel with _autofdo=yes and add debug option in your makepkg.conf # 2. Boot the kernel in QEMU or on your system, see Workload # 3. Profile the kernel and convert the profile, see Generating the Profile for AutoFDO # 4. Put the profile into the sourcedir @@ -187,7 +184,7 @@ _kernuname="${pkgver}-${_pkgsuffix}" arch=('x86_64') url="https://github.com/CachyOS/linux-cachyos" license=('GPL-2.0-only') -options=('!strip' '!debug' '!lto') +options=('!lto' 'zipkmod') makedepends=( bc cpio @@ -669,38 +666,11 @@ _package-headers() { 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-dbg(){ - pkgdesc="Non-stripped vmlinux file for the $pkgdesc kernel" - depends=("${pkgbase}-headers") - - cd "${_srcname}" - mkdir -p "$pkgdir/usr/src/debug/${pkgbase}" - install -Dt "$pkgdir/usr/src/debug/${pkgbase}" -m644 vmlinux -} - _package-zfs(){ pkgdesc="zfs module for the $pkgdesc kernel" depends=('pahole' "${pkgbase}=${_kernver}") @@ -753,7 +723,6 @@ _package-nvidia-open(){ } pkgname=("$pkgbase") -[ "$_build_debug" = "yes" ] && pkgname+=("$pkgbase-dbg") pkgname+=("$pkgbase-headers") [ "$_build_zfs" = "yes" ] && pkgname+=("$pkgbase-zfs") [ "$_build_nvidia" = "yes" ] && pkgname+=("$pkgbase-nvidia") diff --git a/linux-cachyos-rc/config b/linux-cachyos-rc/config index bd9c02319..cef7e88b2 100644 --- a/linux-cachyos-rc/config +++ b/linux-cachyos-rc/config @@ -1094,8 +1094,8 @@ CONFIG_MODULE_SIG_HASH="sha512" CONFIG_MODULE_COMPRESS=y # CONFIG_MODULE_COMPRESS_GZIP is not set # CONFIG_MODULE_COMPRESS_XZ is not set -CONFIG_MODULE_COMPRESS_ZSTD=y -CONFIG_MODULE_COMPRESS_ALL=y +# CONFIG_MODULE_COMPRESS_ZSTD is not set +# CONFIG_MODULE_COMPRESS_ALL is not set CONFIG_MODULE_DECOMPRESS=y CONFIG_MODULE_ALLOW_MISSING_NAMESPACE_IMPORTS=y CONFIG_MODPROBE_PATH="/sbin/modprobe" diff --git a/linux-cachyos-rt-bore/PKGBUILD b/linux-cachyos-rt-bore/PKGBUILD index c7bd60274..ea615c764 100644 --- a/linux-cachyos-rt-bore/PKGBUILD +++ b/linux-cachyos-rt-bore/PKGBUILD @@ -127,9 +127,6 @@ # Use this only if you have Turing+ GPU : "${_build_nvidia_open:=no}" -# Build a debug package with non-stripped vmlinux -: "${_build_debug:=no}" - # ATTENTION: Do not modify after this line _is_lto_kernel() { [[ "$_use_llvm_lto" = "thin" || "$_use_llvm_lto" = "full" ]] @@ -162,7 +159,7 @@ _kernuname="${pkgver}-${_pkgsuffix}" arch=('x86_64') url="https://github.com/CachyOS/linux-cachyos" license=('GPL-2.0-only') -options=('!strip' '!debug' '!lto') +options=('!lto' 'zipkmod') makedepends=( bc cpio @@ -605,38 +602,11 @@ _package-headers() { 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-dbg(){ - pkgdesc="Non-stripped vmlinux file for the $pkgdesc kernel" - depends=("${pkgbase}-headers") - - cd "${_srcname}" - mkdir -p "$pkgdir/usr/src/debug/${pkgbase}" - install -Dt "$pkgdir/usr/src/debug/${pkgbase}" -m644 vmlinux -} - _package-zfs(){ pkgdesc="zfs module for the $pkgdesc kernel" depends=('pahole' "${pkgbase}=${_kernver}") @@ -689,7 +659,6 @@ _package-nvidia-open(){ } pkgname=("$pkgbase") -[ "$_build_debug" = "yes" ] && pkgname+=("$pkgbase-dbg") pkgname+=("$pkgbase-headers") [ "$_build_zfs" = "yes" ] && pkgname+=("$pkgbase-zfs") [ "$_build_nvidia" = "yes" ] && pkgname+=("$pkgbase-nvidia") diff --git a/linux-cachyos-rt-bore/config b/linux-cachyos-rt-bore/config index 14bd6390a..870f05eb5 100644 --- a/linux-cachyos-rt-bore/config +++ b/linux-cachyos-rt-bore/config @@ -1094,8 +1094,8 @@ CONFIG_MODULE_SIG_HASH="sha512" CONFIG_MODULE_COMPRESS=y # CONFIG_MODULE_COMPRESS_GZIP is not set # CONFIG_MODULE_COMPRESS_XZ is not set -CONFIG_MODULE_COMPRESS_ZSTD=y -CONFIG_MODULE_COMPRESS_ALL=y +# CONFIG_MODULE_COMPRESS_ZSTD is not set +# CONFIG_MODULE_COMPRESS_ALL is not set CONFIG_MODULE_DECOMPRESS=y CONFIG_MODULE_ALLOW_MISSING_NAMESPACE_IMPORTS=y CONFIG_MODPROBE_PATH="/sbin/modprobe" diff --git a/linux-cachyos-server/PKGBUILD b/linux-cachyos-server/PKGBUILD index 23d5a3601..e1221acf3 100644 --- a/linux-cachyos-server/PKGBUILD +++ b/linux-cachyos-server/PKGBUILD @@ -127,9 +127,6 @@ # Use this only if you have Turing+ GPU : "${_build_nvidia_open:=no}" -# Build a debug package with non-stripped vmlinux -: "${_build_debug:=yes}" - # ATTENTION: Do not modify after this line _is_lto_kernel() { [[ "$_use_llvm_lto" = "thin" || "$_use_llvm_lto" = "full" ]] @@ -162,7 +159,7 @@ _kernuname="${pkgver}-${_pkgsuffix}" arch=('x86_64') url="https://github.com/CachyOS/linux-cachyos" license=('GPL-2.0-only') -options=('!strip' '!debug' '!lto') +options=('!lto' 'zipkmod') makedepends=( bc cpio @@ -601,38 +598,11 @@ _package-headers() { 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-dbg(){ - pkgdesc="Non-stripped vmlinux file for the $pkgdesc kernel" - depends=("${pkgbase}-headers") - - cd "${_srcname}" - mkdir -p "$pkgdir/usr/src/debug/${pkgbase}" - install -Dt "$pkgdir/usr/src/debug/${pkgbase}" -m644 vmlinux -} - _package-zfs(){ pkgdesc="zfs module for the $pkgdesc kernel" depends=('pahole' "${pkgbase}=${_kernver}") @@ -685,7 +655,6 @@ _package-nvidia-open(){ } pkgname=("$pkgbase") -[ "$_build_debug" = "yes" ] && pkgname+=("$pkgbase-dbg") pkgname+=("$pkgbase-headers") [ "$_build_zfs" = "yes" ] && pkgname+=("$pkgbase-zfs") [ "$_build_nvidia" = "yes" ] && pkgname+=("$pkgbase-nvidia") diff --git a/linux-cachyos-server/config b/linux-cachyos-server/config index 14bd6390a..870f05eb5 100644 --- a/linux-cachyos-server/config +++ b/linux-cachyos-server/config @@ -1094,8 +1094,8 @@ CONFIG_MODULE_SIG_HASH="sha512" CONFIG_MODULE_COMPRESS=y # CONFIG_MODULE_COMPRESS_GZIP is not set # CONFIG_MODULE_COMPRESS_XZ is not set -CONFIG_MODULE_COMPRESS_ZSTD=y -CONFIG_MODULE_COMPRESS_ALL=y +# CONFIG_MODULE_COMPRESS_ZSTD is not set +# CONFIG_MODULE_COMPRESS_ALL is not set CONFIG_MODULE_DECOMPRESS=y CONFIG_MODULE_ALLOW_MISSING_NAMESPACE_IMPORTS=y CONFIG_MODPROBE_PATH="/sbin/modprobe" diff --git a/linux-cachyos/PKGBUILD b/linux-cachyos/PKGBUILD index ec0de0176..4bb5b8617 100644 --- a/linux-cachyos/PKGBUILD +++ b/linux-cachyos/PKGBUILD @@ -126,13 +126,10 @@ # Use this only if you have Turing+ GPU : "${_build_nvidia_open:=no}" -# Build a debug package with non-stripped vmlinux -: "${_build_debug:=no}" - # Enable AUTOFDO_CLANG for the first compilation to create a kernel, which can be used for profiling # Workflow: # https://cachyos.org/blog/2411-kernel-autofdo/ -# 1. Compile Kernel with _autofdo=yes and _build_debug=yes +# 1. Compile Kernel with _autofdo=yes and add debug option in your makepkg.conf # 2. Boot the kernel in QEMU or on your system, see Workload # 3. Profile the kernel and convert the profile, see Generating the Profile for AutoFDO # 4. Put the profile into the sourcedir @@ -187,7 +184,7 @@ _kernuname="${pkgver}-${_pkgsuffix}" arch=('x86_64') url="https://github.com/CachyOS/linux-cachyos" license=('GPL-2.0-only') -options=('!strip' '!debug' '!lto') +options=('!lto' 'zipkmod') makedepends=( bc cpio @@ -670,38 +667,11 @@ _package-headers() { 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-dbg(){ - pkgdesc="Non-stripped vmlinux file for the $pkgdesc kernel" - depends=("${pkgbase}-headers") - - cd "${_srcname}" - mkdir -p "$pkgdir/usr/src/debug/${pkgbase}" - install -Dt "$pkgdir/usr/src/debug/${pkgbase}" -m644 vmlinux -} - _package-zfs(){ pkgdesc="zfs module for the $pkgdesc kernel" depends=('pahole' "${pkgbase}=${_kernver}") @@ -754,7 +724,6 @@ _package-nvidia-open(){ } pkgname=("$pkgbase") -[ "$_build_debug" = "yes" ] && pkgname+=("$pkgbase-dbg") pkgname+=("$pkgbase-headers") [ "$_build_zfs" = "yes" ] && pkgname+=("$pkgbase-zfs") [ "$_build_nvidia" = "yes" ] && pkgname+=("$pkgbase-nvidia") diff --git a/linux-cachyos/config b/linux-cachyos/config index 14bd6390a..870f05eb5 100644 --- a/linux-cachyos/config +++ b/linux-cachyos/config @@ -1094,8 +1094,8 @@ CONFIG_MODULE_SIG_HASH="sha512" CONFIG_MODULE_COMPRESS=y # CONFIG_MODULE_COMPRESS_GZIP is not set # CONFIG_MODULE_COMPRESS_XZ is not set -CONFIG_MODULE_COMPRESS_ZSTD=y -CONFIG_MODULE_COMPRESS_ALL=y +# CONFIG_MODULE_COMPRESS_ZSTD is not set +# CONFIG_MODULE_COMPRESS_ALL is not set CONFIG_MODULE_DECOMPRESS=y CONFIG_MODULE_ALLOW_MISSING_NAMESPACE_IMPORTS=y CONFIG_MODPROBE_PATH="/sbin/modprobe"