mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
* [ptxdist] [PATCH] $(KERNEL_PATH)/vmlinux should not depend on kernel.targetinstall
@ 2011-11-09 15:16 Alexander Stein
  2011-11-13  9:48 ` Michael Olbrich
  2012-01-26  9:57 ` Alexander Stein
  0 siblings, 2 replies; 4+ messages in thread
From: Alexander Stein @ 2011-11-09 15:16 UTC (permalink / raw)
  To: ptxdist

If PTXCONF_KERNEL_IMAGE_VMLINUX is set, KERNEL_IMAGE_PATH_y is set to
$(KERNEL_PATH)/vmlinux. This should not depend on kernel.targetinstall
because kernel.targetinstall will be newer than vmlinux and make tries
to recreate vmlinux and implicit removes the target file.

Signed-off-by: Alexander Stein <alexander.stein@systec-electronic.com>
---
 rules/post/image_kernel.make |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/rules/post/image_kernel.make b/rules/post/image_kernel.make
index 7ffeed6..6f1defe 100644
--- a/rules/post/image_kernel.make
+++ b/rules/post/image_kernel.make
@@ -23,7 +23,9 @@ $(STATEDIR)/image_kernel.compile: $(IMAGEDIR)/root.cpio
 		$(KERNEL_MAKEVARS) $(KERNEL_IMAGE)
 	@echo "done."
 
+ifndef PTXCONF_KERNEL_IMAGE_VMLINUX
 $(KERNEL_IMAGE_PATH_y): $(STATEDIR)/kernel.targetinstall
+endif
 
 $(IMAGEDIR)/linuximage: $(KERNEL_IMAGE_PATH_y)
 	@echo -n "Creating '$(notdir $(@))' from '$(notdir $(<))'..."
-- 
1.7.3.4


-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [ptxdist] [PATCH] $(KERNEL_PATH)/vmlinux should not depend on kernel.targetinstall
  2011-11-09 15:16 [ptxdist] [PATCH] $(KERNEL_PATH)/vmlinux should not depend on kernel.targetinstall Alexander Stein
@ 2011-11-13  9:48 ` Michael Olbrich
  2012-01-26  9:57 ` Alexander Stein
  1 sibling, 0 replies; 4+ messages in thread
From: Michael Olbrich @ 2011-11-13  9:48 UTC (permalink / raw)
  To: ptxdist; +Cc: Marc Kleine-Budde

On Wed, Nov 09, 2011 at 04:16:52PM +0100, Alexander Stein wrote:
> If PTXCONF_KERNEL_IMAGE_VMLINUX is set, KERNEL_IMAGE_PATH_y is set to
> $(KERNEL_PATH)/vmlinux. This should not depend on kernel.targetinstall
> because kernel.targetinstall will be newer than vmlinux and make tries
> to recreate vmlinux and implicit removes the target file.

This is a problem for all PTXCONF_KERNEL_IMAGE_* not just VMLINUX.
Maybe:
----------------------------------------------------------------------
+ifeq ($(wildcard $(KERNEL_IMAGE_PATH_y)),)
 $(KERNEL_IMAGE_PATH_y): $(STATEDIR)/kernel.targetinstall
+endif
----------------------------------------------------------------------

Or completely remove KERNEL_IMAGE_PATH_y from the dependency chain:
----------------------------------------------------------------------
 		$(KERNEL_MAKEVARS) $(KERNEL_IMAGE)
 	@echo "done."
 
-$(KERNEL_IMAGE_PATH_y): $(STATEDIR)/kernel.targetinstall
-
-$(IMAGEDIR)/linuximage: $(KERNEL_IMAGE_PATH_y)
+$(IMAGEDIR)/linuximage: $(STATEDIR)/kernel.targetinstall
 	@echo -n "Creating '$(notdir $(@))' from '$(notdir $(<))'..."
 	@install -m 644 "$(<)" "$(@)"
 	@echo "done."
----------------------------------------------------------------------

Marc: you introduced the original dependency. Can you see a case where this
won't work?

Michael

> Signed-off-by: Alexander Stein <alexander.stein@systec-electronic.com>
> ---
>  rules/post/image_kernel.make |    2 ++
>  1 files changed, 2 insertions(+), 0 deletions(-)
> 
> diff --git a/rules/post/image_kernel.make b/rules/post/image_kernel.make
> index 7ffeed6..6f1defe 100644
> --- a/rules/post/image_kernel.make
> +++ b/rules/post/image_kernel.make
> @@ -23,7 +23,9 @@ $(STATEDIR)/image_kernel.compile: $(IMAGEDIR)/root.cpio
>  		$(KERNEL_MAKEVARS) $(KERNEL_IMAGE)
>  	@echo "done."
>  
> +ifndef PTXCONF_KERNEL_IMAGE_VMLINUX
>  $(KERNEL_IMAGE_PATH_y): $(STATEDIR)/kernel.targetinstall
> +endif
>  
>  $(IMAGEDIR)/linuximage: $(KERNEL_IMAGE_PATH_y)
>  	@echo -n "Creating '$(notdir $(@))' from '$(notdir $(<))'..."
> -- 
> 1.7.3.4
> 
> 
> -- 
> ptxdist mailing list
> ptxdist@pengutronix.de
> 

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [ptxdist] [PATCH] $(KERNEL_PATH)/vmlinux should not depend on kernel.targetinstall
  2011-11-09 15:16 [ptxdist] [PATCH] $(KERNEL_PATH)/vmlinux should not depend on kernel.targetinstall Alexander Stein
  2011-11-13  9:48 ` Michael Olbrich
@ 2012-01-26  9:57 ` Alexander Stein
  2012-01-26 15:47   ` [ptxdist] [PATCH] linuximage: cleanup dependencies Michael Olbrich
  1 sibling, 1 reply; 4+ messages in thread
From: Alexander Stein @ 2012-01-26  9:57 UTC (permalink / raw)
  To: ptxdist

Hi there,

any news on this topic?

Regards,
Alexander

On Wednesday 09 November 2011 16:16:52 you wrote:
> If PTXCONF_KERNEL_IMAGE_VMLINUX is set, KERNEL_IMAGE_PATH_y is set to
> $(KERNEL_PATH)/vmlinux. This should not depend on kernel.targetinstall
> because kernel.targetinstall will be newer than vmlinux and make tries
> to recreate vmlinux and implicit removes the target file.
> 
> Signed-off-by: Alexander Stein <alexander.stein@systec-electronic.com>
> ---
>  rules/post/image_kernel.make |    2 ++
>  1 files changed, 2 insertions(+), 0 deletions(-)
> 
> diff --git a/rules/post/image_kernel.make b/rules/post/image_kernel.make
> index 7ffeed6..6f1defe 100644
> --- a/rules/post/image_kernel.make
> +++ b/rules/post/image_kernel.make
> @@ -23,7 +23,9 @@ $(STATEDIR)/image_kernel.compile: $(IMAGEDIR)/root.cpio
>  		$(KERNEL_MAKEVARS) $(KERNEL_IMAGE)
>  	@echo "done."
> 
> +ifndef PTXCONF_KERNEL_IMAGE_VMLINUX
>  $(KERNEL_IMAGE_PATH_y): $(STATEDIR)/kernel.targetinstall
> +endif
> 
>  $(IMAGEDIR)/linuximage: $(KERNEL_IMAGE_PATH_y)
>  	@echo -n "Creating '$(notdir $(@))' from '$(notdir $(<))'..."
-- 
Dipl.-Inf. Alexander Stein

SYS TEC electronic GmbH
August-Bebel-Str. 29
D-07973 Greiz

Tel: +49-3661-6279-0, Fax: +49-3661-6279-99
eMail:    Alexander.Stein@systec-electronic.com
Internet: http://www.systec-electronic.com

Managing Director: Dipl.-Phys. Siegmar Schmidt
Commercial registry: Amtsgericht Jena, HRB 205563

-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [ptxdist] [PATCH] linuximage: cleanup dependencies
  2012-01-26  9:57 ` Alexander Stein
@ 2012-01-26 15:47   ` Michael Olbrich
  0 siblings, 0 replies; 4+ messages in thread
From: Michael Olbrich @ 2012-01-26 15:47 UTC (permalink / raw)
  To: ptxdist; +Cc: Michael Olbrich

Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
---

How about this?

Michael

 rules/post/image_kernel.make |    8 +++-----
 1 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/rules/post/image_kernel.make b/rules/post/image_kernel.make
index 7ffeed6..a1b8d86 100644
--- a/rules/post/image_kernel.make
+++ b/rules/post/image_kernel.make
@@ -23,11 +23,9 @@ $(STATEDIR)/image_kernel.compile: $(IMAGEDIR)/root.cpio
 		$(KERNEL_MAKEVARS) $(KERNEL_IMAGE)
 	@echo "done."
 
-$(KERNEL_IMAGE_PATH_y): $(STATEDIR)/kernel.targetinstall
-
-$(IMAGEDIR)/linuximage: $(KERNEL_IMAGE_PATH_y)
-	@echo -n "Creating '$(notdir $(@))' from '$(notdir $(<))'..."
-	@install -m 644 "$(<)" "$(@)"
+$(IMAGEDIR)/linuximage: $(STATEDIR)/kernel.targetinstall
+	@echo -n "Creating '$(notdir $(@))' from '$(notdir $(KERNEL_IMAGE_PATH_y))'..."
+	@install -m 644 "$(KERNEL_IMAGE_PATH_y)" "$(@)"
 	@echo "done."
 
 $(IMAGEDIR)/linuximage.lzo: $(IMAGEDIR)/linuximage
-- 
1.7.8.3


-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-01-26 15:47 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-11-09 15:16 [ptxdist] [PATCH] $(KERNEL_PATH)/vmlinux should not depend on kernel.targetinstall Alexander Stein
2011-11-13  9:48 ` Michael Olbrich
2012-01-26  9:57 ` Alexander Stein
2012-01-26 15:47   ` [ptxdist] [PATCH] linuximage: cleanup dependencies Michael Olbrich

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox