mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: linux@weissschuh.net
To: 1127955419@qq.com
Cc: christian@heusel.eu, nathan@kernel.org, masahiroy@kernel.org,
	nicolas@fjasle.eu, linux-kbuild@vger.kernel.org,
	linux-kernel@vger.kernel.org, zachwade.k@gmail.com
Subject: Re: [PATCH] kbuild: add package-dbg to pacman packages
Date: Mon, 23 Sep 2024 14:05:08 +0200 (GMT+02:00)	[thread overview]
Message-ID: <13565319-6dc6-4f15-ae02-3b3e760efa01@weissschuh.net> (raw)
In-Reply-To: <tencent_7DE03EC9AEAFF374BDAB9CCCF4C047EF2305@qq.com>

Hi,

Sep 23, 2024 13:58:06 1127955419@qq.com:

> From: Li XingYang <1127955419@qq.com>
>
> The current pacman package does not include the debuginfo package
> add debuginfo package that include vmlinux
> vmlinux is very useful when debugging the kernel using crash

This is already implemented in
"kbuild: add debug package to pacman PKGBUILD"
which is in the kbuild tree.

https://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild.git/commit/?h=kbuild&id=4929f5b95f6b20ae10f2c409fb2ca58253e73706

>
> Signed-off-by: Li XingYang <1127955419@qq.com>
> ---
> scripts/package/PKGBUILD | 14 +++++++++++++-
> 1 file changed, 13 insertions(+), 1 deletion(-)
>
> diff --git a/scripts/package/PKGBUILD b/scripts/package/PKGBUILD
> index 663ce300dd06..4b5c435e5eaa 100644
> --- a/scripts/package/PKGBUILD
> +++ b/scripts/package/PKGBUILD
> @@ -5,7 +5,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}-headers" "${pkgbase}-dbg")
> fi
> pkgver="${KERNELRELEASE//-/_}"
> # The PKGBUILD is evaluated multiple times.
> @@ -100,6 +100,18 @@ _package-api-headers() {
>     ${MAKE} headers_install INSTALL_HDR_PATH="${pkgdir}/usr"
> }
>
> +_package-dbg() {
> +   pkgdesc="debuginfo for the ${pkgdesc} kernel"
> +
> +   export MAKEFLAGS="${KBUILD_MAKEFLAGS}"
> +   cd "${objtree}"
> +   local builddir="${pkgdir}/usr/${MODLIB}/build"
> +   mkdir -p "${builddir}"
> +
> +   echo "Installing vmlinux..."
> +   cp vmlinux "${builddir}/vmlinux"
> +}
> +
> for _p in "${pkgname[@]}"; do
>     eval "package_$_p() {
>         $(declare -f "_package${_p#$pkgbase}")
> --
> 2.46.1


      reply	other threads:[~2024-09-23 12:05 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-23 11:57 1127955419
2024-09-23 12:05 ` linux [this message]

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=13565319-6dc6-4f15-ae02-3b3e760efa01@weissschuh.net \
    --to=linux@weissschuh.net \
    --cc=1127955419@qq.com \
    --cc=christian@heusel.eu \
    --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=zachwade.k@gmail.com \
    /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®