image: use helper function for size units
authorTony Ambardar <itugrok@yahoo.com>
Sat, 11 Nov 2023 12:29:26 +0000 (04:29 -0800)
committerHauke Mehrtens <hauke@hauke-m.de>
Sun, 26 Nov 2023 17:37:20 +0000 (18:37 +0100)
commitb16e14a220fcab19e3145328057e7188f00b6a17
tree7412f17f418fa7c01575843d11563790242e4742
parentc66511bc488c3665d47dd60baf981ca1c385c221
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>
include/image-commands.mk
include/image.mk
target/linux/ath79/image/generic.mk
target/linux/ath79/image/nand.mk
target/linux/ipq40xx/image/generic.mk
target/linux/mediatek/image/mt7622.mk
target/linux/ramips/image/Makefile