From 7263838e6926107e0e6c5c930a87524b99656cb9 Mon Sep 17 00:00:00 2001 From: Adrian Schmutzler Date: Mon, 15 Jul 2019 14:55:24 +0200 Subject: [PATCH] ramips/mt7621: fix IMAGE_SIZE for all devices This fixes IMAGE_SIZE for all devices based on the partition size given in DTS: DEVICE *.MK *.DTS VERDICT afoundry_ew1200 (16M) 0xfb0000 asiarf_ap7621-001 (16M) 0xfa0000 wrong buffalo_wsr-1166dhp (16M) 0xf90000 wrong buffalo_wsr-600dhp (16M) 0xfb0000 dlink_dir-860l-b1 (16M) 0xfb0000 d-team_newifi-d2 (32M) 0x1fb0000 d-team_pbr-m1 (16M) 0xfb0000 elecom_wrc-1167ghbk2-s 15488k 0xf20000 elecom_wrc-1900gst 11264k 0xb00000 elecom_wrc-2533gst 11264k 0xb00000 firefly_firewrt (16M) 0xfb0000 gehua_ghl-r-001 (32M) 0x1fb0000 gnubee_gb-pc1 (32M) 0x1fb0000 gnubee_gb-pc2 (32M) 0x1fb0000 hiwifi_hc5962 (32M) 0x2000000 wrong (kernel + ubi) iodata_wn-ax1167gr 15552k 0xf30000 iodata_wn-gx300gr 7798784 0x770000 lenovo_newifi-d1 (32M) 0x1fb0000 linksys_re6500 - 0x7b0000 default mediatek_ap-mt7621a-v60 (8M) 0x7b0000 mediatek_mt7621-eval-board (4M) 0xec0000 wrong (rootfs) mikrotik_rb750gr3 [16128k] 0xfc0000 mikrotik_rbm11g [16128k] 0xFC0000 mikrotik_rbm33g [16128k] 0xFC0000 mqmaker_witi-256m (16M) 0xfb0000 mqmaker_witi-512m (16M) 0xfb0000 mtc_wr1201 16000k 0xfa0000 netgear_ex6150 14848k 0xe80000 netgear_r6220 28672k 0x1c00000 netgear_r6350 40960k 0x2800000 netgear_wndr3700-v5 15232k 0xee0000 netis_wf-2881 129280k 0x7E40000 phicomm_k2p 15744k 0xf60000 planex_vr500 66453504 0x3fb0000 wrong samknows_whitebox-v8 (16M) 0xfb0000 storylink_sap-g3200u3 - 0x7b0000 default telco-electronics_x1 16064k 0xfb0000 thunder_timecloud - 0xfb0000 wrong totolink_a7000r 16064k 0xfb0000 tplink_re350-v1 6016k 0x5e0000 ubiquiti_edgerouterx - 0xfa00000 wrong (kernel1 + ubi) ubiquiti_edgerouterx-sfp - 0xfa00000 wrong (kernel1 + ubi) unielec_u7621-06-256m-16m 16064k 0xfb0000 unielec_u7621-06-512m-64m 65216k 0x3fb0000 wevo_11acnas (16M) 0xfb0000 wevo_w2914ns-v2 (16M) 0xfb0000 xiaomi_mir3g 32768k 0x7980000 wrong (kernel + ubi) xiaomi_mir3p (32M) 0xf980000 wrong (kernel + ubi) xzwifi_creativebox-v1 (32M) 0x1fb0000 youhua_wr1200js 16064k 0xfb0000 youku_yk-l2 (16M) 0xfb0000 zbtlink_zbt-we1326 (16M) 0xfb0000 zbtlink_zbt-we3526 (16M) 0xfb0000 zbtlink_zbt-wg2626 (16M) 0xfb0000 zbtlink_zbt-wg3526-16m (16M) 0xfb0000 zbtlink_zbt-wg3526-32m (32M) 0x1fb0000 No verdict means that the device is correctly set. Legend: ( ): Value is set via ralink_default_fw_size_xxM [ ]: Value is derived from parent definition - : Value is not set and derived from default definition Signed-off-by: Adrian Schmutzler --- target/linux/ramips/image/mt7621.mk | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/target/linux/ramips/image/mt7621.mk b/target/linux/ramips/image/mt7621.mk index 0902c4eedc..e604302954 100644 --- a/target/linux/ramips/image/mt7621.mk +++ b/target/linux/ramips/image/mt7621.mk @@ -98,7 +98,7 @@ TARGET_DEVICES += afoundry_ew1200 define Device/asiarf_ap7621-001 MTK_SOC := mt7621 - IMAGE_SIZE := $(ralink_default_fw_size_16M) + IMAGE_SIZE := 16000k DEVICE_VENDOR := AsiaRF DEVICE_MODEL := AP7621-001 DEVICE_PACKAGES := \ @@ -118,7 +118,7 @@ TARGET_DEVICES += asus_rt-ac57u define Device/buffalo_wsr-1166dhp MTK_SOC := mt7621 IMAGE/sysupgrade.bin := trx | pad-rootfs | append-metadata - IMAGE_SIZE := $(ralink_default_fw_size_16M) + IMAGE_SIZE := 15936k DEVICE_VENDOR := Buffalo DEVICE_MODEL := WSR-1166DHP DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 wpad-basic @@ -251,7 +251,7 @@ define Device/hiwifi_hc5962 PAGESIZE := 2048 KERNEL_SIZE := 2097152 UBINIZE_OPTS := -E 5 - IMAGE_SIZE := $(ralink_default_fw_size_32M) + IMAGE_SIZE := 32768k IMAGES += factory.bin IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata IMAGE/factory.bin := append-kernel | pad-to $$(KERNEL_SIZE) | append-ubi | check-size $$$$(IMAGE_SIZE) @@ -314,7 +314,7 @@ TARGET_DEVICES += mediatek_ap-mt7621a-v60 define Device/mediatek_mt7621-eval-board MTK_SOC := mt7621 BLOCKSIZE := 64k - IMAGE_SIZE := $(ralink_default_fw_size_4M) + IMAGE_SIZE := 15104k DEVICE_VENDOR := MediaTek DEVICE_MODEL := MT7621 EVB SUPPORTED_DEVICES += mt7621 @@ -475,7 +475,7 @@ TARGET_DEVICES += phicomm_k2p define Device/planex_vr500 MTK_SOC := mt7621 - IMAGE_SIZE := 66453504 + IMAGE_SIZE := 65216k DEVICE_VENDOR := Planex DEVICE_MODEL := VR500 DEVICE_PACKAGES := kmod-usb3 @@ -515,6 +515,7 @@ TARGET_DEVICES += telco-electronics_x1 define Device/thunder_timecloud MTK_SOC := mt7621 + IMAGE_SIZE := $(ralink_default_fw_size_16M) DEVICE_VENDOR := Thunder DEVICE_MODEL := Timecloud DEVICE_PACKAGES := kmod-usb3 @@ -569,6 +570,7 @@ TARGET_DEVICES += tplink_re650-v1 define Device/ubiquiti_edgerouterx MTK_SOC := mt7621 + IMAGE_SIZE := 256768k FILESYSTEMS := squashfs KERNEL_SIZE := 3145728 KERNEL_INITRAMFS := $$(KERNEL) | ubnt-erx-factory-image $(KDIR)/tmp/$$(KERNEL_INITRAMFS_PREFIX)-factory.tar @@ -636,7 +638,7 @@ define Device/xiaomi_mir3g BLOCKSIZE := 128k PAGESIZE := 2048 KERNEL_SIZE := 4096k - IMAGE_SIZE := 32768k + IMAGE_SIZE := 124416k UBINIZE_OPTS := -E 5 IMAGES += kernel1.bin rootfs0.bin IMAGE/kernel1.bin := append-kernel @@ -658,7 +660,7 @@ define Device/xiaomi_mir3p PAGESIZE := 2048 KERNEL_SIZE:= 4096k UBINIZE_OPTS := -E 5 - IMAGE_SIZE := $(ralink_default_fw_size_32M) + IMAGE_SIZE := 255488k DEVICE_VENDOR := Xiaomi DEVICE_MODEL := Mi Router 3 Pro IMAGES += factory.bin -- 2.30.2