[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240801132945.47963-1-jose.fernandez@linux.dev>
Date: Thu, 1 Aug 2024 07:29:40 -0600
From: Jose Fernandez <jose.fernandez@...ux.dev>
To: Thomas Weißschuh <linux@...ssschuh.net>,
Christian Heusel <christian@...sel.eu>,
Nathan Chancellor <nathan@...nel.org>,
Masahiro Yamada <masahiroy@...nel.org>,
Nicolas Schier <nicolas@...sle.eu>
Cc: Jose Fernandez <jose.fernandez@...ux.dev>,
Peter Jung <ptr1337@...hyos.org>,
linux-kbuild@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: [PATCH] kbuild: add debug package to pacman PKGBUILD
Add a new -debug package to the pacman PKGBUILD that will contain the
vmlinux image for debugging purposes. This package depends on the
-headers package and will be installed in /usr/src/debug/${pkgbase}.
The vmlinux image is needed to debug core dumps with tools like crash.
Signed-off-by: Jose Fernandez <jose.fernandez@...ux.dev>
Reviewed-by: Peter Jung <ptr1337@...hyos.org>
---
scripts/package/PKGBUILD | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/scripts/package/PKGBUILD b/scripts/package/PKGBUILD
index 663ce300dd06..beda3db21863 100644
--- a/scripts/package/PKGBUILD
+++ b/scripts/package/PKGBUILD
@@ -6,6 +6,7 @@ pkgbase=${PACMAN_PKGBASE:-linux-upstream}
pkgname=("${pkgbase}" "${pkgbase}-api-headers")
if grep -q CONFIG_MODULES=y include/config/auto.conf; then
pkgname+=("${pkgbase}-headers")
+ pkgname+=("${pkgbase}-debug")
fi
pkgver="${KERNELRELEASE//-/_}"
# The PKGBUILD is evaluated multiple times.
@@ -89,6 +90,15 @@ _package-headers() {
ln -sr "${builddir}" "${pkgdir}/usr/src/${pkgbase}"
}
+_package-debug(){
+ pkgdesc="Non-stripped vmlinux file for the ${pkgdesc} kernel"
+ depends=(${pkgbase}-headers)
+
+ cd "${objtree}"
+ mkdir -p "$pkgdir/usr/src/debug/${pkgbase}"
+ install -Dt "$pkgdir/usr/src/debug/${pkgbase}" -m644 vmlinux
+}
+
_package-api-headers() {
pkgdesc="Kernel headers sanitized for use in userspace"
provides=(linux-api-headers)
--
2.46.0
Powered by blists - more mailing lists