From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Date: Sun, 13 Nov 2011 10:48:32 +0100 From: Michael Olbrich Message-ID: <20111113094832.GC9073@pengutronix.de> References: <1320851812-5969-1-git-send-email-alexander.stein@systec-electronic.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <1320851812-5969-1-git-send-email-alexander.stein@systec-electronic.com> Subject: Re: [ptxdist] [PATCH] $(KERNEL_PATH)/vmlinux should not depend on kernel.targetinstall Reply-To: ptxdist@pengutronix.de List-Id: PTXdist Development Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: ptxdist-bounces@pengutronix.de Errors-To: ptxdist-bounces@pengutronix.de To: ptxdist@pengutronix.de 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 > --- > 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