From: Gabor Juhos Date: Sun, 22 Sep 2013 09:11:25 +0000 (+0000) Subject: ar71xx: image: add mtdpartsize macro X-Git-Url: http://git.openwrt.org/?p=openwrt%2Fsvn-archive%2Farchive.git;a=commitdiff_plain;hb=f04386cedbc37a4b9fc74a07a85bfdbf2137b238 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 SVN-Revision: 38117 --- diff --git a/target/linux/ar71xx/image/Makefile b/target/linux/ar71xx/image/Makefile index 60990b284d..8ac70448d5 100644 --- a/target/linux/ar71xx/image/Makefile +++ b/target/linux/ar71xx/image/Makefile @@ -31,6 +31,10 @@ define mkcmdline $(if $(1),board=$(1) )$(if $(2),console=$(2)$(COMMA)$(3)) endef +define mtdpartsize +$(shell echo $$((`echo '$(2)' | sed -e 's/.*[:$(COMMA)]\([0-9]*\)k[@]*[0-9a-zx]*($(1)).*/\1/'` * 1024))) +endef + SINGLE_PROFILES:= define SingleProfile