public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jeevan Shriram <jshriram@codeaurora.org>
To: Masahiro Yamada <masahiroy@kernel.org>
Cc: Linux Kbuild mailing list <linux-kbuild@vger.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Trilok Soni <tsoni@codeaurora.org>
Subject: Re: [PATCH] scripts: Fix incremental build header re-generation
Date: Wed, 17 Mar 2021 19:54:01 -0700	[thread overview]
Message-ID: <b1fb2334-a85e-c299-3439-b70e9cb63454@codeaurora.org> (raw)
In-Reply-To: <CAK7LNARjxtyiBAfejQKePp-f=MTpA2PjAEedsHyCjHx6_eoJqA@mail.gmail.com>


On 3/1/2021 7:36 PM, Masahiro Yamada wrote:
> On Mon, Mar 1, 2021 at 11:23 PM Jeevan Shriram <jshriram@codeaurora.org> wrote:
>> compile.h and autoconf.h are ignored when checking headers sha as they
>> are always re-generated for every kernel compilation. However,
>> these two headers are packaged into kheaders tar. During incremental
>> compilation of kernel, kheaders tar file is always generated and re-packaged
>> irrespective of the changes in headers.
>
> I do not see this problem.
> Could you describe the steps to reproduce it, please?
>
Without making any changes in the kernel or it's headers, re-compile the kernel. i.e.,incremental kernel build without any changes.
I have added following log in gen_kheaders.sh script for confirming the hash differences.

diff --git a/kernel/gen_kheaders.sh b/kernel/gen_kheaders.sh
index b7425a0..ee542a0 100755
--- a/kernel/gen_kheaders.sh
+++ b/kernel/gen_kheaders.sh
@@ -40,6 +40,10 @@ obj_files_md5="$(find $dir_list -name "*.h"                     |
  # Any changes to this script will also cause a rebuild of the archive.
  this_file_md5="$(ls -l $sfile | md5sum | cut -d ' ' -f1)"
  if [ -f $tarfile ]; then tarfile_md5="$(md5sum $tarfile | cut -d ' ' -f1)"; fi
+
+echo "Old Tar file $tarfile_md5"
+echo "New Tar file hash $this_file_md5"
+
  if [ -f kernel/kheaders.md5 ] &&
         [ "$(cat kernel/kheaders.md5|head -1)" == "$src_files_md5" ] &&
         [ "$(cat kernel/kheaders.md5|head -2|tail -1)" == "$obj_files_md5" ] &&

log output :
89306 19:29:02.109961   CHK     kernel/kheaders_data.tar.xz
89307 19:29:02.109971 Old Tar file 2aa6990e4183c31a862951f4bcac037e
89308 19:29:02.109982 New Tar file hash ecf84e700c7cacfe8b35a0905859582d

>> Change-Id: I7a64faebb81df44c32230b0fea1d6df09d7ce66f
>> Signed-off-by: Jeevan Shriram <jshriram@codeaurora.org>
>> ---
>>   kernel/gen_kheaders.sh | 3 +--
>>   1 file changed, 1 insertion(+), 2 deletions(-)
>>
>> diff --git a/kernel/gen_kheaders.sh b/kernel/gen_kheaders.sh
>> index c1510f0..5499f72 100755
>> --- a/kernel/gen_kheaders.sh
>> +++ b/kernel/gen_kheaders.sh
>> @@ -51,8 +51,7 @@ this_file_md5="$(ls -l $sfile | md5sum | cut -d ' ' -f1)"
>>   if [ -f $tarfile ]; then tarfile_md5="$(md5sum $tarfile | cut -d ' ' -f1)"; fi
>>   if [ -f kernel/kheaders.md5 ] &&
>>          [ "$(head -n 1 kernel/kheaders.md5)" = "$headers_md5" ] &&
>> -       [ "$(head -n 2 kernel/kheaders.md5 | tail -n 1)" = "$this_file_md5" ] &&
>> -       [ "$(tail -n 1 kernel/kheaders.md5)" = "$tarfile_md5" ]; then
>> +       [ "$(head -n 2 kernel/kheaders.md5 | tail -n 1)" = "$this_file_md5" ]; then
>>                  exit
>>   fi
>>
>> --
>> The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
>> a Linux Foundation Collaborative Project
>>
>

  reply	other threads:[~2021-03-18  2:55 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-01 14:22 [PATCH] scripts: Fix incremental build header re-generation Jeevan Shriram
2021-03-02  3:36 ` Masahiro Yamada
2021-03-18  2:54   ` Jeevan Shriram [this message]
2021-03-24  6:27     ` Masahiro Yamada

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=b1fb2334-a85e-c299-3439-b70e9cb63454@codeaurora.org \
    --to=jshriram@codeaurora.org \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=masahiroy@kernel.org \
    --cc=tsoni@codeaurora.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