All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mike Qiu <qiudayu@linux.vnet.ibm.com>
To: Michal Marek <mmarek@suse.cz>
Cc: linuxppc-dev@lists.ozlabs.org, Sam Ravnborg <sam@ravnborg.org>,
	linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] powerpc: Avoid circular dependency with zImage.%
Date: Thu, 12 Jun 2014 10:07:04 +0800	[thread overview]
Message-ID: <53990B48.8010902@linux.vnet.ibm.com> (raw)
In-Reply-To: <1402501243-28213-1-git-send-email-mmarek@suse.cz>

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


WARNING: multiple messages have this Message-ID (diff)
From: Mike Qiu <qiudayu@linux.vnet.ibm.com>
To: Michal Marek <mmarek@suse.cz>
Cc: Sam Ravnborg <sam@ravnborg.org>,
	linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org,
	linux-kbuild@vger.kernel.org
Subject: Re: [PATCH v2] powerpc: Avoid circular dependency with zImage.%
Date: Thu, 12 Jun 2014 10:07:04 +0800	[thread overview]
Message-ID: <53990B48.8010902@linux.vnet.ibm.com> (raw)
In-Reply-To: <1402501243-28213-1-git-send-email-mmarek@suse.cz>

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

  reply	other threads:[~2014-06-12  2:07 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-11  6:02 Kernel build fail with "Circular xxxx <- xxxx dependency dropped" Mike Qiu
2014-06-11  8:24 ` Michal Marek
2014-06-11  8:24   ` Michal Marek
2014-06-11 12:21   ` Michal Marek
2014-06-11 12:21     ` Michal Marek
2014-06-11 12:22     ` Michal Marek
2014-06-11 12:22       ` Michal Marek
2014-06-11 12:36       ` Mike Qiu
2014-06-11 12:36         ` Mike Qiu
2014-06-11 15:40         ` [PATCH v2] powerpc: Avoid circular dependency with zImage.% Michal Marek
2014-06-11 15:40           ` Michal Marek
2014-06-12  2:07           ` Mike Qiu [this message]
2014-06-12  2:07             ` Mike Qiu
2014-06-12  8:09             ` Michal Marek
2014-06-12  8:09               ` Michal Marek

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=53990B48.8010902@linux.vnet.ibm.com \
    --to=qiudayu@linux.vnet.ibm.com \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=mmarek@suse.cz \
    --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.