From: Stephen Boyd <sboyd@codeaurora.org>
To: Sam Ravnborg <sam@ravnborg.org>
Cc: "linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
linux-kbuild@vger.kernel.org, Peter Foley <pefoley2@verizon.net>
Subject: Re: Relinking zImage when nothing changes
Date: Fri, 12 Aug 2011 11:12:11 -0700 [thread overview]
Message-ID: <4E456CFB.3080206@codeaurora.org> (raw)
In-Reply-To: <20110812180209.GA28520@merkur.ravnborg.org>
On 08/12/2011 11:02 AM, Sam Ravnborg wrote:
> On Fri, Aug 12, 2011 at 10:46:24AM -0700, Stephen Boyd wrote:
>> I was hoping with the recent patch e78e8f2 (kernel: prevent unnecessary
>> rebuilding due to config_data.gz, 2011-07-05) compiling ARM linux a
>> second time would amount to no more linking. This doesn't seem to be the
>> case though. Doing a make V=2 I see that lib1funcs.S is shipped and thus
>> we have to recompile it although nothing actually changed. This in turn
>> requires us to relink the compressed vmlinux and then recreate the zImage.
>>
>> Kernel: arch/arm/boot/Image is ready
>> SHIPPED arch/arm/boot/compressed/lib1funcs.S - due to missing .cmd file
>> AS arch/arm/boot/compressed/lib1funcs.o - due to: arch/arm/boot/compressed/lib1funcs.S
>> LD arch/arm/boot/compressed/vmlinux - due to: arch/arm/boot/compressed/lib1funcs.o
>> OBJCOPY arch/arm/boot/zImage - due to: arch/arm/boot/compressed/vmlinux
>> Kernel: arch/arm/boot/zImage is ready
>>
>>
>> Is there any way to avoid this? Perhaps the shipped command could become
>> a bit wiser?
> Following patch will likely fix it:
> diff --git a/arch/arm/boot/compressed/Makefile b/arch/arm/boot/compressed/Makefile
> index 0c74a6f..80b6b6e 100644
> --- a/arch/arm/boot/compressed/Makefile
> +++ b/arch/arm/boot/compressed/Makefile
> @@ -123,7 +123,7 @@ LDFLAGS_vmlinux += -T
> # For __aeabi_uidivmod
> lib1funcs = $(obj)/lib1funcs.o
>
> -$(obj)/lib1funcs.S: $(srctree)/arch/$(SRCARCH)/lib/lib1funcs.S FORCE
> +$(obj)/lib1funcs.S: $(srctree)/arch/$(SRCARCH)/lib/lib1funcs.S
> $(call cmd,shipped)
>
> # We need to prevent any GOTOFF relocs being used with references
>
> (cut'n'pasted ...)
>
> The FORCE prerequisite will tell make to always execute the command.
> But we only want to execute the command if:
> 1) $(obj)/lib1funcs.S is missing
> 2) or $(srctree)/arch/$(SRCARCH)/lib/lib1funcs.S is not older then $(obj)/lib1funcs.S
>
> So dropping FORCE should be a safe thing to do.
>
Hm... that fixes the shipped part. But now we still reassemble lib1funcs.o.
Kernel: arch/arm/boot/Image is ready
AS arch/arm/boot/compressed/lib1funcs.o - due to lib1funcs.o not in $(targets)
LD arch/arm/boot/compressed/vmlinux - due to: arch/arm/boot/compressed/lib1funcs.o
OBJCOPY arch/arm/boot/zImage - due to: arch/arm/boot/compressed/vmlinux
Kernel: arch/arm/boot/zImage is ready
Is it correct to add lib1funcs.o to targets?
diff --git a/arch/arm/boot/compressed/Makefile b/arch/arm/boot/compressed/Makefile
index 0c74a6f..64889e6 100644
--- a/arch/arm/boot/compressed/Makefile
+++ b/arch/arm/boot/compressed/Makefile
@@ -91,7 +91,7 @@ suffix_$(CONFIG_KERNEL_LZMA) = lzma
targets := vmlinux vmlinux.lds \
piggy.$(suffix_y) piggy.$(suffix_y).o \
- font.o font.c head.o misc.o $(OBJS)
+ font.o font.c head.o misc.o lib1funcs.o $(OBJS)
# Make sure files are removed during clean
extra-y += piggy.gzip piggy.lzo piggy.lzma lib1funcs.S
@@ -123,7 +123,7 @@ LDFLAGS_vmlinux += -T
# For __aeabi_uidivmod
lib1funcs = $(obj)/lib1funcs.o
-$(obj)/lib1funcs.S: $(srctree)/arch/$(SRCARCH)/lib/lib1funcs.S FORCE
+$(obj)/lib1funcs.S: $(srctree)/arch/$(SRCARCH)/lib/lib1funcs.S
$(call cmd,shipped)
# We need to prevent any GOTOFF relocs being used with references
--
Sent by an employee of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.
WARNING: multiple messages have this Message-ID (diff)
From: sboyd@codeaurora.org (Stephen Boyd)
To: linux-arm-kernel@lists.infradead.org
Subject: Relinking zImage when nothing changes
Date: Fri, 12 Aug 2011 11:12:11 -0700 [thread overview]
Message-ID: <4E456CFB.3080206@codeaurora.org> (raw)
In-Reply-To: <20110812180209.GA28520@merkur.ravnborg.org>
On 08/12/2011 11:02 AM, Sam Ravnborg wrote:
> On Fri, Aug 12, 2011 at 10:46:24AM -0700, Stephen Boyd wrote:
>> I was hoping with the recent patch e78e8f2 (kernel: prevent unnecessary
>> rebuilding due to config_data.gz, 2011-07-05) compiling ARM linux a
>> second time would amount to no more linking. This doesn't seem to be the
>> case though. Doing a make V=2 I see that lib1funcs.S is shipped and thus
>> we have to recompile it although nothing actually changed. This in turn
>> requires us to relink the compressed vmlinux and then recreate the zImage.
>>
>> Kernel: arch/arm/boot/Image is ready
>> SHIPPED arch/arm/boot/compressed/lib1funcs.S - due to missing .cmd file
>> AS arch/arm/boot/compressed/lib1funcs.o - due to: arch/arm/boot/compressed/lib1funcs.S
>> LD arch/arm/boot/compressed/vmlinux - due to: arch/arm/boot/compressed/lib1funcs.o
>> OBJCOPY arch/arm/boot/zImage - due to: arch/arm/boot/compressed/vmlinux
>> Kernel: arch/arm/boot/zImage is ready
>>
>>
>> Is there any way to avoid this? Perhaps the shipped command could become
>> a bit wiser?
> Following patch will likely fix it:
> diff --git a/arch/arm/boot/compressed/Makefile b/arch/arm/boot/compressed/Makefile
> index 0c74a6f..80b6b6e 100644
> --- a/arch/arm/boot/compressed/Makefile
> +++ b/arch/arm/boot/compressed/Makefile
> @@ -123,7 +123,7 @@ LDFLAGS_vmlinux += -T
> # For __aeabi_uidivmod
> lib1funcs = $(obj)/lib1funcs.o
>
> -$(obj)/lib1funcs.S: $(srctree)/arch/$(SRCARCH)/lib/lib1funcs.S FORCE
> +$(obj)/lib1funcs.S: $(srctree)/arch/$(SRCARCH)/lib/lib1funcs.S
> $(call cmd,shipped)
>
> # We need to prevent any GOTOFF relocs being used with references
>
> (cut'n'pasted ...)
>
> The FORCE prerequisite will tell make to always execute the command.
> But we only want to execute the command if:
> 1) $(obj)/lib1funcs.S is missing
> 2) or $(srctree)/arch/$(SRCARCH)/lib/lib1funcs.S is not older then $(obj)/lib1funcs.S
>
> So dropping FORCE should be a safe thing to do.
>
Hm... that fixes the shipped part. But now we still reassemble lib1funcs.o.
Kernel: arch/arm/boot/Image is ready
AS arch/arm/boot/compressed/lib1funcs.o - due to lib1funcs.o not in $(targets)
LD arch/arm/boot/compressed/vmlinux - due to: arch/arm/boot/compressed/lib1funcs.o
OBJCOPY arch/arm/boot/zImage - due to: arch/arm/boot/compressed/vmlinux
Kernel: arch/arm/boot/zImage is ready
Is it correct to add lib1funcs.o to targets?
diff --git a/arch/arm/boot/compressed/Makefile b/arch/arm/boot/compressed/Makefile
index 0c74a6f..64889e6 100644
--- a/arch/arm/boot/compressed/Makefile
+++ b/arch/arm/boot/compressed/Makefile
@@ -91,7 +91,7 @@ suffix_$(CONFIG_KERNEL_LZMA) = lzma
targets := vmlinux vmlinux.lds \
piggy.$(suffix_y) piggy.$(suffix_y).o \
- font.o font.c head.o misc.o $(OBJS)
+ font.o font.c head.o misc.o lib1funcs.o $(OBJS)
# Make sure files are removed during clean
extra-y += piggy.gzip piggy.lzo piggy.lzma lib1funcs.S
@@ -123,7 +123,7 @@ LDFLAGS_vmlinux += -T
# For __aeabi_uidivmod
lib1funcs = $(obj)/lib1funcs.o
-$(obj)/lib1funcs.S: $(srctree)/arch/$(SRCARCH)/lib/lib1funcs.S FORCE
+$(obj)/lib1funcs.S: $(srctree)/arch/$(SRCARCH)/lib/lib1funcs.S
$(call cmd,shipped)
# We need to prevent any GOTOFF relocs being used with references
--
Sent by an employee of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.
next prev parent reply other threads:[~2011-08-12 18:12 UTC|newest]
Thread overview: 44+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-12 17:46 Relinking zImage when nothing changes Stephen Boyd
2011-08-12 17:46 ` Stephen Boyd
2011-08-12 18:02 ` Sam Ravnborg
2011-08-12 18:02 ` Sam Ravnborg
2011-08-12 18:12 ` Stephen Boyd [this message]
2011-08-12 18:12 ` Stephen Boyd
2011-08-12 18:34 ` Sam Ravnborg
2011-08-12 18:34 ` Sam Ravnborg
2011-08-12 18:52 ` Stephen Boyd
2011-08-12 18:52 ` Stephen Boyd
2011-08-12 19:00 ` [PATCH] ARM: zImage: Skip relinking if " Stephen Boyd
2011-08-12 19:00 ` Stephen Boyd
2011-08-12 20:48 ` Arnaud Lacombe
2011-08-12 20:48 ` Arnaud Lacombe
2011-08-12 20:55 ` Russell King - ARM Linux
2011-08-12 20:55 ` Russell King - ARM Linux
2011-08-12 21:41 ` Arnaud Lacombe
2011-08-12 21:41 ` Arnaud Lacombe
2011-08-12 22:03 ` Sam Ravnborg
2011-08-12 22:03 ` Sam Ravnborg
2011-08-12 22:17 ` Arnaud Lacombe
2011-08-12 22:17 ` Arnaud Lacombe
2011-08-13 6:34 ` Sam Ravnborg
2011-08-13 6:34 ` Sam Ravnborg
2011-08-13 16:02 ` Arnaud Lacombe
2011-08-13 16:02 ` Arnaud Lacombe
2011-08-12 22:32 ` Arnaud Lacombe
2011-08-12 22:32 ` Arnaud Lacombe
2011-08-18 3:44 ` Nicolas Pitre
2011-08-18 3:44 ` Nicolas Pitre
2011-08-18 18:03 ` Arnaud Lacombe
2011-08-18 18:03 ` Arnaud Lacombe
2011-08-18 19:31 ` Russell King - ARM Linux
2011-08-18 19:31 ` Russell King - ARM Linux
2011-08-18 22:25 ` Troy Kisky
2011-08-18 22:25 ` Troy Kisky
2011-08-18 22:38 ` Arnaud Lacombe
2011-08-18 22:38 ` Arnaud Lacombe
2011-08-12 20:20 ` Relinking zImage when " Arnaud Lacombe
2011-08-12 20:20 ` Arnaud Lacombe
2011-08-12 20:24 ` Sam Ravnborg
2011-08-12 20:24 ` Sam Ravnborg
2011-08-12 20:31 ` Arnaud Lacombe
2011-08-12 20:31 ` Arnaud Lacombe
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=4E456CFB.3080206@codeaurora.org \
--to=sboyd@codeaurora.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kbuild@vger.kernel.org \
--cc=pefoley2@verizon.net \
--cc=sam@ravnborg.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.