linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* PPC uImage build not reporting correctly
@ 2005-05-06 15:23 Kumar Gala
  2005-05-06 21:45 ` Sam Ravnborg
  0 siblings, 1 reply; 8+ messages in thread
From: Kumar Gala @ 2005-05-06 15:23 UTC (permalink / raw)
  To: Sam Ravnborg; +Cc: Tom Rini, Linux Kernel list, linuxppc-embedded list

Sam,

Tom pointed me at you to look at a makefile issue with 
arch/ppc/boot/images/Makefile.  When I do the following:

$ make uImage
   CHK     include/linux/version.h
make[1]: `arch/ppc/kernel/asm-offsets.s' is up to date.
   CHK     include/linux/compile.h
   CHK     usr/initramfs_list
   UIMAGE  arch/ppc/boot/images/uImage
Image Name:   Linux-2.6.12-rc3
Created:      Fri May  6 10:19:28 2005
Image Type:   PowerPC Linux Kernel Image (gzip compressed)
Data Size:    993322 Bytes = 970.04 kB = 0.95 MB
Load Address: 0x00000000
Entry Point:  0x00000000
   Image: arch/ppc/boot/images/uImage not made

The issue is that the file arch/ppc/boot/images/uImage does exit (the 
'not made' is not correct).

$(obj)/uImage: $(obj)/vmlinux.gz
         $(Q)rm -f $@
         $(call if_changed,uimage)
         @echo '  Image: $@' $(if $(wildcard $@),'is ready','not made')

It seems the $(wildcard $@) expands at the start of the rule.  Any 
ideas?

- kumar 

^ permalink raw reply	[flat|nested] 8+ messages in thread
[parent not found: <Pine.LNX.4.63.0505061718380.6288@xmission.xmission.com>]
* RE: PPC uImage build not reporting correctly
@ 2005-05-10 15:14 Stephen Warren
  0 siblings, 0 replies; 8+ messages in thread
From: Stephen Warren @ 2005-05-10 15:14 UTC (permalink / raw)
  To: Sam Ravnborg, Kumar Gala
  Cc: Tom Rini, cpclark, Linux Kernel list, linuxppc-embedded list

From: linux-kernel-owner@vger.kernel.org
[mailto:linux-kernel-owner@vger.kernel.org] On Behalf Of Sam Ravnborg
> On Mon, May 09, 2005 at 10:19:01AM -0500, Kumar Gala wrote:
> > On May 6, 2005, at 6:22 PM, <cpclark@xmission.com> wrote:
> > > Couldn't you eliminate the ($shell ..) construct altogether, like=20
> > > this?:
> > >
> > > $(obj)/uImage: $(obj)/vmlinux.gz
> > > ??????? $(Q)rm -f $@
> > > ??????? $(call if_changed,uimage)
> > > ??????? @echo -n '? Image: $@'
> > > ??????? @if [ -f $@ ]; then echo 'is ready' ; else echo 'not
made'; fi
> >=20
> > Yes, and this seems to actually work.
> >=20
> > Sam, does this look reasonable to you.  If so I will work up a
patch.
>
> Looks ok - but I do not see why use of $(shell ...) did not work out.
> Please bring your working version forward.
=20
It's because both any $(xxx) in the command will be expanded prior to
the command being executed ("command" meaning all lines in the complete
command script for the target in question - not on a line-by-line
basis).

Thus, the original $(wildcard), and also the $(shell) above are
evaluated/expanded by gmake prior to running any of the the "rm -rf",
"if_changed", and "echo" commands, and hence run before the uImage file
is created, and hence always think that it doesn't exist.

The only solution is to get the shell to do the evaluation of whether
uImage exists - that way, the evaluation is guaranteed to happen after
the uImage is (hopefully) created.

--=20
Stephen Warren, Software Engineer, NVIDIA, Fort Collins, CO
swarren@nvidia.com        http://www.nvidia.com/
swarren@wwwdotorg.org     http://www.wwwdotorg.org/pgp.html

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

end of thread, other threads:[~2005-05-11  4:59 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-05-06 15:23 PPC uImage build not reporting correctly Kumar Gala
2005-05-06 21:45 ` Sam Ravnborg
2005-05-06 21:57   ` Kumar Gala
     [not found] <Pine.LNX.4.63.0505061718380.6288@xmission.xmission.com>
2005-05-09 15:19 ` Kumar Gala
2005-05-10  4:28   ` Sam Ravnborg
2005-05-10 10:34     ` cpclark
2005-05-11  5:01       ` Sam Ravnborg
  -- strict thread matches above, loose matches on Subject: below --
2005-05-10 15:14 Stephen Warren

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).