[Zrouter-src] ZRouter.org: push to ZRouter Makefile

zrouter-src at zrouter.org zrouter-src at zrouter.org
Wed Dec 28 23:32:10 UTC 2011


details:   http://zrouter.org/hg/zrouter//rev/3bde1243f404
changeset: 292:3bde1243f404
user:      ray at terran.dlink.ua
date:      Thu Dec 29 01:30:40 2011 +0200
description:
Expand 'K' and 'M' suffixes in BOARD_FLASH_SIZE variable.

Submitted by: Eric Krausser
Pr: issues/25

diffstat:

 Makefile |  6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diffs (16 lines):

diff -r 94af7e017780 -r 3bde1243f404 Makefile
--- a/Makefile	Wed Dec 28 00:46:17 2011 +0200
+++ b/Makefile	Thu Dec 29 01:30:40 2011 +0200
@@ -51,6 +51,12 @@
 
 KERNCONF_MAKEOPTIONS+=	"KERNLOADADDR=${KERNCONF_KERNLOADADDR}"
 
+# resolve board flash size with trailing M or K
+.if defined(BOARD_FLASH_SIZE)
+BOARD_FLASH_SIZE!=echo "${BOARD_FLASH_SIZE}" | \
+    sed -e 's/0x/ibase=16; /' -e 's/K/ * 1024/' -e 's/M/ * 1024 * 1024/' | bc
+.endif
+
 .if !defined(TARGET_PROFILES) || empty(TARGET_PROFILES)
 # if we have flash and it size less than 8M assign profile xSMALL_
 .if defined(BOARD_FLASH_SIZE) && !empty(BOARD_FLASH_SIZE) && ${BOARD_FLASH_SIZE} < 8388608


More information about the Zrouter-src mailing list