From: Mathias Kresin Date: Sat, 3 Sep 2016 07:56:35 +0000 (+0200) Subject: ramips: set blocksize for 4MB devices X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=28110727f1d513a6c4c13aa87ecb606aa5d306eb;p=openwrt%2Fstaging%2Fwigyori.git ramips: set blocksize for 4MB devices Set the blocksize for devices having only 4MB of flash for ramips devices already using the new image build code. Informations about the used flash chip are gathered from the OpenWrt wiki, wikidevi, forums, OEM bootlogs or the compatible property in the device tree source file. The en25q32b from the AirLive Air3GII does not have 4k support in the kernel. For the following boards no information about the used flash chip could be found and a 64k blocksize is assumed: - Ralink V11ST-FE - Ralink AP-RT3052-V22RW-2X2 - MediaTek MT7628 EVB - MediaTek MT7621 EVB - UPVEL UR-326N4G - Buffalo WZR-AGL300NH Signed-off-by: Mathias Kresin --- diff --git a/target/linux/ramips/image/mt7620.mk b/target/linux/ramips/image/mt7620.mk index 8e742a935d..9ccd3d9833 100644 --- a/target/linux/ramips/image/mt7620.mk +++ b/target/linux/ramips/image/mt7620.mk @@ -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) diff --git a/target/linux/ramips/image/mt7621.mk b/target/linux/ramips/image/mt7621.mk index 750e7e1e4b..47778c4636 100644 --- a/target/linux/ramips/image/mt7621.mk +++ b/target/linux/ramips/image/mt7621.mk @@ -37,6 +37,7 @@ endef define Device/mt7621 DTS := MT7621 + BLOCKSIZE := 64k IMAGE_SIZE := $(ralink_default_fw_size_4M) DEVICE_TITLE := MediaTek MT7621 EVB endef @@ -65,15 +66,17 @@ TARGET_DEVICES += wsr-1166 define Device/dir-860l-b1 DTS := DIR-860L-B1 + BLOCKSIZE := 4k 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) diff --git a/target/linux/ramips/image/mt7628.mk b/target/linux/ramips/image/mt7628.mk index bd7d5bf7a4..2a130b5d24 100644 --- a/target/linux/ramips/image/mt7628.mk +++ b/target/linux/ramips/image/mt7628.mk @@ -4,6 +4,7 @@ define Device/mt7628 DTS := MT7628 + BLOCKSIZE := 64k IMAGE_SIZE := $(ralink_default_fw_size_4M) DEVICE_TITLE := MediaTek MT7628 EVB DEVICE_PACKAGES := kmod-usb2 kmod-usb-ohci kmod-ledtrig-usbdev diff --git a/target/linux/ramips/image/rt288x.mk b/target/linux/ramips/image/rt288x.mk index ebb523e461..7e7652e9ec 100644 --- a/target/linux/ramips/image/rt288x.mk +++ b/target/linux/ramips/image/rt288x.mk @@ -15,6 +15,7 @@ endef define Device/ar670w DTS := AR670W + BLOCKSIZE := 64k DEVICE_TITLE := Airlink AR670W IMAGE_SIZE := $(ralink_default_fw_size_4M) KERNEL := $(KERNEL_DTB) @@ -41,6 +42,7 @@ TARGET_DEVICES += f5d8235v1 define Device/rt-n15 DTS := RT-N15 + BLOCKSIZE := 64k IMAGE_SIZE := $(ralink_default_fw_size_4M) DEVICE_TITLE := Asus RT-N15 DEVICE_PACKAGES := kmod-switch-rtl8366s @@ -49,6 +51,7 @@ TARGET_DEVICES += rt-n15 define Device/v11st-fe DTS := V11STFE + BLOCKSIZE := 64k IMAGE_SIZE := $(ralink_default_fw_size_4M) DEVICE_TITLE := Ralink V11ST-FE endef @@ -56,6 +59,7 @@ TARGET_DEVICES += v11st-fe define Device/wli-tx4-ag300n DTS := WLI-TX4-AG300N + BLOCKSIZE := 64k IMAGE_SIZE := $(ralink_default_fw_size_4M) DEVICE_TITLE := Buffalo WLI-TX4-AG300N endef @@ -63,6 +67,7 @@ TARGET_DEVICES += wli-tx4-ag300n define Device/wzr-agl300nh DTS := WZR-AGL300NH + BLOCKSIZE := 64k IMAGE_SIZE := $(ralink_default_fw_size_4M) DEVICE_TITLE := Buffalo WZR-AGL300NH DEVICE_PACKAGES := kmod-switch-rtl8366s diff --git a/target/linux/ramips/image/rt305x.mk b/target/linux/ramips/image/rt305x.mk index ede2728a32..13193ae796 100644 --- a/target/linux/ramips/image/rt305x.mk +++ b/target/linux/ramips/image/rt305x.mk @@ -107,6 +107,7 @@ TARGET_DEVICES += f7c027 define Device/air3gii DTS := AIR3GII + BLOCKSIZE := 64k IMAGE_SIZE := $(ralink_default_fw_size_4M) DEVICE_TITLE := AirLive Air3GII endef @@ -122,6 +123,7 @@ TARGET_DEVICES += awm003-evb define Device/awmapn2403 DTS := AWAPN2403 + BLOCKSIZE := 4k IMAGE_SIZE := $(ralink_default_fw_size_4M) DEVICE_TITLE := AsiaRF AWAPN2403 endef @@ -145,6 +147,7 @@ TARGET_DEVICES += carambola define Device/d105 DTS := D105 + BLOCKSIZE := 64k IMAGE_SIZE := $(ralink_default_fw_size_4M) DEVICE_TITLE := Huawei D105 endef @@ -167,6 +170,7 @@ TARGET_DEVICES += dir-620-d1 define Device/esr-9753 DTS := ESR-9753 + BLOCKSIZE := 64k IMAGE_SIZE := $(ralink_default_fw_size_4M) DEVICE_TITLE := EnGenius ESR-9753 endef @@ -221,6 +225,7 @@ TARGET_DEVICES += mofi3500-3gn define Device/3g150b DTS := 3G150B + BLOCKSIZE := 4k IMAGE_SIZE := $(ralink_default_fw_size_4M) UIMAGE_NAME:= Linux Kernel Image DEVICE_TITLE := Tenda 3G150B @@ -238,6 +243,7 @@ TARGET_DEVICES += mr-102n define Device/mpr-a1 DTS := MPRA1 + BLOCKSIZE := 4k IMAGE_SIZE := $(ralink_default_fw_size_4M) UIMAGE_NAME:= Linux Kernel Image DEVICE_TITLE := HAME MPR-A1 @@ -257,6 +263,7 @@ TARGET_DEVICES += mpr-a2 define Device/dir-300-b7 DTS := DIR-300-B7 + BLOCKSIZE := 4k IMAGE_SIZE := $(ralink_default_fw_size_4M) DEVICE_TITLE := D-Link DIR-300 B7 endef @@ -272,6 +279,7 @@ TARGET_DEVICES += dir-320-b1 define Device/nbg-419n DTS := NBG-419N + BLOCKSIZE := 64k IMAGE_SIZE := $(ralink_default_fw_size_4M) DEVICE_TITLE := ZyXEL NBG-419N endef @@ -321,6 +329,7 @@ TARGET_DEVICES += miniembwifi define Device/psr-680w DTS := PSR-680W + BLOCKSIZE := 64k IMAGE_SIZE := $(ralink_default_fw_size_4M) DEVICE_TITLE := Petatel PSR-680W Wireless 3G Router endef @@ -357,6 +366,7 @@ TARGET_DEVICES += rt5350f-olinuxino-evb define Device/rt-g32-b1 DTS := RT-G32-B1 + BLOCKSIZE := 4k IMAGE_SIZE := $(ralink_default_fw_size_4M) DEVICE_TITLE := Asus RT-G32 B1 endef @@ -365,6 +375,7 @@ TARGET_DEVICES += rt-g32-b1 define Device/rt-n10-plus DTS := RT-N10-PLUS + BLOCKSIZE := 64k IMAGE_SIZE := $(ralink_default_fw_size_4M) DEVICE_TITLE := Asus RT-N10+ endef @@ -380,19 +391,23 @@ TARGET_DEVICES += rut5xx define Device/sl-r7205 DTS := SL-R7205 + BLOCKSIZE := 64k IMAGE_SIZE := $(ralink_default_fw_size_4M) DEVICE_TITLE := Skyline SL-R7205 Wireless 3G Router endef TARGET_DEVICES += sl-r7205 + define Device/tew-714tru DTS := TEW-714TRU DEVICE_TITLE := TRENDnet TEW-714TRU endef TARGET_DEVICES += tew-714tru + define Device/v22rw-2x2 DTS := V22RW-2X2 + BLOCKSIZE := 64k IMAGE_SIZE := $(ralink_default_fw_size_4M) DEVICE_TITLE := Ralink AP-RT3052-V22RW-2X2 endef @@ -408,6 +423,7 @@ TARGET_DEVICES += w502u define Device/wcr150gn DTS := WCR150GN + BLOCKSIZE := 64k IMAGE_SIZE := $(ralink_default_fw_size_4M) DEVICE_TITLE := Sparklan WCR-150GN endef @@ -416,6 +432,7 @@ TARGET_DEVICES += wcr150gn define Device/mzk-dp150n DTS := MZK-DP150N + BLOCKSIZE := 4k IMAGE_SIZE := $(ralink_default_fw_size_4M) DEVICE_TITLE := Planex MZK-DP150N DEVICE_PACKAGES := kmod-spi-dev @@ -441,6 +458,7 @@ TARGET_DEVICES += wizfi630a define Device/wl-330n DTS := WL-330N + BLOCKSIZE := 4k IMAGE_SIZE := $(ralink_default_fw_size_4M) DEVICE_TITLE := Asus WL-330N endef @@ -449,6 +467,7 @@ TARGET_DEVICES += wl-330n define Device/wl-330n3g DTS := WL-330N3G + BLOCKSIZE := 4k IMAGE_SIZE := $(ralink_default_fw_size_4M) DEVICE_TITLE := Asus WL-330N3G DEVICE_PACKAGES := @@ -458,6 +477,7 @@ TARGET_DEVICES += wl-330n3g define Device/wl-351 DTS := WL-351 + BLOCKSIZE := 64k IMAGE_SIZE := $(ralink_default_fw_size_4M) DEVICE_TITLE := Sitecom WL-351 v1 DEVICE_PACKAGES := kmod-switch-rtl8366rb kmod-swconfig swconfig @@ -467,6 +487,7 @@ TARGET_DEVICES += wl-351 define Device/ur-326n4g DTS := UR-326N4G + BLOCKSIZE := 64k IMAGE_SIZE := $(ralink_default_fw_size_4M) DEVICE_TITLE := UPVEL UR-326N4G DEVICE_PACKAGES := kmod-usb-core kmod-usb-dwc2 kmod-ledtrig-usbdev @@ -491,6 +512,7 @@ TARGET_DEVICES += wr6202 define Device/xdxrn502j DTS := XDXRN502J + BLOCKSIZE := 64k IMAGE_SIZE := $(ralink_default_fw_size_4M) DEVICE_TITLE := XDX RN502J endef