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

York Sun yorksun at freescale.com
Tue Jul 29 23:23:39 CEST 2014


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 <yorksun at freescale.com>
CC: Kim Phillips <kim.phillips at 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



More information about the U-Boot mailing list