Re: [PATCH] kbuild: install-extmod-build: Package resolve_btfids if necessary

From: Nathan Chancellor

Date: Thu Feb 26 2026 - 15:38:16 EST


On Thu, Feb 26, 2026 at 08:41:48AM +0100, Thomas Weißschuh wrote:
> When CONFIG_DEBUG_INFO_BTF_MODULES is enabled and vmlinux is available,
> Makefilefile.modfinal and gen-btf.sh will try to use resolve_btfids
> on the module .ko. install-extmod-build currently does not package
> resolve_btfids, so that step fails.

Heh, ironic that I was just looking in that area yesterday and I had
thought that this would be necessary if vmlinux is available but then
never followed up... Thanks for this.

> Also package resolve_btfids if it may get used.
>
> Signed-off-by: Thomas Weißschuh <thomas.weissschuh@xxxxxxxxxxxxx>

Nicolas, can I take this as a fix?

> ---
> scripts/package/install-extmod-build | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/scripts/package/install-extmod-build b/scripts/package/install-extmod-build
> index 2576cf7902db..f12e1ffe409e 100755
> --- a/scripts/package/install-extmod-build
> +++ b/scripts/package/install-extmod-build
> @@ -32,6 +32,10 @@ mkdir -p "${destdir}"
> echo tools/objtool/objtool
> fi
>
> + if is_enabled CONFIG_DEBUG_INFO_BTF_MODULES; then
> + echo tools/bpf/resolve_btfids/resolve_btfids
> + fi
> +
> echo Module.symvers
> echo "arch/${SRCARCH}/include/generated"
> echo include/config/auto.conf
>
> ---
> base-commit: 6de23f81a5e08be8fbf5e8d7e9febc72a5b5f27f
> change-id: 20260226-kbuild-resolve_btfids-ca233983ebbb
>
> Best regards,
> --
> Thomas Weißschuh <thomas.weissschuh@xxxxxxxxxxxxx>
>