Commit 3ce7a4fefa4375a2937f4ff89d0e47f63e042f5d

Authored by Chris Packham
Committed by Tom Rini
1 parent 67b060b46b

Makefile: use u-boot.map for binary_size_check

u-boot.map is generated automatically by the compiler and more
importantly can handle addresses >4GB.

Showing 1 changed file with 4 additions and 3 deletions Side-by-side Diff

... ... @@ -802,14 +802,15 @@
802 802  
803 803 OBJCOPYFLAGS_u-boot.bin := -O binary
804 804  
805   -binary_size_check: u-boot.bin System.map FORCE
  805 +binary_size_check: u-boot.bin FORCE
806 806 @file_size=$(shell wc -c u-boot.bin | awk '{print $$1}') ; \
807   - map_size=$(shell cat System.map | \
  807 + map_size=$(shell cat u-boot.map | \
808 808 awk '/_image_copy_start/ {start = $$1} /_image_binary_end/ {end = $$1} END {if (start != "" && end != "") print "ibase=16; " toupper(end) " - " toupper(start)}' \
  809 + | sed 's/0X//g' \
809 810 | bc); \
810 811 if [ "" != "$$map_size" ]; then \
811 812 if test $$map_size -ne $$file_size; then \
812   - echo "System.map shows a binary size of $$map_size" >&2 ; \
  813 + echo "u-boot.map shows a binary size of $$map_size" >&2 ; \
813 814 echo " but u-boot.bin shows $$file_size" >&2 ; \
814 815 exit 1; \
815 816 fi \