ramips: set blocksize for 4MB devices
[openwrt/staging/rmilecki.git] / target / linux / ramips / image / mt7620.mk
index 8e742a935d6dbc74f78f38272fa8b06a24577853..9ccd3d9833a8913a80084ef0cd862fe34b9642eb 100644 (file)
@@ -66,6 +66,7 @@ TARGET_DEVICES += ArcherC50
 
 define Device/ex2700
   DTS := EX2700
+  BLOCKSIZE := 4k
   IMAGE_SIZE := $(ralink_default_fw_size_4M)
   IMAGES += factory.bin
   KERNEL := $(KERNEL_DTB) | uImage lzma | pad-kernel-ex2700
@@ -76,6 +77,7 @@ TARGET_DEVICES += ex2700
 
 define Device/wt3020-4M
   DTS := WT3020-4M
+  BLOCKSIZE := 4k
   IMAGE_SIZE := $(ralink_default_fw_size_4M)
   IMAGES += factory.bin
   IMAGE/factory.bin := $$(IMAGE/sysupgrade.bin) | poray-header -B WT3020 -F 4M
@@ -394,14 +396,16 @@ TARGET_DEVICES += tiny-ac
 
 define Device/dch-m225
   DTS := DCH-M225
+  BLOCKSIZE := 4k
   IMAGES += factory.bin
   IMAGE_SIZE := 6848k
   IMAGE/sysupgrade.bin := \
-       append-kernel | pad-offset 65536 64 | append-rootfs | \
+       append-kernel | pad-offset $$$$(BLOCKSIZE) 64 | append-rootfs | \
        seama -m "dev=/dev/mtdblock/2" -m "type=firmware" | \
        pad-rootfs | check-size $$$$(IMAGE_SIZE)
   IMAGE/factory.bin := \
-       append-kernel | pad-offset 65536 64 | append-rootfs | pad-rootfs -x 64 | \
+       append-kernel | pad-offset $$$$(BLOCKSIZE) 64 | \
+       append-rootfs | pad-rootfs -x 64 | \
        seama -m "dev=/dev/mtdblock/2" -m "type=firmware" | \
        seama-seal -m "signature=wapn22_dlink.2013gui_dap1320b" | \
        check-size $$$$(IMAGE_SIZE)