summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorChris Packham <judge.packham@gmail.com>2014-07-24 12:44:25 +1200
committerTom Rini <trini@ti.com>2014-08-09 11:17:02 -0400
commit67b060b46b117375b489de2112c90c456552b654 (patch)
treef09b7fae98928df6a2b1f36826a289de5ff7e7cd /Makefile
parentded2e20ef281e5ff7921fbb3b74113ea33e8e309 (diff)
downloadu-boot-imx-67b060b46b117375b489de2112c90c456552b654.zip
u-boot-imx-67b060b46b117375b489de2112c90c456552b654.tar.gz
u-boot-imx-67b060b46b117375b489de2112c90c456552b654.tar.bz2
Makefile: use $(shell ...) for determining file_size
file_size was being calculated using back-ticks but map_size uses $(shell ...). Update the file_size calculation to use $(shell ...). From: Jeroen Hofstee <jeroen@myspectrum.nl> The binary_size_check target relies on stat -c %s to return the size of u-boot.bin. This only works with GNU stat though. Use wc instead. Signed-off-by: Chris Packham <judge.packham@gmail.com> Acked-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile2
1 files changed, 1 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 666d291..cf88003 100644
--- a/Makefile
+++ b/Makefile
@@ -803,7 +803,7 @@ u-boot.hex u-boot.srec: u-boot FORCE
OBJCOPYFLAGS_u-boot.bin := -O binary
binary_size_check: u-boot.bin System.map FORCE
- @file_size=`stat -c %s u-boot.bin` ; \
+ @file_size=$(shell wc -c u-boot.bin | awk '{print $$1}') ; \
map_size=$(shell cat System.map | \
awk '/_image_copy_start/ {start = $$1} /_image_binary_end/ {end = $$1} END {if (start != "" && end != "") print "ibase=16; " toupper(end) " - " toupper(start)}' \
| bc); \