public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Nicolas Schier <nicolas@fjasle.eu>
To: Masahiro Yamada <masahiroy@kernel.org>
Cc: linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org,
	x86@kernel.org, Borislav Petkov <bp@alien8.de>,
	Dave Hansen <dave.hansen@linux.intel.com>,
	"H. Peter Anvin" <hpa@zytor.com>, Ingo Molnar <mingo@redhat.com>,
	Michal Simek <monstr@monstr.eu>,
	Thomas Gleixner <tglx@linutronix.de>
Subject: Re: [PATCH] kbuild: fix "cat: .version: No such file or directory"
Date: Wed, 23 Nov 2022 22:27:09 +0100	[thread overview]
Message-ID: <Y36QLYKPsP3BXLO3@bergen.fjasle.eu> (raw)
In-Reply-To: <20221122143902.272330-1-masahiroy@kernel.org>

[-- Attachment #1: Type: text/plain, Size: 2792 bytes --]

On Tue 22 Nov 2022 23:39:02 GMT, Masahiro Yamada wrote:
> Since commit 2df8220cc511 ("kbuild: build init/built-in.a just once"),
> the .version file is not touched at all when KBUILD_BUILD_VERSION is
> given.
> 
> If KBUILD_BUILD_VERSION is specified and the .version file is missing
> (for example right after 'make mrproper'), "No such file or director"
> is shown. Even if the .version exists, it is irrelevant to the version
> of the current build.
> 
>   $ make -j$(nproc) KBUILD_BUILD_VERSION=100 mrproper defconfig all
>     [ snip ]
>     BUILD   arch/x86/boot/bzImage
>   cat: .version: No such file or directory
>   Kernel: arch/x86/boot/bzImage is ready  (#)
> 
> Show KBUILD_BUILD_VERSION if it is given.
> 
> Fixes: 2df8220cc511 ("kbuild: build init/built-in.a just once")
> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
> ---

Reviewed-by: Nicolas Schier <nicolas@fjasle.eu>

> 
>  arch/microblaze/Makefile | 4 ++--
>  arch/x86/boot/Makefile   | 2 +-
>  2 files changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/arch/microblaze/Makefile b/arch/microblaze/Makefile
> index 3f8a86c4336a..02e6be9c5b0d 100644
> --- a/arch/microblaze/Makefile
> +++ b/arch/microblaze/Makefile
> @@ -67,12 +67,12 @@ linux.bin.ub linux.bin.gz: linux.bin
>  linux.bin: vmlinux
>  linux.bin linux.bin.gz linux.bin.ub:
>  	$(Q)$(MAKE) $(build)=$(boot) $(boot)/$@
> -	@echo 'Kernel: $(boot)/$@ is ready' ' (#'`cat .version`')'
> +	@echo 'Kernel: $(boot)/$@ is ready' ' (#'$(or $(KBUILD_BUILD_VERSION),`cat .version`)')'
>  
>  PHONY += simpleImage.$(DTB)
>  simpleImage.$(DTB): vmlinux
>  	$(Q)$(MAKE) $(build)=$(boot) $(addprefix $(boot)/$@., ub unstrip strip)
> -	@echo 'Kernel: $(boot)/$@ is ready' ' (#'`cat .version`')'
> +	@echo 'Kernel: $(boot)/$@ is ready' ' (#'$(or $(KBUILD_BUILD_VERSION),`cat .version`)')'
>  
>  define archhelp
>    echo '* linux.bin    - Create raw binary'
> diff --git a/arch/x86/boot/Makefile b/arch/x86/boot/Makefile
> index 9860ca5979f8..9e38ffaadb5d 100644
> --- a/arch/x86/boot/Makefile
> +++ b/arch/x86/boot/Makefile
> @@ -83,7 +83,7 @@ cmd_image = $(obj)/tools/build $(obj)/setup.bin $(obj)/vmlinux.bin \
>  
>  $(obj)/bzImage: $(obj)/setup.bin $(obj)/vmlinux.bin $(obj)/tools/build FORCE
>  	$(call if_changed,image)
> -	@$(kecho) 'Kernel: $@ is ready' ' (#'`cat .version`')'
> +	@$(kecho) 'Kernel: $@ is ready' ' (#'$(or $(KBUILD_BUILD_VERSION),`cat .version`)')'
>  
>  OBJCOPYFLAGS_vmlinux.bin := -O binary -R .note -R .comment -S
>  $(obj)/vmlinux.bin: $(obj)/compressed/vmlinux FORCE
> -- 
> 2.34.1

-- 
epost|xmpp: nicolas@fjasle.eu          irc://oftc.net/nsc
↳ gpg: 18ed 52db e34f 860e e9fb  c82b 7d97 0932 55a0 ce7f
     -- frykten for herren er opphav til kunnskap --

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

      reply	other threads:[~2022-11-23 21:28 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-22 14:39 [PATCH] kbuild: fix "cat: .version: No such file or directory" Masahiro Yamada
2022-11-23 21:27 ` Nicolas Schier [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=Y36QLYKPsP3BXLO3@bergen.fjasle.eu \
    --to=nicolas@fjasle.eu \
    --cc=bp@alien8.de \
    --cc=dave.hansen@linux.intel.com \
    --cc=hpa@zytor.com \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=masahiroy@kernel.org \
    --cc=mingo@redhat.com \
    --cc=monstr@monstr.eu \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.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