aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ramips/image
diff options
context:
space:
mode:
authorAdrian Schmutzler <freifunk@adrianschmutzler.de>2019-12-12 20:26:06 +0100
committerAdrian Schmutzler <freifunk@adrianschmutzler.de>2019-12-13 19:54:14 +0100
commit52c9f951786cd5885ab5e0a329f010454045cbd7 (patch)
treeb6db6986d09766e51c0fefb151670fa01f8c3aca /target/linux/ramips/image
parente33a123140cec10ef1b31511f5b2d235bac08d2f (diff)
downloadupstream-52c9f951786cd5885ab5e0a329f010454045cbd7.tar.gz
upstream-52c9f951786cd5885ab5e0a329f010454045cbd7.tar.bz2
upstream-52c9f951786cd5885ab5e0a329f010454045cbd7.zip
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. This is backported to 19.07 for convenience, as other developers backporting device support might not be aware that JCG_MAXSIZE in kilobytes would not work there. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de> (cherry picked from commit 0bf4d681d4f2e4bd3c3a61e7fe5dca2a40b1902f)
Diffstat (limited to 'target/linux/ramips/image')
-rw-r--r--target/linux/ramips/image/Makefile4
-rw-r--r--target/linux/ramips/image/mt76x8.mk2
2 files changed, 4 insertions, 2 deletions
diff --git a/target/linux/ramips/image/Makefile b/target/linux/ramips/image/Makefile
index 07251aebba..f51e337afd 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 054935e595..7df5c04297 100644
--- a/target/linux/ramips/image/mt76x8.mk
+++ b/target/linux/ramips/image/mt76x8.mk
@@ -33,7 +33,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_TITLE := Cudy WR1000
DEVICE_PACKAGES := kmod-mt76x2
SUPPORTED_DEVICES += wr1000