From b16e14a220fcab19e3145328057e7188f00b6a17 Mon Sep 17 00:00:00 2001 From: Tony Ambardar Date: Sat, 11 Nov 2023 04:29:26 -0800 Subject: 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 --- target/linux/ipq40xx/image/generic.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'target/linux/ipq40xx/image/generic.mk') 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 \ -- cgit v1.2.3