ramips: fix wrong blocksizes
[openwrt/openwrt.git] / target / linux / ramips / image / mt7621.mk
index 750e7e1e4ba803cd7a1d8e7684c07b5f99f3e65f..0c14d515d0df334b5fe4727930e0ea5fa791e4a2 100644 (file)
@@ -2,15 +2,6 @@
 # MT7621 Profiles
 #
 
-define Build/seama
-       $(STAGING_DIR_HOST)/bin/seama -i $@ $(1)
-       mv $@.seama $@
-endef
-
-define Build/seama-seal
-       $(call Build/seama,-s $@.seama $(1))
-endef
-
 define Build/ubnt-erx-factory-image
        if [ -e $(KDIR)/tmp/$(KERNEL_INITRAMFS_IMAGE) -a "$$(stat -c%s $@)" -lt "$(KERNEL_SIZE)" ]; then \
                echo '21001:6' > $(1).compat; \
@@ -37,6 +28,7 @@ endef
 
 define Device/mt7621
   DTS := MT7621
+  BLOCKSIZE := 64k
   IMAGE_SIZE := $(ralink_default_fw_size_4M)
   DEVICE_TITLE := MediaTek MT7621 EVB
 endef
@@ -65,15 +57,17 @@ TARGET_DEVICES += wsr-1166
 
 define Device/dir-860l-b1
   DTS := DIR-860L-B1
+  BLOCKSIZE := 64k
   IMAGES += factory.bin
   KERNEL := kernel-bin | patch-dtb | relocate-kernel | lzma | uImage lzma
   IMAGE_SIZE := $(ralink_default_fw_size_16M)
   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=wrgac13_dlink.2013gui_dir860lb" | \
        check-size $$$$(IMAGE_SIZE)
@@ -152,6 +146,7 @@ define Device/wf-2881
   FILESYSTEMS := squashfs
   IMAGE_SIZE := 129280k
   KERNEL := $(KERNEL_DTB) | pad-offset $$(BLOCKSIZE) 64 | uImage lzma
+  UBINIZE_OPTS := -E 5
   IMAGE/sysupgrade.bin := append-kernel | append-ubi | check-size $$$$(IMAGE_SIZE)
   DEVICE_TITLE := NETIS WF-2881
   DEVICE_PACKAGES := kmod-usb3 kmod-ledtrig-usbdev