Explorar o código

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 <[email protected]>
Adrian Schmutzler %!s(int64=6) %!d(string=hai) anos
pai
achega
0bf4d681d4
Modificáronse 2 ficheiros con 4 adicións e 2 borrados
  1. 3 1
      target/linux/ramips/image/Makefile
  2. 1 1
      target/linux/ramips/image/mt76x8.mk

+ 3 - 1
target/linux/ramips/image/Makefile

@@ -48,7 +48,9 @@ define Device/seama
 endef
 endef
 
 
 define Build/jcg-header
 define Build/jcg-header
-	$(STAGING_DIR_HOST)/bin/jcgimage -v $(1) $(if $(JCG_MAXSIZE), -m $(JCG_MAXSIZE),) -u $@ -o [email protected]
+	$(STAGING_DIR_HOST)/bin/jcgimage -v $(1) \
+		$(if $(JCG_MAXSIZE), -m $$(($(subst k, * 1024,$(JCG_MAXSIZE)))),) \
+		-u $@ -o [email protected]
 	mv [email protected] $@
 	mv [email protected] $@
 endef
 endef
 
 

+ 1 - 1
target/linux/ramips/image/mt76x8.mk

@@ -37,7 +37,7 @@ define Device/cudy_wr1000
   IMAGES += factory.bin
   IMAGES += factory.bin
   IMAGE/factory.bin := \
   IMAGE/factory.bin := \
         $$(sysupgrade_bin) | check-size $$$$(IMAGE_SIZE) | jcg-header 92.122
         $$(sysupgrade_bin) | check-size $$$$(IMAGE_SIZE) | jcg-header 92.122
-  JCG_MAXSIZE := 8060928
+  JCG_MAXSIZE := 7872k
   DEVICE_VENDOR := Cudy
   DEVICE_VENDOR := Cudy
   DEVICE_MODEL := WR1000
   DEVICE_MODEL := WR1000
   DEVICE_PACKAGES := kmod-mt76x2
   DEVICE_PACKAGES := kmod-mt76x2