aboutsummaryrefslogtreecommitdiff
path: root/target/linux/ipq40xx/image/generic.mk
diff options
context:
space:
mode:
authorTony Ambardar <itugrok@yahoo.com>2023-11-11 04:29:26 -0800
committerHauke Mehrtens <hauke@hauke-m.de>2023-11-26 18:37:20 +0100
commitb16e14a220fcab19e3145328057e7188f00b6a17 (patch)
tree7412f17f418fa7c01575843d11563790242e4742 /target/linux/ipq40xx/image/generic.mk
parentc66511bc488c3665d47dd60baf981ca1c385c221 (diff)
image: use helper function for size units
Add the make function 'exp_units' for helping evaluate k/m/g size units in expressions, and use this to consistently replace many ad hoc substitutions like '$(subst k,* 1024,$(subst m, * 1024k,$(IMAGE_SIZE)))' in makefiles. Signed-off-by: Tony Ambardar <itugrok@yahoo.com>
Diffstat (limited to 'target/linux/ipq40xx/image/generic.mk')
-rw-r--r--target/linux/ipq40xx/image/generic.mk2
1 files changed, 1 insertions, 1 deletions
diff --git a/target/linux/ipq40xx/image/generic.mk b/target/linux/ipq40xx/image/generic.mk
index 1757684a7c..b4719033c0 100644
--- a/target/linux/ipq40xx/image/generic.mk
+++ b/target/linux/ipq40xx/image/generic.mk
@@ -68,7 +68,7 @@ define Build/mkmylofw_32m
let \
size="$$(stat -c%s $@)" \
- pad="$(subst k,* 1024,$(BLOCKSIZE))" \
+ pad="$(call exp_units,$(BLOCKSIZE))" \
pad="(pad - (size % pad)) % pad" \
newsize='size + pad'; \
$(STAGING_DIR_HOST)/bin/mkmylofw \