[U-Boot] [RFC] Makefile: Add a message warning size change for mpc85xx boards

York Sun yorksun at freescale.com
Thu Jul 31 00:13:45 CEST 2014


On 07/29/2014 10:02 PM, Wolfgang Denk wrote:
> Dear York Sun,
> 
> In message <1406669019-31651-1-git-send-email-yorksun at freescale.com> you wrote:
>> Some mpc85xx boards are using 768KB size u-boot image while some
>> legacy boards still use 512KB. To bring attention to users about
>> the size change, a message is printed when compiling. SPL/PBL is
>> not covered by this change.
> 
> This makes no sense to me.  Where are these magic image sizes coming
> from?  This is highly board specific stuff at best, probably valid for
> some Freescale boards only.

This was raised by an end user who got confused by upgrading from the older
image which was 512KB to the new image 768KB. The README file described the
change, but it may be not obvious enough to a user to notice.

Kim proposed the idea to add a compiling warning (not really a warning though)
about the size change to raise attention.

> 
> I think if this is useful at all (which I actually doubt) this should
> be moved to board specific code, or if you really think it fits, then
> maybe made Freescale vendor specific.
> 
> But please keep such stuff out of the global Makefile.
> 

I agree it should not be put into global Makefile. I am struggling to understand
the right way to move such check to arch/powerpc/cpu/mpc85xx/Makefile. Do I need
to add a new target in arch/powerpc/cpu/mpc85xx/Makefile, like

+NEW_TARGET:
+    Do something special here

and add an entry in global Makefile, like


u-boot.bin: u-boot FORCE
        $(call if_changed,objcopy)
        $(call DO_STATIC_RELA,$<,$@,$(CONFIG_SYS_TEXT_BASE))
        $(BOARD_SIZE_CHECK)
+        $(Q)$(MAKE) $(build)=arch/powerpc/cpu/mpc85xx NEW_TARGET

Some guidance (or examples) will be appreciated.

York



More information about the U-Boot mailing list