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 <york...@freescale.com>
CC: Kim Phillips <kim.phill...@freescale.com>
---
 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),)
-- 
1.7.9.5

_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

Reply via email to