Linux kbuild/kconfig development
 help / color / mirror / Atom feed
From: Nathan Chancellor <nathan@kernel.org>
To: Tiezhu Yang <yangtiezhu@loongson.cn>
Cc: Nicolas Schier <nsc@kernel.org>,
	linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [RFC PATCH 2/3] kbuild: Make sure to generate config file
Date: Wed, 21 Jan 2026 16:47:48 -0700	[thread overview]
Message-ID: <20260121234748.GA2137017@ax162> (raw)
In-Reply-To: <20260120123730.30487-3-yangtiezhu@loongson.cn>

Hi Tiezhu,

On Tue, Jan 20, 2026 at 08:37:29PM +0800, Tiezhu Yang wrote:
> After commit 75cffd392bfa ("LoongArch: Using generic scripts/install.sh
> in `make install`"), arch/loongarch/boot/install.sh is usually not used,
> either /root/bin/installkernel or /sbin/installkernel is used if found.
> 
> Then it can not generate the config file in most cases, just copy it to
> the installation path. Otherwise there may be an error when testing bpf,
> for example.
> 
>   $ ./test_verifier
>   gzopen /boot/config-6.19.0-rc6: No such file or directorg

This could also be resolved by enabling CONFIG_IKCONFIG_PROC.

> Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>
> ---
>  scripts/install.sh | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/scripts/install.sh b/scripts/install.sh
> index 05d62ac513ee..ecf354d8f4f1 100755
> --- a/scripts/install.sh
> +++ b/scripts/install.sh
> @@ -34,6 +34,12 @@ do
>  		continue
>  	fi
>  
> +	# Install kernel config file
> +	if [ -f ${INSTALL_PATH}/config-${KERNELRELEASE} ]; then
> +	  mv ${INSTALL_PATH}/config-${KERNELRELEASE} ${INSTALL_PATH}/config-${KERNELRELEASE}.old
> +	fi
> +	cp .config ${INSTALL_PATH}/config-${KERNELRELEASE}
> +

I am a little hesistant to change the generic install logic to handle
these files, especially since the map file should be handled by
installkernel like you mention in patch 3 (but I am open to other
opinions/arguments) and the configuration can be made available via
CONFIG_IKCONFIG_PROC as I mention above.

If LoongArch wants this behavior as part of its install process, why not
just bring back the lines of 75cffd392bfa after $(cmd,install)

install:
    $(call cmd,install)
    $(Q)install -D -m 644 .config $(INSTALL_PATH)/config-$(KERNELRELEASE)
    $(Q)install -D -m 644 System.map $(INSTALL_PATH)/System.map-$(KERNELRELEASE)

>  	# installkernel(8) says the parameters are like follows:
>  	#
>  	#   installkernel version zImage System.map [directory]
> -- 
> 2.42.0
> 

  reply	other threads:[~2026-01-21 23:47 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-20 12:37 [RFC PATCH 0/3] kbuild: Make sure to generate config and System.map Tiezhu Yang
2026-01-20 12:37 ` [RFC PATCH 1/3] MAINTAINERS: Add scripts/install.sh into Kbuild entry Tiezhu Yang
2026-02-04  0:16   ` (subset) " Nathan Chancellor
2026-01-20 12:37 ` [RFC PATCH 2/3] kbuild: Make sure to generate config file Tiezhu Yang
2026-01-21 23:47   ` Nathan Chancellor [this message]
2026-01-22  1:14     ` Tiezhu Yang
2026-01-22  5:15       ` Nathan Chancellor
2026-01-22  8:58         ` Tiezhu Yang
2026-01-20 12:37 ` [RFC PATCH 3/3] kbuild: Make sure to generate System.map file Tiezhu Yang

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=20260121234748.GA2137017@ax162 \
    --to=nathan@kernel.org \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nsc@kernel.org \
    --cc=yangtiezhu@loongson.cn \
    /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