aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ar71xx
diff options
context:
space:
mode:
authorGabor Juhos <juhosg@openwrt.org>2013-09-22 09:11:25 +0000
committerGabor Juhos <juhosg@openwrt.org>2013-09-22 09:11:25 +0000
commite993d5739e4cd459c14678e46ee3fb3859621d5c (patch)
treeccce3e4bf2437c7a882d52bd2331f87ff586bf72 /target/linux/ar71xx
parent4f5f42fcf96aca1fb2b6a358c037b52b28c6d9e1 (diff)
downloadupstream-e993d5739e4cd459c14678e46ee3fb3859621d5c.tar.gz
upstream-e993d5739e4cd459c14678e46ee3fb3859621d5c.tar.bz2
upstream-e993d5739e4cd459c14678e46ee3fb3859621d5c.zip
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> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@38117 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/ar71xx')
-rw-r--r--target/linux/ar71xx/image/Makefile4
1 files changed, 4 insertions, 0 deletions
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