public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Michal Simek <monstr@monstr.eu>,
	linux-kernel@vger.kernel.org,
	Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>,
	"H. Peter Anvin" <hpa@zytor.com>,
	x86@kernel.org, linux-kbuild@vger.kernel.org,
	Masahiro Yamada <masahiroy@kernel.org>,
	Michal Marek <michal.lkml@markovi.net>
Subject: Re: [PATCH v1] kbuild: Fix off-by-one error when generate a new version
Date: Mon, 27 Jan 2020 12:05:42 +0200	[thread overview]
Message-ID: <20200127100542.GV32742@smile.fi.intel.com> (raw)
In-Reply-To: <20200124195859.86991-1-andriy.shevchenko@linux.intel.com>

On Fri, Jan 24, 2020 at 09:58:59PM +0200, Andy Shevchenko wrote:
> When build on, for example, x86 using `make O=... -j64` the version
> in the built kernel comes from include/generated/compile.h, which is:
> 
> 	#define UTS_VERSION "#351 SMP Fri Jan 24 18:46:34 EET 2020"
> 
> While at the end the x86 specific Makefile prints the contents of
> the .version file:
> 
> 	Kernel: arch/x86/boot/bzImage is ready  (#352)
> 
> Obviously the latter is not true. This happens because we first
> check compile.h and update it and then generate new version, which is
> incorrect flow:
> 
>   CHK     include/generated/compile.h
>   UPD     include/generated/compile.h
>   ...
>   GEN     .version
> 
> In order to fix this, move the version generation from link-vmlinux.sh
> to scripts/version.sh and re-use it in init/Makefile.
> 
> Additionally provide a unified way to get the current version of the build
> and use this in few callers. This will respect the KBUILD_BUILD_VERSION
> in case it's provided.

Hmm... It looks like a mess in my build tree.
I have to setup more experiments here.

-- 
With Best Regards,
Andy Shevchenko



  reply	other threads:[~2020-01-27 10:05 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-24 19:58 [PATCH v1] kbuild: Fix off-by-one error when generate a new version Andy Shevchenko
2020-01-27 10:05 ` Andy Shevchenko [this message]
2020-02-10 20:13   ` Masahiro Yamada
2020-02-10 20:23     ` Andy Shevchenko

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=20200127100542.GV32742@smile.fi.intel.com \
    --to=andriy.shevchenko@linux.intel.com \
    --cc=bp@alien8.de \
    --cc=hpa@zytor.com \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=masahiroy@kernel.org \
    --cc=michal.lkml@markovi.net \
    --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