[PATCH/RFC] Add cmd_wrap_dts rules to arch/powerpc/boot/Makefile

Mark A. Greer mgreer at mvista.com
Fri Oct 20 05:51:56 EST 2006


On Thu, Oct 19, 2006 at 09:03:18AM -0500, Jon Loeliger wrote:
> So, like, the other day "Mark A. Greer" mumbled:
> > 
> > This would be used by the sandpoint, say, by adding the following rules
> > to the Makefile in the appropriate places:
> > 
> > 	$(obj)/zImage.sandpoint: vmlinux $(wrapperbits)
> > 		$(call cmd,wrap_dts,sandpoint)
> > 
> > 	$(obj)/zImage.initrd.sandpoint: vmlinux $(wrapperbits)
> > 		$(call cmd,wrap_dts_initrd,sandpoint)
> > 
> > and:
> > 
> > 	image-$(CONFIG_SANDPOINT)               += zImage.sandpoint
> > 
> > Comments?
> 
> Isn't there a way to do this without hardcoding the
> platform name in the makefiles directly?  I fear for
> the one-per-platform effect that is yet to come with
> the conversion of many of the legacy boards.

I share your apprehension but somewhere we have to map a
CONFIG_<platform> into a name so we can make/use the correct
zImage.<platform> and dts/<platform>.dts.

We could do that in the Kconfig--define CONFIG_<platform> and
CONFIG_TARGET to "<platform>".  Don't know if that's acceptable.
Other ideas?

> > +++ b/arch/powerpc/boot/Makefile
> > @@ -117,6 +117,13 @@ quiet_cmd_wrap	= WRAP    $@
> >  quiet_cmd_wrap_initrd = WRAP    $@
> >        cmd_wrap_initrd =$(CONFIG_SHELL) $(wrapper) -c -o $@ -p $2 $(CROSSWRAP) \
> >  				-i $(obj)/ramdisk.image.gz vmlinux
> > +quiet_cmd_wrap_dts = WRAP_DTS    $@
> > +      cmd_wrap_dts =$(CONFIG_SHELL) $(wrapper) -c -o $@ -p $2 $(CROSSWRAP) \
> > +				-s $(obj)/dts/$2.dts vmlinux
> > +quiet_cmd_wrap_dts_initrd = WRAP_DTS    $@
> > +      cmd_wrap_dts_initrd =$(CONFIG_SHELL) $(wrapper) -c -o $@ -p $2 \
> > +				$(CROSSWRAP) -s $(obj)/dts/$2.dts \
> > +				-i $(obj)/ramdisk.image.gz vmlinux
> >  
> >  $(obj)/zImage.chrp: vmlinux $(wrapperbits)
> >  	$(call cmd,wrap,chrp)
> 
> Which I guess means this patch is OK, but the zImage.chrp use
> around it is suspect.... :-)

I didn't follow you here.  zImage.chrp was already there; I didn't
change it.  It should probably stay the as it is because "chrp" could
be any number of platforms and have several different dt's attached
once the zImage is built.

Mark



More information about the Linuxppc-dev mailing list