[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20260121234748.GA2137017@ax162>
Date: Wed, 21 Jan 2026 16:47:48 -0700
From: Nathan Chancellor <nathan@...nel.org>
To: Tiezhu Yang <yangtiezhu@...ngson.cn>
Cc: Nicolas Schier <nsc@...nel.org>, linux-kbuild@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [RFC PATCH 2/3] kbuild: Make sure to generate config file
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@...ngson.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
>
Powered by blists - more mailing lists