mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Thomas Weißschuh" <linux@weissschuh.net>
To: Jose Fernandez <jose.fernandez@linux.dev>
Cc: Christian Heusel <christian@heusel.eu>,
	 Nathan Chancellor <nathan@kernel.org>,
	Masahiro Yamada <masahiroy@kernel.org>,
	 Nicolas Schier <nicolas@fjasle.eu>,
	Peter Jung <ptr1337@cachyos.org>,
	linux-kbuild@vger.kernel.org,  linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3] kbuild: add debug package to pacman PKGBUILD
Date: Thu, 29 Aug 2024 13:03:38 +0200	[thread overview]
Message-ID: <5f02a2e0-342d-472c-8a13-dc369391492d@t-8ch.de> (raw)
In-Reply-To: <20240824220756.73091-1-jose.fernandez@linux.dev>

On 2024-08-24 16:07:56+0000, Jose Fernandez wrote:
> Add a new debug package to the PKGBUILD for the pacman-pkg target. The
> debug package includes the non-stripped vmlinux file with debug symbols
> for kernel debugging and profiling. The file is installed at
> /usr/src/debug/${pkgbase}, with a symbolic link at
> /usr/lib/modules/$(uname -r)/build/vmlinux. The debug package is built
> by default.
> 
> Signed-off-by: Jose Fernandez <jose.fernandez@linux.dev>
> Reviewed-by: Peter Jung <ptr1337@cachyos.org>

Acked-by: Thomas Weißschuh <linux@weissschuh.net>

Thanks!

> ---
> v2->v3:
> - Remove unnecessary mkdir -p "$pkgdir/usr/src/debug/${pkgbase}"
> - Use the new _prologue() function [1]
> - Add symbolic link to /usr/lib/modules/$(uname -r)/build/vmlinux
> - Remove the dependency on the headers package
> v1->v2:
> - Use the new PACMAN_EXTRAPACKAGES [2] variable to allow users to disable the
> debug package if desired, instead of always including it.
> 
> [1] https://lore.kernel.org/lkml/20240816141844.1217356-1-masahiroy@kernel.org/
> [2] https://lore.kernel.org/lkml/20240813185900.GA140556@thelio-3990X/T/
> 
>  scripts/package/PKGBUILD | 15 ++++++++++++++-
>  1 file changed, 14 insertions(+), 1 deletion(-)
> 
> diff --git a/scripts/package/PKGBUILD b/scripts/package/PKGBUILD
> index 839cd5e634d2..f83493838cf9 100644
> --- a/scripts/package/PKGBUILD
> +++ b/scripts/package/PKGBUILD
> @@ -5,7 +5,7 @@
>  pkgbase=${PACMAN_PKGBASE:-linux-upstream}
>  pkgname=("${pkgbase}")
>  
> -_extrapackages=${PACMAN_EXTRAPACKAGES-headers api-headers}
> +_extrapackages=${PACMAN_EXTRAPACKAGES-headers api-headers debug}
>  for pkg in $_extrapackages; do
>  	pkgname+=("${pkgbase}-${pkg}")
>  done
> @@ -111,6 +111,19 @@ _package-api-headers() {
>  	${MAKE} headers_install INSTALL_HDR_PATH="${pkgdir}/usr"
>  }
>  
> +_package-debug(){
> +	pkgdesc="Non-stripped vmlinux file for the ${pkgdesc} kernel"
> +
> +	local debugdir="${pkgdir}/usr/src/debug/${pkgbase}"
> +	local builddir="${pkgdir}/usr/${MODLIB}/build"
> +
> +	_prologue
> +
> +	install -Dt "${debugdir}" -m644 vmlinux
> +	mkdir -p "${builddir}"
> +	ln -sr "${debugdir}/vmlinux" "${builddir}/vmlinux"
> +}
> +
>  for _p in "${pkgname[@]}"; do
>  	eval "package_$_p() {
>  		$(declare -f "_package${_p#$pkgbase}")
> 
> base-commit: df829331cf5cccb2a1fdd7560eabfcec49f9b990
> -- 
> 2.46.0
> 

  reply	other threads:[~2024-08-29 11:03 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-24 22:07 Jose Fernandez
2024-08-29 11:03 ` Thomas Weißschuh [this message]
2024-09-01 11:37 ` Masahiro Yamada

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5f02a2e0-342d-472c-8a13-dc369391492d@t-8ch.de \
    --to=linux@weissschuh.net \
    --cc=christian@heusel.eu \
    --cc=jose.fernandez@linux.dev \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=masahiroy@kernel.org \
    --cc=nathan@kernel.org \
    --cc=nicolas@fjasle.eu \
    --cc=ptr1337@cachyos.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®