ar71xx: image: add mtdpartsize macro

The new macro will be used to determine the firmware
partition size from an MTD layout.

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>

SVN-Revision: 38117
owl
Gabor Juhos 2013-09-22 09:11:25 +00:00
parent 48a3a30fec
commit ea0ff700e8
1 changed files with 4 additions and 0 deletions

View File

@ -31,6 +31,10 @@ define mkcmdline
$(if $(1),board=$(1) )$(if $(2),console=$(2)$(COMMA)$(3)) $(if $(1),board=$(1) )$(if $(2),console=$(2)$(COMMA)$(3))
endef endef
define mtdpartsize
$(shell echo $$((`echo '$(2)' | sed -e 's/.*[:$(COMMA)]\([0-9]*\)k[@]*[0-9a-zx]*($(1)).*/\1/'` * 1024)))
endef
SINGLE_PROFILES:= SINGLE_PROFILES:=
define SingleProfile define SingleProfile