* [PATCH v2] powerpc: Avoid circular dependency with zImage.%
[not found] <53984D4F.6040808@linux.vnet.ibm.com>
@ 2014-06-11 15:40 ` Michal Marek
2014-06-12 2:07 ` Mike Qiu
0 siblings, 1 reply; 3+ messages in thread
From: Michal Marek @ 2014-06-11 15:40 UTC (permalink / raw)
To: Mike Qiu; +Cc: linuxppc-dev, Sam Ravnborg, linux-kbuild, linux-kernel
The rule to create the final images uses a zImage.% pattern.
Unfortunately, this also matches the names of the zImage.*.lds linker
scripts, which appear as a dependency of the final images. This somehow
worked when $(srctree) used to be an absolute path, but now the pattern
matches too much. List only the images from $(image-y) as the target of
the rule, to avoid the circular dependency.
Signed-off-by: Michal Marek <mmarek@suse.cz>
---
v2:
- Filter out duplicates in the target list
- fix the platform argument to cmd_wrap
arch/powerpc/boot/Makefile | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/powerpc/boot/Makefile b/arch/powerpc/boot/Makefile
index 426dce7..ccc25ed 100644
--- a/arch/powerpc/boot/Makefile
+++ b/arch/powerpc/boot/Makefile
@@ -333,8 +333,8 @@ $(addprefix $(obj)/, $(initrd-y)): $(obj)/ramdisk.image.gz
$(obj)/zImage.initrd.%: vmlinux $(wrapperbits)
$(call if_changed,wrap,$*,,,$(obj)/ramdisk.image.gz)
-$(obj)/zImage.%: vmlinux $(wrapperbits)
- $(call if_changed,wrap,$*)
+$(addprefix $(obj)/, $(sort $(filter zImage.%, $(image-y)))): vmlinux $(wrapperbits)
+ $(call if_changed,wrap,$(subst $(obj)/zImage.,,$@))
# dtbImage% - a dtbImage is a zImage with an embedded device tree blob
$(obj)/dtbImage.initrd.%: vmlinux $(wrapperbits) $(obj)/%.dtb
--
1.9.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH v2] powerpc: Avoid circular dependency with zImage.%
2014-06-11 15:40 ` [PATCH v2] powerpc: Avoid circular dependency with zImage.% Michal Marek
@ 2014-06-12 2:07 ` Mike Qiu
2014-06-12 8:09 ` Michal Marek
0 siblings, 1 reply; 3+ messages in thread
From: Mike Qiu @ 2014-06-12 2:07 UTC (permalink / raw)
To: Michal Marek; +Cc: linuxppc-dev, Sam Ravnborg, linux-kbuild, linux-kernel
This v2 patch is good,
Tested-by: Mike Qiu <qiudayu@linux.vnet.ibm.com>
On 06/11/2014 11:40 PM, Michal Marek wrote:
> The rule to create the final images uses a zImage.% pattern.
> Unfortunately, this also matches the names of the zImage.*.lds linker
> scripts, which appear as a dependency of the final images. This somehow
> worked when $(srctree) used to be an absolute path, but now the pattern
> matches too much. List only the images from $(image-y) as the target of
> the rule, to avoid the circular dependency.
>
> Signed-off-by: Michal Marek <mmarek@suse.cz>
> ---
> v2:
> - Filter out duplicates in the target list
> - fix the platform argument to cmd_wrap
>
> arch/powerpc/boot/Makefile | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/arch/powerpc/boot/Makefile b/arch/powerpc/boot/Makefile
> index 426dce7..ccc25ed 100644
> --- a/arch/powerpc/boot/Makefile
> +++ b/arch/powerpc/boot/Makefile
> @@ -333,8 +333,8 @@ $(addprefix $(obj)/, $(initrd-y)): $(obj)/ramdisk.image.gz
> $(obj)/zImage.initrd.%: vmlinux $(wrapperbits)
> $(call if_changed,wrap,$*,,,$(obj)/ramdisk.image.gz)
>
> -$(obj)/zImage.%: vmlinux $(wrapperbits)
> - $(call if_changed,wrap,$*)
> +$(addprefix $(obj)/, $(sort $(filter zImage.%, $(image-y)))): vmlinux $(wrapperbits)
> + $(call if_changed,wrap,$(subst $(obj)/zImage.,,$@))
>
> # dtbImage% - a dtbImage is a zImage with an embedded device tree blob
> $(obj)/dtbImage.initrd.%: vmlinux $(wrapperbits) $(obj)/%.dtb
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v2] powerpc: Avoid circular dependency with zImage.%
2014-06-12 2:07 ` Mike Qiu
@ 2014-06-12 8:09 ` Michal Marek
0 siblings, 0 replies; 3+ messages in thread
From: Michal Marek @ 2014-06-12 8:09 UTC (permalink / raw)
To: Mike Qiu; +Cc: linuxppc-dev, Sam Ravnborg, linux-kbuild, linux-kernel
Dne 12.6.2014 04:07, Mike Qiu napsal(a):
> This v2 patch is good,
>
> Tested-by: Mike Qiu <qiudayu@linux.vnet.ibm.com>
Thanks. In kbuild.git it goes.
Michal
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-06-12 8:09 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <53984D4F.6040808@linux.vnet.ibm.com>
2014-06-11 15:40 ` [PATCH v2] powerpc: Avoid circular dependency with zImage.% Michal Marek
2014-06-12 2:07 ` Mike Qiu
2014-06-12 8:09 ` Michal Marek
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox