From mboxrd@z Thu Jan 1 00:00:00 1970 From: York Sun Date: Tue, 29 Jul 2014 14:56:46 -0700 Subject: [U-Boot] [RFC] Makefile: Add a message warning size change for mpc85xx boards In-Reply-To: <1406669019-31651-1-git-send-email-yorksun@freescale.com> References: <1406669019-31651-1-git-send-email-yorksun@freescale.com> Message-ID: <53D8189E.2020607@freescale.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de This is an RFC. Do NOT apply. It outputs the message, tricks MAKEALL to count it as warning. York On 07/29/2014 02:23 PM, York Sun 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. > > Signed-off-by: York Sun > CC: Kim Phillips > --- > Makefile | 12 ++++++++++++ > 1 file changed, 12 insertions(+) > > diff --git a/Makefile b/Makefile > index ca212b5..5c823dc 100644 > --- a/Makefile > +++ b/Makefile > @@ -691,8 +691,20 @@ BOARD_SIZE_CHECK = \ > exit 1; \ > fi > else > +ifdef CONFIG_MPC85xx > +BOARD_SIZE_CHECK = \ > + @actual=`wc -c $@ | awk '{print $$1}'`; \ > + limit=524288; \ > + if test $$actual -gt $$limit; then \ > + echo "Attention: File size $$actual bytes, may be different from legacy images" >&2; \ > + offset=`printf "%x" $$actual`; \ > + echo " NOR flash address for u-boot.bin: 0x$$offset from end of boot bank" >&2; \ > + echo " See board README"; \ > + fi > +else > BOARD_SIZE_CHECK = > endif > +endif > > # Statically apply RELA-style relocations (currently arm64 only) > ifneq ($(CONFIG_STATIC_RELA),) >