From 0bf4d681d4f2e4bd3c3a61e7fe5dca2a40b1902f Mon Sep 17 00:00:00 2001 From: Adrian Schmutzler Date: Thu, 12 Dec 2019 20:26:06 +0100 Subject: [PATCH] ramips: allow JCG_MAXSIZE in kiB in Build/jcg-header This allows JCG_MAXSIZE to be specified in kilobytes. This makes this value more consistent and easier comparable with other size variables. This also changes the only occurence of the variable, for Cudy WR1000. Signed-off-by: Adrian Schmutzler --- target/linux/ramips/image/Makefile | 4 +++- target/linux/ramips/image/mt76x8.mk | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/target/linux/ramips/image/Makefile b/target/linux/ramips/image/Makefile index d700e69440..4f65583f13 100644 --- a/target/linux/ramips/image/Makefile +++ b/target/linux/ramips/image/Makefile @@ -48,7 +48,9 @@ define Device/seama endef define Build/jcg-header - $(STAGING_DIR_HOST)/bin/jcgimage -v $(1) $(if $(JCG_MAXSIZE), -m $(JCG_MAXSIZE),) -u $@ -o $@.new + $(STAGING_DIR_HOST)/bin/jcgimage -v $(1) \ + $(if $(JCG_MAXSIZE), -m $$(($(subst k, * 1024,$(JCG_MAXSIZE)))),) \ + -u $@ -o $@.new mv $@.new $@ endef diff --git a/target/linux/ramips/image/mt76x8.mk b/target/linux/ramips/image/mt76x8.mk index dbd80a6053..758caf7fa2 100644 --- a/target/linux/ramips/image/mt76x8.mk +++ b/target/linux/ramips/image/mt76x8.mk @@ -37,7 +37,7 @@ define Device/cudy_wr1000 IMAGES += factory.bin IMAGE/factory.bin := \ $$(sysupgrade_bin) | check-size $$$$(IMAGE_SIZE) | jcg-header 92.122 - JCG_MAXSIZE := 8060928 + JCG_MAXSIZE := 7872k DEVICE_VENDOR := Cudy DEVICE_MODEL := WR1000 DEVICE_PACKAGES := kmod-mt76x2 -- 2.25.1