From d5812478ad4c882256e43a2ad52ddf0c0944db7b Mon Sep 17 00:00:00 2001 From: Russell Senior Date: Thu, 19 Mar 2020 04:27:28 -0700 Subject: [PATCH 01/12] ath79: add support for ubnt_bullet-m-ar7240 variant This adds support for the Ubiquiti Bullet M (AR7240). Specifications: - AR7240 SoC @ 400 MHz - 32 MB RAM - 8 MB SPI flash - 1x 10/100 Mbps Ethernet, 24 Vdc PoE-in - External antenna - POWER/LAN green LEDs - 4x RSSI LEDs (red, orange, green, green) - UART (115200 8N1) on PCB Flashing via WebUI: Upload the factory image via the stock firmware web UI. Attention: airOS firmware versions >= 5.6 have a new bootloader with an incompatible partition table! Please downgrade to <= 5.5 _before_ flashing OpenWrt! Refer to the device's Wiki page for further information. Flashing via TFTP: Same procedure as other Ubiquiti M boards. - Use a pointy tool (e.g., pen cap, paper clip) and keep the reset button on the device or on the PoE supply pressed - Power on the device via PoE (keep reset button pressed) - Keep pressing until LEDs flash alternatively LED1+LED3 => LED2+LED4 => LED1+LED3, etc. - Release reset button - The device starts a TFTP server at 192.168.1.20 - Set a static IP on the computer (e.g., 192.168.1.21/24) - Upload via tftp the factory image: $ tftp 192.168.1.20 tftp> bin tftp> trace tftp> put openwrt-ath79-generic-xxxxx-ubnt_bullet-m-ar7240-squashfs-factory.bin The "fixed-link" section of the device tree is needed to avoid errors like this: Generic PHY mdio.0:1f:04: Master/Slave resolution failed, maybe conflicting manual settings? With "fixed-link", the errors go away and eth0 comes up reliably. Signed-off-by: Russell Senior [fix SUPPORTED_DEVICES] Signed-off-by: Adrian Schmutzler --- .../ath79/dts/ar7240_ubnt_bullet-m-ar7240.dts | 22 +++++++++++++++++++ .../generic/base-files/etc/board.d/01_leds | 1 + .../generic/base-files/etc/board.d/02_network | 2 ++ .../etc/hotplug.d/firmware/10-ath9k-eeprom | 1 + target/linux/ath79/image/generic-ubnt.mk | 10 +++++++++ 5 files changed, 36 insertions(+) create mode 100644 target/linux/ath79/dts/ar7240_ubnt_bullet-m-ar7240.dts diff --git a/target/linux/ath79/dts/ar7240_ubnt_bullet-m-ar7240.dts b/target/linux/ath79/dts/ar7240_ubnt_bullet-m-ar7240.dts new file mode 100644 index 0000000000..58b35f5c8b --- /dev/null +++ b/target/linux/ath79/dts/ar7240_ubnt_bullet-m-ar7240.dts @@ -0,0 +1,22 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT +/dts-v1/; + +#include "ar7240.dtsi" +#include "ar724x_ubnt_xm.dtsi" +#include "ar724x_ubnt_xm_outdoor.dtsi" + +/ { + compatible = "ubnt,bullet-m-ar7240", "ubnt,xm", "qca,ar7240"; + model = "Ubiquiti Bullet M XM (AR7240)"; +}; + +ð0 { + fixed-link { + speed = <100>; + full-duplex; + }; +}; + +ð1 { + compatible = "syscon", "simple-mfd"; +}; diff --git a/target/linux/ath79/generic/base-files/etc/board.d/01_leds b/target/linux/ath79/generic/base-files/etc/board.d/01_leds index 227ccf0dfe..2df7dca89d 100755 --- a/target/linux/ath79/generic/base-files/etc/board.d/01_leds +++ b/target/linux/ath79/generic/base-files/etc/board.d/01_leds @@ -250,6 +250,7 @@ tplink,tl-wr842n-v2) trendnet,tew-823dru) ucidef_set_led_netdev "wan" "WAN" "trendnet:green:planet" "eth0" ;; +ubnt,bullet-m-ar7240|\ ubnt,bullet-m-ar7241|\ ubnt,bullet-m-xw|\ ubnt,nanostation-loco-m|\ diff --git a/target/linux/ath79/generic/base-files/etc/board.d/02_network b/target/linux/ath79/generic/base-files/etc/board.d/02_network index dbb722482b..fc1fee4844 100755 --- a/target/linux/ath79/generic/base-files/etc/board.d/02_network +++ b/target/linux/ath79/generic/base-files/etc/board.d/02_network @@ -40,6 +40,7 @@ ath79_setup_interfaces() tplink,re450-v1|\ tplink,re450-v2|\ tplink,tl-wr902ac-v1|\ + ubnt,bullet-m-ar7240|\ ubnt,bullet-m-ar7241|\ ubnt,bullet-m-xw|\ ubnt,lap-120|\ @@ -446,6 +447,7 @@ ath79_setup_macs() label_mac=$wan_mac ;; ubnt,airrouter|\ + ubnt,bullet-m-ar7240|\ ubnt,bullet-m-ar7241|\ ubnt,nanostation-loco-m|\ ubnt,nanostation-m|\ diff --git a/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom b/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom index 38f158896b..0cf8b43514 100644 --- a/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom +++ b/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom @@ -85,6 +85,7 @@ case "$FIRMWARE" in tplink,tl-wr2543-v1|\ tplink,tl-wr842n-v1|\ ubnt,airrouter|\ + ubnt,bullet-m-ar7240|\ ubnt,bullet-m-ar7241|\ ubnt,nanostation-loco-m|\ ubnt,nanostation-m|\ diff --git a/target/linux/ath79/image/generic-ubnt.mk b/target/linux/ath79/image/generic-ubnt.mk index 4902023089..95853b6c46 100644 --- a/target/linux/ath79/image/generic-ubnt.mk +++ b/target/linux/ath79/image/generic-ubnt.mk @@ -113,6 +113,16 @@ define Device/ubnt_airrouter endef TARGET_DEVICES += ubnt_airrouter +define Device/ubnt_bullet-m-ar7240 + $(Device/ubnt-xm) + SOC := ar7240 + DEVICE_MODEL := Bullet-M + DEVICE_VARIANT := XM (AR7240) + DEVICE_PACKAGES += rssileds + SUPPORTED_DEVICES += bullet-m +endef +TARGET_DEVICES += ubnt_bullet-m-ar7240 + define Device/ubnt_bullet-m-ar7241 $(Device/ubnt-xm) SOC := ar7241 From 5b392c7119f23aef10ffc0def9a70e8335f9f3f8 Mon Sep 17 00:00:00 2001 From: Sungbo Eo Date: Tue, 10 Mar 2020 15:41:09 +0900 Subject: [PATCH 02/12] treewide: gather DEVICE_VARS into one place Place DEVICE_VARS assignments at the top of the file or above Device/Default to make them easier to find. For ramips, remove redundant values already present in parent file. Signed-off-by: Sungbo Eo [do not touch ar71xx, extend commit message] Signed-off-by: Adrian Schmutzler --- target/linux/ath79/image/nand.mk | 3 ++- target/linux/bcm63xx/image/bcm63xx.mk | 11 ++++++----- target/linux/ipq40xx/image/Makefile | 6 +++--- target/linux/ipq806x/image/Makefile | 5 +++-- target/linux/lantiq/image/Makefile | 2 +- target/linux/lantiq/image/vr9.mk | 3 ++- target/linux/mvebu/image/Makefile | 2 +- target/linux/omap/image/Makefile | 1 - target/linux/ramips/image/mt7621.mk | 3 +-- target/linux/sunxi/image/Makefile | 2 +- target/linux/tegra/image/Makefile | 1 + 11 files changed, 21 insertions(+), 18 deletions(-) diff --git a/target/linux/ath79/image/nand.mk b/target/linux/ath79/image/nand.mk index 8f28af4655..7d283b54c4 100644 --- a/target/linux/ath79/image/nand.mk +++ b/target/linux/ath79/image/nand.mk @@ -1,5 +1,7 @@ include ./common-netgear.mk # for netgear-uImage +DEVICE_VARS += RAS_ROOTFS_SIZE RAS_BOARD RAS_VERSION + # attention: only zlib compression is allowed for the boot fs define Build/zyxel-buildkerneljffs rm -rf $(KDIR_TMP)/zyxelnbg6716 @@ -216,4 +218,3 @@ define Device/zyxel_nbg6716 UBINIZE_OPTS := -E 5 endef TARGET_DEVICES += zyxel_nbg6716 -DEVICE_VARS += RAS_ROOTFS_SIZE RAS_BOARD RAS_VERSION diff --git a/target/linux/bcm63xx/image/bcm63xx.mk b/target/linux/bcm63xx/image/bcm63xx.mk index 265fa0958a..ccbc7f1325 100644 --- a/target/linux/bcm63xx/image/bcm63xx.mk +++ b/target/linux/bcm63xx/image/bcm63xx.mk @@ -3,6 +3,12 @@ # BCM33XX/BCM63XX Profiles # +DEVICE_VARS += HCS_MAGIC_BYTES HCS_REV_MIN HCS_REV_MAJ +DEVICE_VARS += BLOCK_SIZE FLASH_MB IMAGE_OFFSET +DEVICE_VARS += CFE_BOARD_ID CFE_CHIP_ID CFE_EXTRAS +DEVICE_VARS += NETGEAR_BOARD_ID NETGEAR_REGION +DEVICE_VARS += REDBOOT_PREFIX + define Device/bcm33xx KERNEL_INITRAMFS := kernel-bin | append-dtb | lzma | loader-lzma bin | hcs-initramfs IMAGES := @@ -10,7 +16,6 @@ define Device/bcm33xx HCS_REV_MIN := HCS_REV_MAJ := endef -DEVICE_VARS += HCS_MAGIC_BYTES HCS_REV_MIN HCS_REV_MAJ define Device/bcm63xx FILESYSTEMS := squashfs jffs2-64k jffs2-128k @@ -31,8 +36,6 @@ define Device/bcm63xx CFE_CHIP_ID := CFE_EXTRAS = --block-size $$(BLOCK_SIZE) --image-offset $$(if $$(IMAGE_OFFSET),$$(IMAGE_OFFSET),$$(BLOCK_SIZE)) endef -DEVICE_VARS += BLOCK_SIZE FLASH_MB IMAGE_OFFSET -DEVICE_VARS += CFE_BOARD_ID CFE_CHIP_ID CFE_EXTRAS define Device/bcm63xx_netgear $(Device/bcm63xx) @@ -42,7 +45,6 @@ define Device/bcm63xx_netgear NETGEAR_BOARD_ID := NETGEAR_REGION := endef -DEVICE_VARS += NETGEAR_BOARD_ID NETGEAR_REGION define Device/bcm63xx_redboot FILESYSTEMS := squashfs @@ -52,7 +54,6 @@ define Device/bcm63xx_redboot IMAGE/redboot.bin := redboot-bin REDBOOT_PREFIX := $$(IMAGE_PREFIX) endef -DEVICE_VARS += REDBOOT_PREFIX ### Generic ### define Device/brcm_bcm963281tan diff --git a/target/linux/ipq40xx/image/Makefile b/target/linux/ipq40xx/image/Makefile index 2e95ad4dfb..1cd7650881 100644 --- a/target/linux/ipq40xx/image/Makefile +++ b/target/linux/ipq40xx/image/Makefile @@ -1,8 +1,9 @@ include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/image.mk -DEVICE_VARS += RAS_BOARD RAS_ROOTFS_SIZE RAS_VERSION \ - WRGG_DEVNAME WRGG_SIGNATURE +DEVICE_VARS += NETGEAR_BOARD_ID NETGEAR_HW_ID +DEVICE_VARS += RAS_BOARD RAS_ROOTFS_SIZE RAS_VERSION +DEVICE_VARS += WRGG_DEVNAME WRGG_SIGNATURE define Device/Default PROFILES := Default @@ -51,7 +52,6 @@ define Device/DniImage IMAGE/factory.img := append-kernel | pad-offset 64k 64 | append-uImage-fakehdr filesystem | append-rootfs | pad-rootfs | netgear-dni IMAGE/sysupgrade.bin := append-kernel | pad-offset 64k 64 | append-uImage-fakehdr filesystem | append-rootfs | pad-rootfs | append-metadata endef -DEVICE_VARS += NETGEAR_BOARD_ID NETGEAR_HW_ID define Build/mkmylofw_32m $(eval device_id=$(word 1,$(1))) diff --git a/target/linux/ipq806x/image/Makefile b/target/linux/ipq806x/image/Makefile index 6f529aca06..6ea66d064d 100644 --- a/target/linux/ipq806x/image/Makefile +++ b/target/linux/ipq806x/image/Makefile @@ -3,6 +3,9 @@ include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/image.mk +DEVICE_VARS += NETGEAR_BOARD_ID NETGEAR_HW_ID +DEVICE_VARS += TPLINK_BOARD_ID + define Build/buffalo-rootfs-cksum ( \ echo -ne "\x$$(od -A n -t u1 $@ | tr -s ' ' '\n' | \ @@ -58,7 +61,6 @@ define Device/DniImage IMAGE/factory.img := append-kernel | pad-offset $$$$(BLOCKSIZE) 64 | append-uImage-fakehdr filesystem | pad-to $$$$(KERNEL_SIZE) | append-ubi | netgear-dni IMAGE/sysupgrade.bin := append-kernel | pad-offset $$$$(BLOCKSIZE) 64 | append-uImage-fakehdr filesystem | sysupgrade-tar kernel=$$$$@ | append-metadata endef -DEVICE_VARS += NETGEAR_BOARD_ID NETGEAR_HW_ID define Device/TpSafeImage KERNEL_SUFFIX := -uImage @@ -69,7 +71,6 @@ define Device/TpSafeImage IMAGE/factory.bin := append-rootfs | tplink-safeloader factory IMAGE/sysupgrade.bin := append-rootfs | tplink-safeloader sysupgrade | append-metadata endef -DEVICE_VARS += TPLINK_BOARD_ID define Device/ZyXELImage KERNEL_SUFFIX := -uImage diff --git a/target/linux/lantiq/image/Makefile b/target/linux/lantiq/image/Makefile index 0ec04af6b3..87a4110f7e 100644 --- a/target/linux/lantiq/image/Makefile +++ b/target/linux/lantiq/image/Makefile @@ -52,6 +52,7 @@ define Build/fullimage rm $@.tmp endef +DEVICE_VARS += SIGNATURE MAGIC CRC32_POLY DTS_DIR := $(DTS_DIR)/lantiq # Shared device definition: applies to every defined device @@ -93,7 +94,6 @@ define Device/lantiqBrnImage IMAGES := factory.bin IMAGE/factory.bin := mkbrnimg | check-size $$$$(IMAGE_SIZE) endef -DEVICE_VARS += SIGNATURE MAGIC CRC32_POLY define Device/lantiqFullImage KERNEL := kernel-bin | append-dtb | lzma | uImage lzma | pad-offset 4 0 diff --git a/target/linux/lantiq/image/vr9.mk b/target/linux/lantiq/image/vr9.mk index 083d8efe0f..2bea40011d 100644 --- a/target/linux/lantiq/image/vr9.mk +++ b/target/linux/lantiq/image/vr9.mk @@ -1,3 +1,5 @@ +DEVICE_VARS += NETGEAR_BOARD_ID NETGEAR_HW_ID + define Device/alphanetworks_asl56026 DEVICE_VENDOR := Alpha DEVICE_MODEL := ASL56026 @@ -199,7 +201,6 @@ define Device/netgear_dm200 NETGEAR_BOARD_ID := DM200 NETGEAR_HW_ID := 29765233+8+0+64+0+0 endef -DEVICE_VARS += NETGEAR_BOARD_ID NETGEAR_HW_ID TARGET_DEVICES += netgear_dm200 define Device/zyxel_p-2812hnu-f1 diff --git a/target/linux/mvebu/image/Makefile b/target/linux/mvebu/image/Makefile index 024e77969a..ef9274866d 100644 --- a/target/linux/mvebu/image/Makefile +++ b/target/linux/mvebu/image/Makefile @@ -11,6 +11,7 @@ JFFS2_BLOCKSIZE = 128k include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/image.mk +DEVICE_VARS += BOOT_SCRIPT UBOOT KERNEL_LOADADDR := 0x00008000 define Build/boot-scr @@ -96,7 +97,6 @@ define Device/Default UBOOT := BOOT_SCRIPT := endef -DEVICE_VARS += BOOT_SCRIPT UBOOT define Device/Default-arm64 BOOT_SCRIPT := generic-arm64 diff --git a/target/linux/omap/image/Makefile b/target/linux/omap/image/Makefile index 106071a38e..6a7b20199f 100644 --- a/target/linux/omap/image/Makefile +++ b/target/linux/omap/image/Makefile @@ -33,7 +33,6 @@ endef define Device/Default PROFILES := Default - DEVICE_VARS := KERNEL_NAME := zImage KERNEL := kernel-bin IMAGES := sdcard.img.gz diff --git a/target/linux/ramips/image/mt7621.mk b/target/linux/ramips/image/mt7621.mk index 4fcd92cced..e9572a70fc 100644 --- a/target/linux/ramips/image/mt7621.mk +++ b/target/linux/ramips/image/mt7621.mk @@ -7,7 +7,7 @@ include ./common-tp-link.mk DEFAULT_SOC := mt7621 KERNEL_DTB += -d21 -DEVICE_VARS += UIMAGE_MAGIC +DEVICE_VARS += UIMAGE_MAGIC SERCOMM_HWNAME # The OEM webinterface expects an kernel with initramfs which has the uImage # header field ih_name. @@ -554,7 +554,6 @@ define Device/netgear_sercomm_nand DEVICE_VENDOR := NETGEAR DEVICE_PACKAGES := kmod-mt7603 kmod-usb3 kmod-usb-ledtrig-usbport wpad-basic endef -DEVICE_VARS += SERCOMM_HWNAME SERCOMM_HWID SERCOMM_HWVER SERCOMM_SWVER define Device/netgear_r6220 $(Device/netgear_sercomm_nand) diff --git a/target/linux/sunxi/image/Makefile b/target/linux/sunxi/image/Makefile index cb8febca41..1b98849a50 100644 --- a/target/linux/sunxi/image/Makefile +++ b/target/linux/sunxi/image/Makefile @@ -11,6 +11,7 @@ include $(INCLUDE_DIR)/image.mk FAT32_BLOCK_SIZE=1024 FAT32_BLOCKS=$(shell echo $$(($(CONFIG_SUNXI_SD_BOOT_PARTSIZE)*1024*1024/$(FAT32_BLOCK_SIZE)))) +DEVICE_VARS := SUNXI_DTS SUNXI_DTS_DIR KERNEL_LOADADDR:=0x40008000 define Build/sunxi-sdcard @@ -32,7 +33,6 @@ endef # why \x00\x00\x00\x00 for zImage-initramfs define Device/Default PROFILES := Default - DEVICE_VARS := SUNXI_DTS SUNXI_DTS_DIR KERNEL_NAME := zImage KERNEL := kernel-bin | uImage none IMAGES := sdcard.img.gz diff --git a/target/linux/tegra/image/Makefile b/target/linux/tegra/image/Makefile index 10bada9c38..3a19feb55e 100644 --- a/target/linux/tegra/image/Makefile +++ b/target/linux/tegra/image/Makefile @@ -34,6 +34,7 @@ define Build/tegra-sdcard endef DEVICE_VARS += BOOT_SCRIPT UBOOT + define Device/Default BOOT_SCRIPT := generic-bootscript IMAGES := sdcard.img.gz From 1444e31a7bf54b796f8ef88e77fee255b959c6bb Mon Sep 17 00:00:00 2001 From: Sungbo Eo Date: Tue, 10 Mar 2020 22:58:00 +0900 Subject: [PATCH 03/12] build: image: set default parameter for check-size In most cases check-size is used with IMAGE_SIZE and vice versa. Let check-size use IMAGE_SIZE by default. Signed-off-by: Sungbo Eo --- include/image-commands.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/image-commands.mk b/include/image-commands.mk index 2ec1922044..e7db7128b4 100644 --- a/include/image-commands.mk +++ b/include/image-commands.mk @@ -269,7 +269,7 @@ define Build/xor-image endef define Build/check-size - @[ $$(($(subst k,* 1024,$(subst m, * 1024k,$(1))))) -ge "$$(stat -c%s $@)" ] || { \ + @[ $$(($(subst k,* 1024,$(subst m, * 1024k,$(if $(1),$(1),$(IMAGE_SIZE)))))) -ge "$$(stat -c%s $@)" ] || { \ echo "WARNING: Image file $@ is too big" >&2; \ rm -f $@; \ } From 3f14f034fb5e191f4a537998379d8e922ec31e8a Mon Sep 17 00:00:00 2001 From: Sungbo Eo Date: Tue, 10 Mar 2020 22:58:27 +0900 Subject: [PATCH 04/12] treewide: omit IMAGE_SIZE argument from check-size Now that check-size uses IMAGE_SIZE by default, we can skip the argument from image recipes to reduce redundancy. Signed-off-by: Sungbo Eo [do not touch ar71xx] Signed-off-by: Adrian Schmutzler --- target/linux/apm821xx/image/Makefile | 2 +- target/linux/ath79/image/Makefile | 2 +- target/linux/ath79/image/common-netgear.mk | 4 +- target/linux/ath79/image/common-tp-link.mk | 4 +- target/linux/ath79/image/generic-tp-link.mk | 2 +- target/linux/ath79/image/generic-ubnt.mk | 4 +- target/linux/ath79/image/generic.mk | 76 ++++++++++----------- target/linux/ath79/image/mikrotik.mk | 2 +- target/linux/ath79/image/nand.mk | 8 +-- target/linux/ath79/image/tiny-netgear.mk | 2 +- target/linux/ath79/image/tiny.mk | 4 +- target/linux/ipq40xx/image/Makefile | 14 ++-- target/linux/kirkwood/image/Makefile | 2 +- target/linux/lantiq/image/Makefile | 8 +-- target/linux/lantiq/image/ar9.mk | 6 +- target/linux/lantiq/image/tp-link.mk | 2 +- target/linux/lantiq/image/vr9.mk | 2 +- target/linux/ramips/image/Makefile | 6 +- target/linux/ramips/image/common-tp-link.mk | 6 +- target/linux/ramips/image/mt7620.mk | 38 +++++------ target/linux/ramips/image/mt7621.mk | 34 ++++----- target/linux/ramips/image/mt76x8.mk | 6 +- target/linux/ramips/image/rt288x.mk | 4 +- target/linux/ramips/image/rt305x.mk | 46 ++++++------- target/linux/ramips/image/rt3883.mk | 8 +-- 25 files changed, 146 insertions(+), 146 deletions(-) diff --git a/target/linux/apm821xx/image/Makefile b/target/linux/apm821xx/image/Makefile index 1b0bc477a9..27c7f122da 100644 --- a/target/linux/apm821xx/image/Makefile +++ b/target/linux/apm821xx/image/Makefile @@ -212,7 +212,7 @@ define Device/netgear_wndr4700 append-uImage-fakehdr filesystem | dtb | create-uImage-dtb | prepend-dtb KERNEL_INITRAMFS := kernel-bin | gzip | dtb | MuImage-initramfs gzip IMAGE/factory.img := append-kernel | pad-to $$$$(KERNEL_SIZE) | append-ubi | \ - netgear-dni | check-size $$$$(IMAGE_SIZE) + netgear-dni | check-size IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata ARTIFACT/device-tree.dtb := export-dtb | uImage none NETGEAR_BOARD_ID := WNDR4700 diff --git a/target/linux/ath79/image/Makefile b/target/linux/ath79/image/Makefile index c568c7238c..529baf8f57 100644 --- a/target/linux/ath79/image/Makefile +++ b/target/linux/ath79/image/Makefile @@ -65,7 +65,7 @@ define Device/Default SUPPORTED_DEVICES := $(subst _,$(comma),$(1)) IMAGES := sysupgrade.bin IMAGE/sysupgrade.bin = append-kernel | pad-to $$$$(BLOCKSIZE) | \ - append-rootfs | pad-rootfs | append-metadata | check-size $$$$(IMAGE_SIZE) + append-rootfs | pad-rootfs | append-metadata | check-size endef ifeq ($(SUBTARGET),generic) diff --git a/target/linux/ath79/image/common-netgear.mk b/target/linux/ath79/image/common-netgear.mk index 8fa6b030fc..51808069e3 100644 --- a/target/linux/ath79/image/common-netgear.mk +++ b/target/linux/ath79/image/common-netgear.mk @@ -38,7 +38,7 @@ define Device/netgear_ath79 KERNEL := kernel-bin | append-dtb | lzma -d20 | netgear-uImage lzma IMAGES += factory.img IMAGE/sysupgrade.bin := $$(IMAGE/default) | append-metadata | \ - check-size $$$$(IMAGE_SIZE) + check-size IMAGE/factory.img := $$(IMAGE/default) | netgear-dni | \ - check-size $$$$(IMAGE_SIZE) + check-size endef diff --git a/target/linux/ath79/image/common-tp-link.mk b/target/linux/ath79/image/common-tp-link.mk index 5b27390c1b..328eaaed30 100644 --- a/target/linux/ath79/image/common-tp-link.mk +++ b/target/linux/ath79/image/common-tp-link.mk @@ -31,7 +31,7 @@ define Device/tplink-v2 KERNEL := kernel-bin | append-dtb | lzma KERNEL_INITRAMFS := kernel-bin | append-dtb | lzma | tplink-v2-header IMAGE/sysupgrade.bin := tplink-v2-image -s | append-metadata | \ - check-size $$$$(IMAGE_SIZE) + check-size endef define Device/tplink-nolzma @@ -79,7 +79,7 @@ define Device/tplink-safeloader TPLINK_HWREV := 0x0 KERNEL := kernel-bin | append-dtb | lzma | tplink-v1-header -O IMAGE/sysupgrade.bin := append-rootfs | tplink-safeloader sysupgrade | \ - append-metadata | check-size $$$$(IMAGE_SIZE) + append-metadata | check-size IMAGE/factory.bin := append-rootfs | tplink-safeloader factory endef diff --git a/target/linux/ath79/image/generic-tp-link.mk b/target/linux/ath79/image/generic-tp-link.mk index 18f5233c09..4c925cf850 100644 --- a/target/linux/ath79/image/generic-tp-link.mk +++ b/target/linux/ath79/image/generic-tp-link.mk @@ -541,7 +541,7 @@ define Device/tplink_tl-wr2543-v1 DEVICE_PACKAGES := kmod-usb2 kmod-usb-ledtrig-usbport TPLINK_HWID := 0x25430001 IMAGE/sysupgrade.bin := tplink-v1-image sysupgrade -v 3.13.99 | \ - append-metadata | check-size $$$$(IMAGE_SIZE) + append-metadata | check-size IMAGE/factory.bin := tplink-v1-image factory -v 3.13.99 SUPPORTED_DEVICES += tl-wr2543n endef diff --git a/target/linux/ath79/image/generic-ubnt.mk b/target/linux/ath79/image/generic-ubnt.mk index 95853b6c46..d2c4f73797 100644 --- a/target/linux/ath79/image/generic-ubnt.mk +++ b/target/linux/ath79/image/generic-ubnt.mk @@ -34,7 +34,7 @@ define Device/ubnt DEVICE_PACKAGES := kmod-usb2 IMAGES += factory.bin IMAGE/factory.bin := append-kernel | pad-to $$$$(BLOCKSIZE) | \ - append-rootfs | pad-rootfs | check-size $$$$(IMAGE_SIZE) | mkubntimage-split + append-rootfs | pad-rootfs | check-size | mkubntimage-split endef define Device/ubnt-bz @@ -251,7 +251,7 @@ define Device/ubnt_routerstation_common IMAGE_SIZE := 16128k IMAGES := factory.bin IMAGE/factory.bin := append-rootfs | pad-rootfs | mkubntimage | \ - check-size $$$$(IMAGE_SIZE) + check-size KERNEL := kernel-bin | append-dtb | lzma | pad-to $$(BLOCKSIZE) KERNEL_INITRAMFS := kernel-bin | append-dtb endef diff --git a/target/linux/ath79/image/generic.mk b/target/linux/ath79/image/generic.mk index 3ce51cc0d6..aac89e9269 100644 --- a/target/linux/ath79/image/generic.mk +++ b/target/linux/ath79/image/generic.mk @@ -99,9 +99,9 @@ define Device/seama # - 36 bytes of META data (4-bytes aligned) IMAGE/default := append-kernel | pad-offset $$$$(BLOCKSIZE) 64 | append-rootfs IMAGE/sysupgrade.bin := $$(IMAGE/default) | seama | pad-rootfs | \ - append-metadata | check-size $$$$(IMAGE_SIZE) + append-metadata | check-size IMAGE/factory.bin := $$(IMAGE/default) | pad-rootfs -x 64 | seama | \ - seama-seal | check-size $$$$(IMAGE_SIZE) + seama-seal | check-size SEAMA_SIGNATURE := endef @@ -127,7 +127,7 @@ define Device/adtran_bsap1880 IMAGE/kernel.bin := append-kernel IMAGE/rootfs.bin := append-rootfs | pad-rootfs IMAGE/sysupgrade.bin := append-rootfs | pad-rootfs | \ - check-size $$$$(IMAGE_SIZE) | sysupgrade-tar rootfs=$$$$@ | append-metadata + check-size | sysupgrade-tar rootfs=$$$$@ | append-metadata endef define Device/adtran_bsap1800-v2 @@ -171,7 +171,7 @@ define Device/avm_fritz300e IMAGE_SIZE := 15232k IMAGE/sysupgrade.bin := append-kernel | pad-to 64k | \ append-squashfs-fakeroot-be | pad-to 256 | append-rootfs | pad-rootfs | \ - append-metadata | check-size $$$$(IMAGE_SIZE) + append-metadata | check-size DEVICE_PACKAGES := fritz-tffs rssileds -swconfig SUPPORTED_DEVICES += fritz300e endef @@ -186,7 +186,7 @@ define Device/avm_fritz4020 KERNEL_INITRAMFS := $$(KERNEL) IMAGE/sysupgrade.bin := append-kernel | pad-to 64k | \ append-squashfs-fakeroot-be | pad-to 256 | append-rootfs | pad-rootfs | \ - append-metadata | check-size $$$$(IMAGE_SIZE) + append-metadata | check-size DEVICE_PACKAGES := fritz-tffs SUPPORTED_DEVICES += fritz4020 endef @@ -200,7 +200,7 @@ define Device/buffalo_bhr-4grv IMAGE_SIZE := 32256k IMAGES += factory.bin tftp.bin IMAGE/default := append-kernel | pad-to $$$$(BLOCKSIZE) | append-rootfs | \ - pad-rootfs | check-size $$$$(IMAGE_SIZE) + pad-rootfs | check-size IMAGE/factory.bin := $$(IMAGE/default) | buffalo-enc BHR-4GRV 1.99 | \ buffalo-tag BHR-4GRV 3 IMAGE/tftp.bin := $$(IMAGE/default) | buffalo-tftp-header @@ -223,7 +223,7 @@ define Device/buffalo_wzr-hp-ag300h IMAGE_SIZE := 32320k IMAGES += factory.bin tftp.bin IMAGE/default := append-kernel | pad-to $$$$(BLOCKSIZE) | append-rootfs | \ - pad-rootfs | check-size $$$$(IMAGE_SIZE) + pad-rootfs | check-size IMAGE/factory.bin := $$(IMAGE/default) | buffalo-enc WZR-HP-AG300H 1.99 | \ buffalo-tag WZR-HP-AG300H 3 IMAGE/tftp.bin := $$(IMAGE/default) | buffalo-tftp-header @@ -242,7 +242,7 @@ define Device/buffalo_wzr-hp-g302h-a1a0 IMAGE_SIZE := 32128k IMAGES += factory.bin tftp.bin IMAGE/default := append-kernel | pad-to $$$$(BLOCKSIZE) | append-rootfs | \ - pad-rootfs | check-size $$$$(IMAGE_SIZE) + pad-rootfs | check-size IMAGE/factory.bin := $$(IMAGE/default) | buffalo-enc WZR-HP-G302H 1.99 | \ buffalo-tag WZR-HP-G302H 4 IMAGE/tftp.bin := $$(IMAGE/default) | buffalo-tftp-header @@ -258,7 +258,7 @@ define Device/buffalo_wzr-hp-g450h IMAGE_SIZE := 32256k IMAGES += factory.bin tftp.bin IMAGE/default := append-kernel | pad-to $$$$(BLOCKSIZE) | append-rootfs | \ - pad-rootfs | check-size $$$$(IMAGE_SIZE) + pad-rootfs | check-size IMAGE/factory.bin := $$(IMAGE/default) | buffalo-enc WZR-HP-G450H 1.99 | \ buffalo-tag WZR-HP-G450H 3 IMAGE/tftp.bin := $$(IMAGE/default) | buffalo-tftp-header @@ -426,7 +426,7 @@ define Device/dlink_dir-825-b1 DEVICE_VARIANT := B1 IMAGE_SIZE := 6208k IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | \ - append-metadata | check-size $$$$(IMAGE_SIZE) + append-metadata | check-size DEVICE_PACKAGES := kmod-usb-ohci kmod-usb2 kmod-usb-ledtrig-usbport \ kmod-leds-reset kmod-owl-loader SUPPORTED_DEVICES += dir-825-b1 @@ -446,9 +446,9 @@ define Device/dlink_dir-825-c1 IMAGE/default := append-kernel | pad-to $$$$(BLOCKSIZE) | append-rootfs | \ pad-rootfs IMAGE/factory.bin := $$(IMAGE/default) | pad-offset $$$$(IMAGE_SIZE) 26 | \ - append-string 00DB120AR9344-RT-101214-00 | check-size $$$$(IMAGE_SIZE) + append-string 00DB120AR9344-RT-101214-00 | check-size IMAGE/sysupgrade.bin := $$(IMAGE/default) | append-metadata | \ - check-size $$$$(IMAGE_SIZE) + check-size endef TARGET_DEVICES += dlink_dir-825-c1 @@ -464,9 +464,9 @@ define Device/dlink_dir-835-a1 IMAGE/default := append-kernel | pad-to $$$$(BLOCKSIZE) | append-rootfs | \ pad-rootfs IMAGE/factory.bin := $$(IMAGE/default) | pad-offset $$$$(IMAGE_SIZE) 26 | \ - append-string 00DB120AR9344-RT-101214-00 | check-size $$$$(IMAGE_SIZE) + append-string 00DB120AR9344-RT-101214-00 | check-size IMAGE/sysupgrade.bin := $$(IMAGE/default) | append-metadata | \ - check-size $$$$(IMAGE_SIZE) + check-size endef TARGET_DEVICES += dlink_dir-835-a1 @@ -485,9 +485,9 @@ define Device/dlink_dir-842-c IMAGE/default := append-kernel | uImage lzma | \ pad-offset $$$$(BLOCKSIZE) 64 | append-rootfs IMAGE/sysupgrade.bin := $$(IMAGE/default) | seama | pad-rootfs | \ - append-metadata | check-size $$$$(IMAGE_SIZE) + append-metadata | check-size IMAGE/factory.bin := $$(IMAGE/default) | pad-rootfs -x 64 | seama | \ - seama-seal | check-size $$$$(IMAGE_SIZE) + seama-seal | check-size IMAGE_SIZE := 15680k endef @@ -561,10 +561,10 @@ define Device/engenius_ecb1750 DEVICE_PACKAGES := kmod-ath10k-ct ath10k-firmware-qca988x-ct IMAGE_SIZE := 15680k IMAGE/factory.bin := append-kernel | pad-to $$$$(BLOCKSIZE) | \ - append-rootfs | pad-rootfs | check-size $$$$(IMAGE_SIZE) | \ + append-rootfs | pad-rootfs | check-size | \ senao-header -r 0x101 -p 0x6d -t 2 IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | \ - append-metadata | check-size $$$$(IMAGE_SIZE) + append-metadata | check-size endef TARGET_DEVICES += engenius_ecb1750 @@ -576,7 +576,7 @@ define Device/engenius_epg5000 IMAGE_SIZE := 14656k IMAGES += factory.dlf IMAGE/factory.dlf := append-kernel | pad-to $$$$(BLOCKSIZE) | \ - append-rootfs | pad-rootfs | check-size $$$$(IMAGE_SIZE) | \ + append-rootfs | pad-rootfs | check-size | \ senao-header -r 0x101 -p 0x71 -t 2 SUPPORTED_DEVICES += epg5000 endef @@ -694,7 +694,7 @@ define Device/iodata_wn-ac1167dgr IMAGE_SIZE := 14656k IMAGES += factory.bin IMAGE/factory.bin := append-kernel | pad-to $$$$(BLOCKSIZE) | \ - append-rootfs | pad-rootfs | check-size $$$$(IMAGE_SIZE) | \ + append-rootfs | pad-rootfs | check-size | \ senao-header -r 0x30a -p 0x61 -t 2 DEVICE_PACKAGES := kmod-usb2 kmod-ath10k-ct ath10k-firmware-qca988x-ct endef @@ -707,7 +707,7 @@ define Device/iodata_wn-ac1600dgr IMAGE_SIZE := 14656k IMAGES += factory.bin IMAGE/factory.bin := append-kernel | pad-to $$$$(BLOCKSIZE) | \ - append-rootfs | pad-rootfs | check-size $$$$(IMAGE_SIZE) | \ + append-rootfs | pad-rootfs | check-size | \ senao-header -r 0x30a -p 0x60 -t 2 -v 200 DEVICE_PACKAGES := kmod-usb2 kmod-ath10k-ct ath10k-firmware-qca988x-ct endef @@ -720,7 +720,7 @@ define Device/iodata_wn-ac1600dgr2 IMAGE_SIZE := 14656k IMAGES += dgr2-dgr3-factory.bin IMAGE/dgr2-dgr3-factory.bin := append-kernel | pad-to $$$$(BLOCKSIZE) | \ - append-rootfs | pad-rootfs | check-size $$$$(IMAGE_SIZE) | \ + append-rootfs | pad-rootfs | check-size | \ senao-header -r 0x30a -p 0x60 -t 2 -v 200 DEVICE_PACKAGES := kmod-usb2 kmod-ath10k-ct ath10k-firmware-qca988x-ct endef @@ -733,7 +733,7 @@ define Device/iodata_wn-ag300dgr IMAGE_SIZE := 15424k IMAGES += factory.bin IMAGE/factory.bin := append-kernel | pad-to $$$$(BLOCKSIZE) | \ - append-rootfs | pad-rootfs | check-size $$$$(IMAGE_SIZE) | \ + append-rootfs | pad-rootfs | check-size | \ senao-header -r 0x30a -p 0x47 -t 2 DEVICE_PACKAGES := kmod-usb2 endef @@ -774,9 +774,9 @@ define Device/nec_wg1200cr IMAGES += factory.bin IMAGE/default := append-kernel | pad-offset $$$$(BLOCKSIZE) 64 | append-rootfs IMAGE/sysupgrade.bin := $$(IMAGE/default) | seama | pad-rootfs | \ - append-metadata | check-size $$$$(IMAGE_SIZE) + append-metadata | check-size IMAGE/factory.bin := $$(IMAGE/default) | pad-rootfs -x 64 | seama | \ - seama-seal | nec-enc 9gsiy9nzep452pad | check-size $$$$(IMAGE_SIZE) + seama-seal | nec-enc 9gsiy9nzep452pad | check-size DEVICE_PACKAGES := kmod-ath10k-ct ath10k-firmware-qca9888-ct endef TARGET_DEVICES += nec_wg1200cr @@ -788,7 +788,7 @@ define Device/nec_wg800hp IMAGE_SIZE := 7104k IMAGES += factory.bin IMAGE/factory.bin := append-kernel | pad-to $$$$(BLOCKSIZE) | \ - append-rootfs | pad-rootfs | check-size $$$$(IMAGE_SIZE) | \ + append-rootfs | pad-rootfs | check-size | \ xor-image -p 6A57190601121E4C004C1E1201061957 -x | nec-fw LASER_ATERM DEVICE_PACKAGES := kmod-ath10k-ct-smallbuffers ath10k-firmware-qca9887-ct-htt endef @@ -836,7 +836,7 @@ define Device/netgear_wndr3700 IMAGE_SIZE := 7680k IMAGES += factory-NA.img IMAGE/factory-NA.img := $$(IMAGE/default) | netgear-dni NA | \ - check-size $$$$(IMAGE_SIZE) + check-size SUPPORTED_DEVICES += wndr3700 endef TARGET_DEVICES += netgear_wndr3700 @@ -893,7 +893,7 @@ define Device/netgear_wnr2200-8m IMAGE_SIZE := 7808k IMAGES += factory-NA.img IMAGE/factory-NA.img := $$(IMAGE/default) | netgear-dni NA | \ - check-size $$$$(IMAGE_SIZE) + check-size SUPPORTED_DEVICES += wnr2200 endef TARGET_DEVICES += netgear_wnr2200-8m @@ -917,7 +917,7 @@ define Device/ocedo_koala SUPPORTED_DEVICES += koala IMAGE_SIZE := 7424k IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | \ - append-metadata | check-size $$$$(IMAGE_SIZE) + append-metadata | check-size endef TARGET_DEVICES += ocedo_koala @@ -927,7 +927,7 @@ define Device/ocedo_raccoon DEVICE_MODEL := Raccoon IMAGE_SIZE := 7424k IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | \ - append-metadata | check-size $$$$(IMAGE_SIZE) + append-metadata | check-size endef TARGET_DEVICES += ocedo_raccoon @@ -938,7 +938,7 @@ define Device/ocedo_ursus DEVICE_PACKAGES := kmod-ath10k-ct ath10k-firmware-qca988x-ct IMAGE_SIZE := 7424k IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | \ - append-metadata | check-size $$$$(IMAGE_SIZE) + append-metadata | check-size endef TARGET_DEVICES += ocedo_ursus @@ -987,7 +987,7 @@ define Device/phicomm_k2t DEVICE_MODEL := K2T IMAGE_SIZE := 15744k IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | \ - append-metadata | check-size $$$$(IMAGE_SIZE) + append-metadata | check-size DEVICE_PACKAGES := kmod-leds-reset kmod-ath10k-ct-smallbuffers ath10k-firmware-qca9888-ct endef TARGET_DEVICES += phicomm_k2t @@ -1075,7 +1075,7 @@ define Device/sitecom_wlr-7100 DEVICE_PACKAGES := ath10k-firmware-qca988x-ct kmod-ath10k-ct-smallbuffers kmod-usb2 IMAGES += factory.dlf IMAGE/factory.dlf := append-kernel | pad-to $$$$(BLOCKSIZE) | \ - append-rootfs | pad-rootfs | check-size $$$$(IMAGE_SIZE) | \ + append-rootfs | pad-rootfs | check-size | \ senao-header -r 0x222 -p 0x53 -t 2 IMAGE_SIZE := 7488k endef @@ -1091,7 +1091,7 @@ define Device/sitecom_wlr-8100 SUPPORTED_DEVICES += wlr8100 IMAGES += factory.dlf IMAGE/factory.dlf := append-kernel | pad-to $$$$(BLOCKSIZE) | \ - append-rootfs | pad-rootfs | check-size $$$$(IMAGE_SIZE) | \ + append-rootfs | pad-rootfs | check-size | \ senao-header -r 0x222 -p 0x56 -t 2 IMAGE_SIZE := 15424k endef @@ -1112,10 +1112,10 @@ define Device/teltonika_rut955 IMAGES += factory.bin IMAGE/factory.bin := append-kernel | pad-to $$$$(BLOCKSIZE) | append-rootfs |\ pad-rootfs | teltonika-fw-fake-checksum | append-string master |\ - append-md5sum-bin | check-size $$$$(IMAGE_SIZE) + append-md5sum-bin | check-size IMAGE/sysupgrade.bin := append-kernel | pad-to $$$$(BLOCKSIZE) |\ append-rootfs | pad-rootfs | append-metadata |\ - check-size $$$$(IMAGE_SIZE) + check-size endef TARGET_DEVICES += teltonika_rut955 @@ -1131,9 +1131,9 @@ define Device/trendnet_tew-823dru IMAGE/default := append-kernel | pad-to $$$$(BLOCKSIZE) | append-rootfs | \ pad-rootfs IMAGE/factory.bin := $$(IMAGE/default) | pad-offset $$$$(IMAGE_SIZE) 26 | \ - append-string 00AP135AR9558-RT-131129-00 | check-size $$$$(IMAGE_SIZE) + append-string 00AP135AR9558-RT-131129-00 | check-size IMAGE/sysupgrade.bin := $$(IMAGE/default) | append-metadata | \ - check-size $$$$(IMAGE_SIZE) + check-size endef TARGET_DEVICES += trendnet_tew-823dru diff --git a/target/linux/ath79/image/mikrotik.mk b/target/linux/ath79/image/mikrotik.mk index a89dc8c170..a9ff129816 100644 --- a/target/linux/ath79/image/mikrotik.mk +++ b/target/linux/ath79/image/mikrotik.mk @@ -19,7 +19,7 @@ define Device/mikrotik_routerboard-wap-g-5hact2hnd IMAGE_SIZE := 16256k IMAGE/sysupgrade.bin := append-kernel | kernel2minor -s 1024 -e | \ pad-to $$$$(BLOCKSIZE) | append-rootfs | pad-rootfs | \ - append-metadata | check-size $$$$(IMAGE_SIZE) + append-metadata | check-size DEVICE_PACKAGES += kmod-ath10k-ct-smallbuffers ath10k-firmware-qca988x-ct SUPPORTED_DEVICES += rb-wapg-5hact2hnd endef diff --git a/target/linux/ath79/image/nand.mk b/target/linux/ath79/image/nand.mk index 7d283b54c4..3ccd19914f 100644 --- a/target/linux/ath79/image/nand.mk +++ b/target/linux/ath79/image/nand.mk @@ -43,7 +43,7 @@ define Device/aerohive_hiveap-121 SUPPORTED_DEVICES += hiveap-121 IMAGES += factory.bin IMAGE/factory.bin := append-kernel | pad-to $$$$(KERNEL_SIZE) | append-ubi | \ - check-size $$$$(IMAGE_SIZE) + check-size IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata endef TARGET_DEVICES += aerohive_hiveap-121 @@ -62,7 +62,7 @@ define Device/domywifi_dw33d 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) + check-size endef TARGET_DEVICES += domywifi_dw33d @@ -145,9 +145,9 @@ define Device/netgear_ath79_nand KERNEL_INITRAMFS := kernel-bin | append-dtb | lzma -d20 | netgear-uImage lzma IMAGES := sysupgrade.bin factory.img IMAGE/factory.img := append-kernel | append-ubi | netgear-dni | \ - check-size $$$$(IMAGE_SIZE) + check-size IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata | \ - check-size $$$$(IMAGE_SIZE) + check-size UBINIZE_OPTS := -E 5 endef diff --git a/target/linux/ath79/image/tiny-netgear.mk b/target/linux/ath79/image/tiny-netgear.mk index 591ea57222..5c83a10e01 100644 --- a/target/linux/ath79/image/tiny-netgear.mk +++ b/target/linux/ath79/image/tiny-netgear.mk @@ -56,7 +56,7 @@ define Device/netgear_wnr2000-v3 append-rootfs | pad-rootfs IMAGES += factory-NA.img IMAGE/factory-NA.img := $$(IMAGE/default) | netgear-dni NA | \ - check-size $$$$(IMAGE_SIZE) + check-size SUPPORTED_DEVICES += wnr2000-v3 $(Device/netgear_ath79) endef diff --git a/target/linux/ath79/image/tiny.mk b/target/linux/ath79/image/tiny.mk index 54b20b6089..41f1eb4305 100644 --- a/target/linux/ath79/image/tiny.mk +++ b/target/linux/ath79/image/tiny.mk @@ -7,7 +7,7 @@ define Device/buffalo_whr-g301n IMAGE_SIZE := 3712k IMAGES += factory.bin tftp.bin IMAGE/default := append-kernel | pad-to $$$$(BLOCKSIZE) | append-rootfs | \ - pad-rootfs | check-size $$$$(IMAGE_SIZE) + pad-rootfs | check-size IMAGE/factory.bin := $$(IMAGE/default) | buffalo-enc WHR-G301N 1.99 | \ buffalo-tag WHR-G301N 3 IMAGE/tftp.bin := $$(IMAGE/default) | buffalo-tftp-header @@ -25,7 +25,7 @@ define Device/dlink_dir-615-e4 IMAGES += factory.bin IMAGE/default := append-kernel | append-rootfs | pad-rootfs IMAGE/sysupgrade.bin := $$(IMAGE/default) | append-metadata | \ - check-size $$$$(IMAGE_SIZE) + check-size IMAGE/factory.bin := $$(IMAGE/default) | \ check-size $$$$(FACTORY_IMAGE_SIZE) | pad-to $$$$(FACTORY_IMAGE_SIZE) | \ append-string "AP99-AR7240-RT-091105-05" diff --git a/target/linux/ipq40xx/image/Makefile b/target/linux/ipq40xx/image/Makefile index 1cd7650881..4bbdda5d8a 100644 --- a/target/linux/ipq40xx/image/Makefile +++ b/target/linux/ipq40xx/image/Makefile @@ -95,7 +95,7 @@ define Device/8dev_habanero-dvk SOC := qcom-ipq4019 DEVICE_PACKAGES := ipq-wifi-8dev_habanero-dvk IMAGES := sysupgrade.bin - IMAGE/sysupgrade.bin := append-kernel | pad-to 64k | append-rootfs | pad-rootfs | append-metadata | check-size $$$$(IMAGE_SIZE) + IMAGE/sysupgrade.bin := append-kernel | pad-to 64k | append-rootfs | pad-rootfs | append-metadata | check-size endef TARGET_DEVICES += 8dev_habanero-dvk @@ -287,8 +287,8 @@ define Device/dlink_dap-2610 # the sysupgrade image only the kernel is included in the wrgg checksum, # but this is not flashable from the D-link http server. # append-rootfs must start on an erase block boundary. - IMAGE/factory.bin := append-kernel | pad-offset 6144k 160 | append-rootfs | wrgg-image | check-size $$$$(IMAGE_SIZE) - IMAGE/sysupgrade.bin := append-kernel | wrgg-image | pad-to $$$$(BLOCKSIZE) | append-rootfs | pad-rootfs | check-size $$$$(IMAGE_SIZE) | append-metadata + IMAGE/factory.bin := append-kernel | pad-offset 6144k 160 | append-rootfs | wrgg-image | check-size + IMAGE/sysupgrade.bin := append-kernel | wrgg-image | pad-to $$$$(BLOCKSIZE) | append-rootfs | pad-rootfs | check-size | append-metadata DEVICE_PACKAGES := ipq-wifi-dlink_dap2610 endef TARGET_DEVICES += dlink_dap-2610 @@ -328,7 +328,7 @@ define Device/engenius_emd1 IMAGE_SIZE := 30720k IMAGES := sysupgrade.bin factory.bin IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | append-metadata - IMAGE/factory.bin := qsdk-ipq-factory-nor | check-size $$$$(IMAGE_SIZE) + IMAGE/factory.bin := qsdk-ipq-factory-nor | check-size endef TARGET_DEVICES += engenius_emd1 @@ -352,9 +352,9 @@ define Device/engenius_ens620ext KERNEL_SIZE := 5120k FILESYSTEMS := squashfs IMAGES := sysupgrade.bin factory_30.bin factory_35.bin - IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | check-size $$$$(IMAGE_SIZE) | append-metadata - IMAGE/factory_30.bin := append-kernel | pad-to $$$$(KERNEL_SIZE) | append-rootfs | pad-rootfs | check-size $$$$(IMAGE_SIZE) | SenaoFW $$$$(PRODUCT_ID) $$$$(FW_VER) - IMAGE/factory_35.bin := qsdk-ipq-factory-nor | check-size $$$$(IMAGE_SIZE) | SenaoFW $$$$(PRODUCT_ID_NEW) $$$$(FW_VER_NEW) + IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | check-size | append-metadata + IMAGE/factory_30.bin := append-kernel | pad-to $$$$(KERNEL_SIZE) | append-rootfs | pad-rootfs | check-size | SenaoFW $$$$(PRODUCT_ID) $$$$(FW_VER) + IMAGE/factory_35.bin := qsdk-ipq-factory-nor | check-size | SenaoFW $$$$(PRODUCT_ID_NEW) $$$$(FW_VER_NEW) endef TARGET_DEVICES += engenius_ens620ext diff --git a/target/linux/kirkwood/image/Makefile b/target/linux/kirkwood/image/Makefile index 67dd53af70..865122ae19 100644 --- a/target/linux/kirkwood/image/Makefile +++ b/target/linux/kirkwood/image/Makefile @@ -75,7 +75,7 @@ define Device/iom_ix2-200 UBINIZE_OPTS := -E 5 IMAGE_SIZE := 31744k IMAGE/factory.bin := append-kernel | pad-to $$$$(KERNEL_SIZE) | append-ubi | \ - check-size $$$$(IMAGE_SIZE) + check-size endef TARGET_DEVICES += iom_ix2-200 diff --git a/target/linux/lantiq/image/Makefile b/target/linux/lantiq/image/Makefile index 87a4110f7e..b169d93859 100644 --- a/target/linux/lantiq/image/Makefile +++ b/target/linux/lantiq/image/Makefile @@ -67,7 +67,7 @@ define Device/Default DEVICE_DTS = $$(SOC)_$(1) SUPPORTED_DEVICES := $(subst _,$(comma),$(1)) IMAGES := sysupgrade.bin - IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | append-metadata | check-size $$$$(IMAGE_SIZE) + IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | append-metadata | check-size endef define Device/NAND/xway @@ -92,13 +92,13 @@ endef define Device/lantiqBrnImage KERNEL := kernel-bin | append-dtb | mkbrncmdline | lzma-no-dict IMAGES := factory.bin - IMAGE/factory.bin := mkbrnimg | check-size $$$$(IMAGE_SIZE) + IMAGE/factory.bin := mkbrnimg | check-size endef define Device/lantiqFullImage KERNEL := kernel-bin | append-dtb | lzma | uImage lzma | pad-offset 4 0 IMAGES := sysupgrade.bin fullimage.bin - IMAGE/fullimage.bin := fullimage | check-size $$$$(IMAGE_SIZE) + IMAGE/fullimage.bin := fullimage | check-size endef define Device/AVM @@ -106,7 +106,7 @@ define Device/AVM KERNEL := kernel-bin | append-dtb | lzma | eva-image KERNEL_INITRAMFS := $$(KERNEL) IMAGE/sysupgrade.bin := append-kernel | pad-to 64k | append-avm-fakeroot | \ - append-rootfs | pad-rootfs | append-metadata | check-size $$$$(IMAGE_SIZE) + append-rootfs | pad-rootfs | append-metadata | check-size endef ifeq ($(SUBTARGET),ase) diff --git a/target/linux/lantiq/image/ar9.mk b/target/linux/lantiq/image/ar9.mk index 73e2ab89b2..7a8f05ea58 100644 --- a/target/linux/lantiq/image/ar9.mk +++ b/target/linux/lantiq/image/ar9.mk @@ -89,10 +89,10 @@ define Device/netgear_dgn3500 factory-na.img factory.img IMAGE/sysupgrade-na.bin := \ append-kernel | append-rootfs | dgn3500-sercom-footer 0x0 "NA" | \ - pad-rootfs | append-metadata | check-size $$$$(IMAGE_SIZE) + pad-rootfs | append-metadata | check-size IMAGE/sysupgrade.bin := \ append-kernel | append-rootfs | dgn3500-sercom-footer 0x0 "WW" | \ - pad-rootfs | append-metadata | check-size $$$$(IMAGE_SIZE) + pad-rootfs | append-metadata | check-size IMAGE/factory-na.img := \ pad-extra $(DGN3500_KERNEL_OFFSET_DEC) | append-kernel | append-rootfs | \ dgn3500-sercom-footer $(DGN3500_KERNEL_OFFSET_HEX) "NA" | pad-rootfs | \ @@ -119,7 +119,7 @@ define Device/netgear_dgn3500b IMAGES += factory.img IMAGE/sysupgrade.bin := \ append-kernel | append-rootfs | dgn3500-sercom-footer 0x0 "DE" | \ - pad-rootfs | append-metadata | check-size $$$$(IMAGE_SIZE) + pad-rootfs | append-metadata | check-size IMAGE/factory.img := \ pad-extra $(DGN3500_KERNEL_OFFSET_DEC) | append-kernel | append-rootfs | \ dgn3500-sercom-footer $(DGN3500_KERNEL_OFFSET_HEX) "DE" | pad-rootfs | \ diff --git a/target/linux/lantiq/image/tp-link.mk b/target/linux/lantiq/image/tp-link.mk index acbc32b46a..2f9fa7b97f 100644 --- a/target/linux/lantiq/image/tp-link.mk +++ b/target/linux/lantiq/image/tp-link.mk @@ -9,7 +9,7 @@ define Device/lantiqTpLink tplink-v2-header -s -V "ver. 1.0" IMAGES := sysupgrade.bin IMAGE/sysupgrade.bin := tplink-v2-image -s -V "ver. 1.0" | \ - append-metadata | check-size $$$$(IMAGE_SIZE) + append-metadata | check-size endef define Device/tplink_tdw8970 diff --git a/target/linux/lantiq/image/vr9.mk b/target/linux/lantiq/image/vr9.mk index 2bea40011d..167c57c7c4 100644 --- a/target/linux/lantiq/image/vr9.mk +++ b/target/linux/lantiq/image/vr9.mk @@ -195,7 +195,7 @@ define Device/netgear_dm200 IMAGE/sysupgrade.bin := append-kernel | \ pad-offset 64k 64 | append-uImage-fakehdr filesystem | \ pad-offset 64k 64 | append-uImage-fakehdr filesystem | \ - append-rootfs | pad-rootfs | append-metadata | check-size $$$$(IMAGE_SIZE) + append-rootfs | pad-rootfs | append-metadata | check-size IMAGE/factory.img := $$(IMAGE/sysupgrade.bin) | netgear-dni IMAGE_SIZE := 7872k NETGEAR_BOARD_ID := DM200 diff --git a/target/linux/ramips/image/Makefile b/target/linux/ramips/image/Makefile index e34bf37210..7c1f7c6c0b 100644 --- a/target/linux/ramips/image/Makefile +++ b/target/linux/ramips/image/Makefile @@ -29,7 +29,7 @@ define Device/Default IMAGES := sysupgrade.bin SUPPORTED_DEVICES := $(subst _,$(comma),$(1)) sysupgrade_bin := append-kernel | append-rootfs | pad-rootfs - IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | append-metadata | check-size $$$$(IMAGE_SIZE) + IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | append-metadata | check-size endef define Device/seama @@ -41,9 +41,9 @@ define Device/seama # - 36 bytes of META data (4-bytes aligned) IMAGE/default := append-kernel | pad-offset $$$$(BLOCKSIZE) 64 | append-rootfs IMAGE/sysupgrade.bin := \ - $$(IMAGE/default) | seama | pad-rootfs | append-metadata | check-size $$$$(IMAGE_SIZE) + $$(IMAGE/default) | seama | pad-rootfs | append-metadata | check-size IMAGE/factory.bin := \ - $$(IMAGE/default) | pad-rootfs -x 64 | seama | seama-seal | check-size $$$$(IMAGE_SIZE) + $$(IMAGE/default) | pad-rootfs -x 64 | seama | seama-seal | check-size SEAMA_SIGNATURE := endef diff --git a/target/linux/ramips/image/common-tp-link.mk b/target/linux/ramips/image/common-tp-link.mk index 587ef89fc1..07ad1ea250 100644 --- a/target/linux/ramips/image/common-tp-link.mk +++ b/target/linux/ramips/image/common-tp-link.mk @@ -12,7 +12,7 @@ define Device/tplink-v1 IMAGES += factory.bin IMAGE/factory.bin := tplink-v1-image factory -e -O IMAGE/sysupgrade.bin := tplink-v1-image sysupgrade -e -O | append-metadata | \ - check-size $$$$(IMAGE_SIZE) + check-size endef define Device/tplink-v2 @@ -27,7 +27,7 @@ define Device/tplink-v2 IMAGES += factory.bin IMAGE/factory.bin := tplink-v2-image -e IMAGE/sysupgrade.bin := tplink-v2-image -s -e | append-metadata | \ - check-size $$$$(IMAGE_SIZE) + check-size endef define Device/tplink-safeloader @@ -39,6 +39,6 @@ define Device/tplink-safeloader KERNEL := $(KERNEL_DTB) | tplink-v1-header -e -O IMAGES += factory.bin IMAGE/sysupgrade.bin := append-rootfs | tplink-safeloader sysupgrade | \ - append-metadata | check-size $$$$(IMAGE_SIZE) + append-metadata | check-size IMAGE/factory.bin := append-rootfs | tplink-safeloader factory endef diff --git a/target/linux/ramips/image/mt7620.mk b/target/linux/ramips/image/mt7620.mk index 339cd150e0..552879e02f 100644 --- a/target/linux/ramips/image/mt7620.mk +++ b/target/linux/ramips/image/mt7620.mk @@ -298,7 +298,7 @@ define Device/edimax_br-6478ac-v2 IMAGE_SIZE := 7744k IMAGE/sysupgrade.bin := append-kernel | append-rootfs | \ edimax-header -s CSYS -m RN68 -f 0x70000 -S 0x01100000 | pad-rootfs | \ - append-metadata | check-size $$$$(IMAGE_SIZE) + append-metadata | check-size DEVICE_PACKAGES := kmod-mt76x2 kmod-usb2 kmod-usb-ohci \ kmod-usb-ledtrig-usbport endef @@ -312,7 +312,7 @@ define Device/edimax_ew-7476rpc IMAGE_SIZE := 7744k IMAGE/sysupgrade.bin := append-kernel | append-rootfs | \ edimax-header -s CSYS -m RN79 -f 0x70000 -S 0x01100000 | pad-rootfs | \ - append-metadata | check-size $$$$(IMAGE_SIZE) + append-metadata | check-size DEVICE_PACKAGES := kmod-mt76x2 kmod-phy-realtek endef TARGET_DEVICES += edimax_ew-7476rpc @@ -325,7 +325,7 @@ define Device/edimax_ew-7478ac IMAGE_SIZE := 7744k IMAGE/sysupgrade.bin := append-kernel | append-rootfs | \ edimax-header -s CSYS -m RN70 -f 0x70000 -S 0x01100000 | pad-rootfs | \ - append-metadata | check-size $$$$(IMAGE_SIZE) + append-metadata | check-size DEVICE_PACKAGES := kmod-mt76x2 kmod-phy-realtek endef TARGET_DEVICES += edimax_ew-7478ac @@ -338,7 +338,7 @@ define Device/edimax_ew-7478apc IMAGE_SIZE := 7744k IMAGE/sysupgrade.bin := append-kernel | append-rootfs | \ edimax-header -s CSYS -m RN75 -f 0x70000 -S 0x01100000 | pad-rootfs | \ - append-metadata | check-size $$$$(IMAGE_SIZE) + append-metadata | check-size DEVICE_PACKAGES := kmod-mt76x2 kmod-usb2 kmod-usb-ohci \ kmod-usb-ledtrig-usbport endef @@ -348,7 +348,7 @@ define Device/elecom_wrh-300cr SOC := mt7620n IMAGE_SIZE := 14272k IMAGES += factory.bin - IMAGE/factory.bin := $$(sysupgrade_bin) | check-size $$$$(IMAGE_SIZE) | \ + IMAGE/factory.bin := $$(sysupgrade_bin) | check-size | \ elecom-header DEVICE_VENDOR := Elecom DEVICE_MODEL := WRH-300CR @@ -362,7 +362,7 @@ define Device/engenius_esr600 BLOCKSIZE := 64k IMAGE_SIZE := 15616k IMAGES += factory.dlf - IMAGE/factory.dlf := $$(sysupgrade_bin) | check-size $$$$(IMAGE_SIZE) | \ + IMAGE/factory.dlf := $$(sysupgrade_bin) | check-size | \ senao-header -r 0x101 -p 0x57 -t 2 DEVICE_VENDOR := EnGenius DEVICE_MODEL := ESR600 @@ -379,7 +379,7 @@ define Device/fon_fon2601 DEVICE_PACKAGES := kmod-mt76x2 kmod-usb2 kmod-usb-ohci KERNEL_INITRAMFS := $$(KERNEL) | fonfxcimage IMAGE/sysupgrade.bin := append-kernel | append-rootfs | fonfxcimage | \ - pad-rootfs | append-metadata | check-size $$$$(IMAGE_SIZE) + pad-rootfs | append-metadata | check-size endef TARGET_DEVICES += fon_fon2601 @@ -471,7 +471,7 @@ define Device/iodata_wn-ac1167gr DEVICE_MODEL := WN-AC1167GR IMAGE_SIZE := 6864k IMAGES += factory.bin - IMAGE/factory.bin := $$(sysupgrade_bin) | check-size $$$$(IMAGE_SIZE) | \ + IMAGE/factory.bin := $$(sysupgrade_bin) | check-size | \ elx-header 01040016 8844A2D168B45A2D DEVICE_PACKAGES := kmod-mt76x2 endef @@ -483,7 +483,7 @@ define Device/iodata_wn-ac733gr3 DEVICE_MODEL := WN-AC733GR3 IMAGE_SIZE := 6992k IMAGES += factory.bin - IMAGE/factory.bin := $$(sysupgrade_bin) | check-size $$$$(IMAGE_SIZE) | \ + IMAGE/factory.bin := $$(sysupgrade_bin) | check-size | \ elx-header 01040006 8844A2D168B45A2D DEVICE_PACKAGES := kmod-mt76x0e kmod-switch-rtl8367b endef @@ -579,7 +579,7 @@ define Device/linksys_e1700 SOC := mt7620a IMAGE_SIZE := 7872k IMAGES += factory.bin - IMAGE/factory.bin := $$(sysupgrade_bin) | check-size $$$$(IMAGE_SIZE) | \ + IMAGE/factory.bin := $$(sysupgrade_bin) | check-size | \ umedia-header 0x013326 DEVICE_VENDOR := Linksys DEVICE_MODEL := E1700 @@ -606,7 +606,7 @@ define Device/netgear_ex2700 IMAGES += factory.bin KERNEL := $(KERNEL_DTB) | uImage lzma | pad-offset 64k 64 | \ append-uImage-fakehdr filesystem - IMAGE/factory.bin := $$(sysupgrade_bin) | check-size $$$$(IMAGE_SIZE) | \ + IMAGE/factory.bin := $$(sysupgrade_bin) | check-size | \ netgear-dni DEVICE_VENDOR := NETGEAR DEVICE_MODEL := EX2700 @@ -621,7 +621,7 @@ define Device/netgear_ex3700 BLOCKSIZE := 4k IMAGE_SIZE := 7744k IMAGES += factory.chk - IMAGE/factory.chk := $$(sysupgrade_bin) | check-size $$$$(IMAGE_SIZE) | \ + IMAGE/factory.chk := $$(sysupgrade_bin) | check-size | \ netgear-chk DEVICE_PACKAGES := kmod-mt76x2 DEVICE_VENDOR := NETGEAR @@ -636,7 +636,7 @@ define Device/netgear_ex6130 BLOCKSIZE := 4k IMAGE_SIZE := 7744k IMAGES += factory.chk - IMAGE/factory.chk := $$(sysupgrade_bin) | check-size $$$$(IMAGE_SIZE) | \ + IMAGE/factory.chk := $$(sysupgrade_bin) | check-size | \ netgear-chk DEVICE_PACKAGES := kmod-mt76x2 DEVICE_VENDOR := NETGEAR @@ -653,7 +653,7 @@ define Device/netgear_wn3000rp-v3 IMAGES += factory.bin KERNEL := $(KERNEL_DTB) | uImage lzma | pad-offset 64k 64 | \ append-uImage-fakehdr filesystem - IMAGE/factory.bin := $$(sysupgrade_bin) | check-size $$$$(IMAGE_SIZE) | \ + IMAGE/factory.bin := $$(sysupgrade_bin) | check-size | \ netgear-dni DEVICE_VENDOR := NETGEAR DEVICE_MODEL := WN3000RP @@ -667,7 +667,7 @@ define Device/nexx_wt3020-4m BLOCKSIZE := 4k IMAGE_SIZE := 3776k IMAGES += factory.bin - IMAGE/factory.bin := $$(sysupgrade_bin) | check-size $$$$(IMAGE_SIZE) | \ + IMAGE/factory.bin := $$(sysupgrade_bin) | check-size | \ poray-header -B WT3020 -F 4M DEVICE_VENDOR := Nexx DEVICE_MODEL := WT3020 @@ -680,7 +680,7 @@ define Device/nexx_wt3020-8m SOC := mt7620n IMAGE_SIZE := 7872k IMAGES += factory.bin - IMAGE/factory.bin := $$(sysupgrade_bin) | check-size $$$$(IMAGE_SIZE) | \ + IMAGE/factory.bin := $$(sysupgrade_bin) | check-size | \ poray-header -B WT3020 -F 8M DEVICE_VENDOR := Nexx DEVICE_MODEL := WT3020 @@ -1126,7 +1126,7 @@ define Device/zyxel_keenetic-omni DEVICE_PACKAGES := kmod-usb2 kmod-usb-ohci kmod-usb-ledtrig-usbport IMAGES += factory.bin IMAGE/factory.bin := $$(sysupgrade_bin) | pad-to 64k | \ - check-size $$$$(IMAGE_SIZE) | zyimage -d 4882 -v "ZyXEL Keenetic Omni" + check-size | zyimage -d 4882 -v "ZyXEL Keenetic Omni" SUPPORTED_DEVICES += kn_rc endef TARGET_DEVICES += zyxel_keenetic-omni @@ -1139,7 +1139,7 @@ define Device/zyxel_keenetic-omni-ii DEVICE_PACKAGES := kmod-usb2 kmod-usb-ohci kmod-usb-ledtrig-usbport IMAGES += factory.bin IMAGE/factory.bin := $$(sysupgrade_bin) | pad-to 64k | \ - check-size $$$$(IMAGE_SIZE) | \ + check-size | \ zyimage -d 2102034 -v "ZyXEL Keenetic Omni II" SUPPORTED_DEVICES += kn_rf endef @@ -1154,7 +1154,7 @@ define Device/zyxel_keenetic-viva kmod-switch-rtl8366-smi kmod-switch-rtl8367b IMAGES += factory.bin IMAGE/factory.bin := $$(sysupgrade_bin) | pad-to 64k | \ - check-size $$$$(IMAGE_SIZE) | zyimage -d 8997 -v "ZyXEL Keenetic Viva" + check-size | zyimage -d 8997 -v "ZyXEL Keenetic Viva" SUPPORTED_DEVICES += kng_rc endef TARGET_DEVICES += zyxel_keenetic-viva diff --git a/target/linux/ramips/image/mt7621.mk b/target/linux/ramips/image/mt7621.mk index e9572a70fc..b2590c5759 100644 --- a/target/linux/ramips/image/mt7621.mk +++ b/target/linux/ramips/image/mt7621.mk @@ -165,7 +165,7 @@ define Device/asus_rt-ac65p 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) + check-size DEVICE_PACKAGES := kmod-usb3 kmod-mt7615e wpad-basic uboot-envtools endef TARGET_DEVICES += asus_rt-ac65p @@ -181,7 +181,7 @@ define Device/asus_rt-ac85p 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) + check-size DEVICE_PACKAGES := kmod-usb3 kmod-mt7615e wpad-basic uboot-envtools endef TARGET_DEVICES += asus_rt-ac85p @@ -245,7 +245,7 @@ define Device/edimax_ra21s DEVICE_ALT0_VENDOR := Edimax DEVICE_ALT0_MODEL := Gemini RA21S IMAGES += factory.bin - IMAGE/factory.bin := $$(sysupgrade_bin) | check-size $$$$(IMAGE_SIZE) | \ + IMAGE/factory.bin := $$(sysupgrade_bin) | check-size | \ elx-header 02020040 8844A2D168B45A2D DEVICE_PACKAGES := kmod-mt7615e wpad-basic endef @@ -256,7 +256,7 @@ define Device/edimax_rg21s DEVICE_VENDOR := Edimax DEVICE_MODEL := Gemini AC2600 RG21S IMAGES += factory.bin - IMAGE/factory.bin := $$(sysupgrade_bin) | check-size $$$$(IMAGE_SIZE) | \ + IMAGE/factory.bin := $$(sysupgrade_bin) | check-size | \ elx-header 02020038 8844A2D168B45A2D DEVICE_PACKAGES := kmod-mt7615e wpad-basic endef @@ -267,7 +267,7 @@ define Device/elecom_wrc-1167ghbk2-s DEVICE_VENDOR := ELECOM DEVICE_MODEL := WRC-1167GHBK2-S IMAGES += factory.bin - IMAGE/factory.bin := $$(sysupgrade_bin) | check-size $$$$(IMAGE_SIZE) | \ + IMAGE/factory.bin := $$(sysupgrade_bin) | check-size | \ elecom-wrc-factory WRC-1167GHBK2-S 0.00 DEVICE_PACKAGES := kmod-mt7615e wpad-basic endef @@ -278,7 +278,7 @@ define Device/elecom_wrc-1900gst DEVICE_VENDOR := ELECOM DEVICE_MODEL := WRC-1900GST IMAGES += factory.bin - IMAGE/factory.bin := $$(sysupgrade_bin) | check-size $$$$(IMAGE_SIZE) | \ + IMAGE/factory.bin := $$(sysupgrade_bin) | check-size | \ elecom-gst-factory WRC-1900GST 0.00 endef TARGET_DEVICES += elecom_wrc-1900gst @@ -288,7 +288,7 @@ define Device/elecom_wrc-2533gst DEVICE_VENDOR := ELECOM DEVICE_MODEL := WRC-2533GST IMAGES += factory.bin - IMAGE/factory.bin := $$(sysupgrade_bin) | check-size $$$$(IMAGE_SIZE) | \ + IMAGE/factory.bin := $$(sysupgrade_bin) | check-size | \ elecom-gst-factory WRC-2533GST 0.00 endef TARGET_DEVICES += elecom_wrc-2533gst @@ -337,7 +337,7 @@ define Device/hiwifi_hc5962 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) + check-size DEVICE_VENDOR := HiWiFi DEVICE_MODEL := HC5962 DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 kmod-usb3 wpad-basic @@ -402,7 +402,7 @@ define Device/iodata_wnpr2600g DEVICE_MODEL := WNPR2600G IMAGE_SIZE := 13952k IMAGES += factory.bin - IMAGE/factory.bin := $$(sysupgrade_bin) | check-size $$$$(IMAGE_SIZE) | \ + IMAGE/factory.bin := $$(sysupgrade_bin) | check-size | \ elx-header 0104003a 8844A2D168B45A2D DEVICE_PACKAGES := kmod-mt7615e wpad-basic endef @@ -429,7 +429,7 @@ TARGET_DEVICES += iptime_a8004t define Device/jcg_jhr-ac876m IMAGE_SIZE := 16064k IMAGES += factory.bin - IMAGE/factory.bin := $$(sysupgrade_bin) | check-size $$$$(IMAGE_SIZE) | \ + IMAGE/factory.bin := $$(sysupgrade_bin) | check-size | \ jcg-header 89.1 JCG_MAXSIZE := 16064k DEVICE_VENDOR := JCG @@ -484,7 +484,7 @@ define Device/MikroTik KERNEL := $(KERNEL_DTB) | loader-kernel IMAGE/sysupgrade.bin := append-kernel | kernel2minor -s 1024 | \ pad-to $$$$(BLOCKSIZE) | append-rootfs | pad-rootfs | append-metadata | \ - check-size $$$$(IMAGE_SIZE) + check-size endef define Device/mikrotik_rb750gr3 @@ -534,7 +534,7 @@ define Device/netgear_ex6150 NETGEAR_BOARD_ID := U12H318T00_NETGEAR IMAGE_SIZE := 14848k IMAGES += factory.chk - IMAGE/factory.chk := $$(sysupgrade_bin) | check-size $$$$(IMAGE_SIZE) | \ + IMAGE/factory.chk := $$(sysupgrade_bin) | check-size | \ netgear-chk endef TARGET_DEVICES += netgear_ex6150 @@ -550,7 +550,7 @@ define Device/netgear_sercomm_nand zip $$$$(SERCOMM_HWNAME).bin | sercom-seal IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata IMAGE/kernel.bin := append-kernel - IMAGE/rootfs.bin := append-ubi | check-size $$$$(IMAGE_SIZE) + IMAGE/rootfs.bin := append-ubi | check-size DEVICE_VENDOR := NETGEAR DEVICE_PACKAGES := kmod-mt7603 kmod-usb3 kmod-usb-ledtrig-usbport wpad-basic endef @@ -642,7 +642,7 @@ define Device/netgear_wndr3700-v5 IMAGE/default := append-kernel | pad-to $$$$(BLOCKSIZE) | append-rootfs | \ pad-rootfs IMAGE/sysupgrade.bin := $$(IMAGE/default) | append-metadata | \ - check-size $$$$(IMAGE_SIZE) + check-size IMAGE/factory.img := pad-extra 320k | $$(IMAGE/default) | \ pad-to $$$$(BLOCKSIZE) | sercom-footer | pad-to 128 | \ zip WNDR3700v5.bin | sercom-seal @@ -667,7 +667,7 @@ define Device/netis_wf2881 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) + check-size DEVICE_VENDOR := NETIS DEVICE_MODEL := WF2881 DEVICE_PACKAGES := kmod-mt76x2 kmod-usb3 kmod-usb-ledtrig-usbport wpad-basic @@ -849,7 +849,7 @@ define Device/xiaomi_mir3g UBINIZE_OPTS := -E 5 IMAGES += kernel1.bin rootfs0.bin IMAGE/kernel1.bin := append-kernel - IMAGE/rootfs0.bin := append-ubi | check-size $$$$(IMAGE_SIZE) + IMAGE/rootfs0.bin := append-ubi | check-size IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata DEVICE_VENDOR := Xiaomi DEVICE_MODEL := Mi Router 3G @@ -883,7 +883,7 @@ define Device/xiaomi_mir3p 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) + check-size DEVICE_PACKAGES := kmod-mt7615e kmod-usb3 kmod-usb-ledtrig-usbport \ wpad-basic uboot-envtools endef diff --git a/target/linux/ramips/image/mt76x8.mk b/target/linux/ramips/image/mt76x8.mk index 51f630f42a..e2890c98e6 100644 --- a/target/linux/ramips/image/mt76x8.mk +++ b/target/linux/ramips/image/mt76x8.mk @@ -34,7 +34,7 @@ TARGET_DEVICES += buffalo_wcr-1166ds define Device/cudy_wr1000 IMAGE_SIZE := 7872k IMAGES += factory.bin - IMAGE/factory.bin := $$(sysupgrade_bin) | check-size $$$$(IMAGE_SIZE) | \ + IMAGE/factory.bin := $$(sysupgrade_bin) | check-size | \ jcg-header 92.122 JCG_MAXSIZE := 7872k DEVICE_VENDOR := Cudy @@ -180,7 +180,7 @@ define Device/netgear_r6120 IMAGE/default := append-kernel | pad-to $$$$(BLOCKSIZE)| append-rootfs | \ pad-rootfs IMAGE/sysupgrade.bin := $$(IMAGE/default) | append-metadata | \ - check-size $$$$(IMAGE_SIZE) + check-size IMAGE/factory.img := pad-extra 576k | $$(IMAGE/default) | \ pad-to $$$$(BLOCKSIZE) | sercom-footer | pad-to 128 | zip R6120.bin | \ sercom-seal @@ -592,6 +592,6 @@ define Device/zyxel_keenetic-extra-ii kmod-usb-ledtrig-usbport IMAGES += factory.bin IMAGE/factory.bin := $$(sysupgrade_bin) | pad-to $$$$(BLOCKSIZE) | \ - check-size $$$$(IMAGE_SIZE) | zyimage -d 6162 -v "ZyXEL Keenetic Extra II" + check-size | zyimage -d 6162 -v "ZyXEL Keenetic Extra II" endef TARGET_DEVICES += zyxel_keenetic-extra-ii diff --git a/target/linux/ramips/image/rt288x.mk b/target/linux/ramips/image/rt288x.mk index 800dc553a2..720ff65741 100644 --- a/target/linux/ramips/image/rt288x.mk +++ b/target/linux/ramips/image/rt288x.mk @@ -18,7 +18,7 @@ define Device/airlink101_ar670w IMAGE_SIZE := 3840k KERNEL := $(KERNEL_DTB) | pad-to $$(BLOCKSIZE) IMAGES += factory.bin - IMAGE/factory.bin := $$(sysupgrade_bin) | check-size $$$$(IMAGE_SIZE) | \ + IMAGE/factory.bin := $$(sysupgrade_bin) | check-size | \ wrg-header wrgn16a_airlink_ar670w SUPPORTED_DEVICES += ar670w endef @@ -87,7 +87,7 @@ define Device/dlink_dap-1522-a1 IMAGES += factory.bin IMAGE/factory.bin := append-kernel | pad-offset $$$$(BLOCKSIZE) 96 | \ append-rootfs | pad-rootfs -x 96 | wrg-header wapnd01_dlink_dap1522 | \ - check-size $$$$(IMAGE_SIZE) + check-size endef TARGET_DEVICES += dlink_dap-1522-a1 diff --git a/target/linux/ramips/image/rt305x.mk b/target/linux/ramips/image/rt305x.mk index 155e86e3d3..33f94edf3f 100644 --- a/target/linux/ramips/image/rt305x.mk +++ b/target/linux/ramips/image/rt305x.mk @@ -301,7 +301,7 @@ define Device/buffalo_whr-g300n DEVICE_VENDOR := Buffalo DEVICE_MODEL := WHR-G300N IMAGES += tftp.bin - IMAGE/tftp.bin := $$(sysupgrade_bin) | check-size $$$$(IMAGE_SIZE) | \ + IMAGE/tftp.bin := $$(sysupgrade_bin) | check-size | \ buffalo-tftp-header SUPPORTED_DEVICES += whr-g300n endef @@ -311,9 +311,9 @@ define Device/dlink_dap-1350 SOC := rt3052 IMAGES += factory.bin factory-NA.bin IMAGE_SIZE := 7488k - IMAGE/factory.bin := $$(sysupgrade_bin) | check-size $$$$(IMAGE_SIZE) | \ + IMAGE/factory.bin := $$(sysupgrade_bin) | check-size | \ dap-header -s RT3052-AP-DAP1350WW-3 - IMAGE/factory-NA.bin := $$(sysupgrade_bin) | check-size $$$$(IMAGE_SIZE) | \ + IMAGE/factory-NA.bin := $$(sysupgrade_bin) | check-size | \ dap-header -s RT3052-AP-DAP1350-3 DEVICE_VENDOR := D-Link DEVICE_MODEL := DAP-1350 @@ -348,7 +348,7 @@ define Device/dlink_dir-300-b1 SOC := rt3050 IMAGE_SIZE := 3776k IMAGES += factory.bin - IMAGE/factory.bin := $$(sysupgrade_bin) | check-size $$$$(IMAGE_SIZE) | \ + IMAGE/factory.bin := $$(sysupgrade_bin) | check-size | \ wrg-header wrgn23_dlwbr_dir300b DEVICE_VENDOR := D-Link DEVICE_MODEL := DIR-300 @@ -382,7 +382,7 @@ define Device/dlink_dir-600-b1 SOC := rt3050 IMAGE_SIZE := 3776k IMAGES += factory.bin - IMAGE/factory.bin := $$(sysupgrade_bin) | check-size $$$$(IMAGE_SIZE) | \ + IMAGE/factory.bin := $$(sysupgrade_bin) | check-size | \ wrg-header wrgn23_dlwbr_dir600b DEVICE_VENDOR := D-Link DEVICE_MODEL := DIR-600 @@ -410,7 +410,7 @@ define Device/dlink_dir-615-d SOC := rt3050 IMAGE_SIZE := 3776k IMAGES += factory.bin - IMAGE/factory.bin := $$(sysupgrade_bin) | check-size $$$$(IMAGE_SIZE) | \ + IMAGE/factory.bin := $$(sysupgrade_bin) | check-size | \ wrg-header wrgn23_dlwbr_dir615d DEVICE_VENDOR := D-Link DEVICE_MODEL := DIR-615 @@ -486,7 +486,7 @@ define Device/edimax_3g-6200n IMAGE_SIZE := 3648k IMAGE/sysupgrade.bin := append-kernel | append-rootfs | \ edimax-header -s CSYS -m 3G62 -f 0x50000 -S 0x01100000 | pad-rootfs | \ - append-metadata | check-size $$$$(IMAGE_SIZE) + append-metadata | check-size DEVICE_VENDOR := Edimax DEVICE_MODEL := 3g-6200n SUPPORTED_DEVICES += 3g-6200n @@ -498,7 +498,7 @@ define Device/edimax_3g-6200nl IMAGE_SIZE := 3648k IMAGE/sysupgrade.bin := append-kernel | append-rootfs | \ edimax-header -s CSYS -m 3G62 -f 0x50000 -S 0x01100000 | pad-rootfs | \ - append-metadata | check-size $$$$(IMAGE_SIZE) + append-metadata | check-size DEVICE_VENDOR := Edimax DEVICE_MODEL := 3g-6200nl SUPPORTED_DEVICES += 3g-6200nl @@ -568,7 +568,7 @@ define Device/hilink_hlk-rm04 SOC := rt5350 IMAGE_SIZE := 3776k IMAGES += factory.bin - IMAGE/factory.bin := $$(sysupgrade_bin) | check-size $$$$(IMAGE_SIZE) | \ + IMAGE/factory.bin := $$(sysupgrade_bin) | check-size | \ hilink-header DEVICE_VENDOR := Hi-Link DEVICE_MODEL := HLK-RM04 @@ -621,7 +621,7 @@ define Device/jcg_jhr-n805r SOC := rt3050 IMAGE_SIZE := 3776k IMAGES += factory.bin - IMAGE/factory.bin := $$(sysupgrade_bin) | check-size $$$$(IMAGE_SIZE) | \ + IMAGE/factory.bin := $$(sysupgrade_bin) | check-size | \ jcg-header 29.24 DEVICE_VENDOR := JCG DEVICE_MODEL := JHR-N805R @@ -633,7 +633,7 @@ define Device/jcg_jhr-n825r SOC := rt3052 IMAGE_SIZE := 3776k IMAGES += factory.bin - IMAGE/factory.bin := $$(sysupgrade_bin) | check-size $$$$(IMAGE_SIZE) | \ + IMAGE/factory.bin := $$(sysupgrade_bin) | check-size | \ jcg-header 23.24 DEVICE_VENDOR := JCG DEVICE_MODEL := JHR-N825R @@ -645,7 +645,7 @@ define Device/jcg_jhr-n926r SOC := rt3052 IMAGE_SIZE := 3776k IMAGES += factory.bin - IMAGE/factory.bin := $$(sysupgrade_bin) | check-size $$$$(IMAGE_SIZE) | \ + IMAGE/factory.bin := $$(sysupgrade_bin) | check-size | \ jcg-header 25.24 DEVICE_VENDOR := JCG DEVICE_MODEL := JHR-N926R @@ -676,9 +676,9 @@ define Device/netgear_wnce2001 SOC := rt3052 IMAGE_SIZE := 3392k IMAGES += factory.bin factory-NA.bin - IMAGE/factory.bin := $$(sysupgrade_bin) | check-size $$$$(IMAGE_SIZE) | \ + IMAGE/factory.bin := $$(sysupgrade_bin) | check-size | \ dap-header -s RT3052-AP-WNCE2001-3 -r WW -v 1.0.0.99 - IMAGE/factory-NA.bin := $$(sysupgrade_bin) | check-size $$$$(IMAGE_SIZE) | \ + IMAGE/factory-NA.bin := $$(sysupgrade_bin) | check-size | \ dap-header -s RT3052-AP-WNCE2001-3 -r NA -v 1.0.0.99 DEVICE_VENDOR := NETGEAR DEVICE_MODEL := WNCE2001 @@ -699,7 +699,7 @@ define Device/nexx_wt1520-4m SOC := rt5350 IMAGE_SIZE := 3776k IMAGES += factory.bin - IMAGE/factory.bin := $$(sysupgrade_bin) | check-size $$$$(IMAGE_SIZE) | \ + IMAGE/factory.bin := $$(sysupgrade_bin) | check-size | \ poray-header -B WT1520 -F 4M DEVICE_VENDOR := Nexx DEVICE_MODEL := WT1520 @@ -712,7 +712,7 @@ define Device/nexx_wt1520-8m SOC := rt5350 IMAGE_SIZE := 7872k IMAGES += factory.bin - IMAGE/factory.bin := $$(sysupgrade_bin) | check-size $$$$(IMAGE_SIZE) | \ + IMAGE/factory.bin := $$(sysupgrade_bin) | check-size | \ poray-header -B WT1520 -F 8M DEVICE_VENDOR := Nexx DEVICE_MODEL := WT1520 @@ -840,7 +840,7 @@ define Device/poray_m3 SOC := rt5350 IMAGE_SIZE := 3776k IMAGES += factory.bin - IMAGE/factory.bin := $$(sysupgrade_bin) | check-size $$$$(IMAGE_SIZE) | \ + IMAGE/factory.bin := $$(sysupgrade_bin) | check-size | \ poray-header -B M3 -F 4M DEVICE_VENDOR := Poray DEVICE_MODEL := M3 @@ -853,7 +853,7 @@ define Device/poray_m4-4m SOC := rt5350 IMAGE_SIZE := 3776k IMAGES += factory.bin - IMAGE/factory.bin := $$(sysupgrade_bin) | check-size $$$$(IMAGE_SIZE) | \ + IMAGE/factory.bin := $$(sysupgrade_bin) | check-size | \ poray-header -B M4 -F 4M DEVICE_VENDOR := Poray DEVICE_MODEL := M4 @@ -867,7 +867,7 @@ define Device/poray_m4-8m SOC := rt5350 IMAGE_SIZE := 7872k IMAGES += factory.bin - IMAGE/factory.bin := $$(sysupgrade_bin) | check-size $$$$(IMAGE_SIZE) | \ + IMAGE/factory.bin := $$(sysupgrade_bin) | check-size | \ poray-header -B M4 -F 8M DEVICE_VENDOR := Poray DEVICE_MODEL := M4 @@ -881,7 +881,7 @@ define Device/poray_x5 SOC := rt5350 IMAGE_SIZE := 7872k IMAGES += factory.bin - IMAGE/factory.bin := $$(sysupgrade_bin) | check-size $$$$(IMAGE_SIZE) | \ + IMAGE/factory.bin := $$(sysupgrade_bin) | check-size | \ poray-header -B X5 -F 8M DEVICE_VENDOR := Poray DEVICE_MODEL := X5/X6 @@ -894,7 +894,7 @@ define Device/poray_x8 SOC := rt5350 IMAGE_SIZE := 7872k IMAGES += factory.bin - IMAGE/factory.bin := $$(sysupgrade_bin) | check-size $$$$(IMAGE_SIZE) | \ + IMAGE/factory.bin := $$(sysupgrade_bin) | check-size | \ poray-header -B X8 -F 8M DEVICE_VENDOR := Poray DEVICE_MODEL := X8 @@ -1013,7 +1013,7 @@ define Device/trendnet_tew-638apb-v2 BLOCKSIZE := 64k IMAGE_SIZE := 3776k IMAGE/sysupgrade.bin := $$(sysupgrade_bin) | umedia-header 0x026382 | \ - append-metadata | check-size $$$$(IMAGE_SIZE) + append-metadata | check-size DEVICE_VENDOR := TRENDnet DEVICE_MODEL := TEW-638APB DEVICE_VARIANT := v2 @@ -1034,7 +1034,7 @@ define Device/unbranded_a5-v11 SOC := rt5350 IMAGE_SIZE := 3776k IMAGES += factory.bin - IMAGE/factory.bin := $$(sysupgrade_bin) | check-size $$$$(IMAGE_SIZE) | \ + IMAGE/factory.bin := $$(sysupgrade_bin) | check-size | \ poray-header -B A5-V11 -F 4M DEVICE_VENDOR := DEVICE_MODEL := A5-V11 diff --git a/target/linux/ramips/image/rt3883.mk b/target/linux/ramips/image/rt3883.mk index ca6a713c4d..c8757bb386 100644 --- a/target/linux/ramips/image/rt3883.mk +++ b/target/linux/ramips/image/rt3883.mk @@ -51,7 +51,7 @@ define Device/edimax_br-6475nd IMAGE_SIZE := 7744k IMAGE/sysupgrade.bin := append-kernel | append-rootfs | \ edimax-header -s CSYS -m RN54 -f 0x70000 -S 0x01100000 | pad-rootfs | \ - append-metadata | check-size $$$$(IMAGE_SIZE) + append-metadata | check-size DEVICE_VENDOR := Edimax DEVICE_MODEL := BR-6475nD DEVICE_PACKAGES := swconfig @@ -99,7 +99,7 @@ define Device/sitecom_wlr-6000 BLOCKSIZE := 4k IMAGE_SIZE := 7244k IMAGES += factory.dlf - IMAGE/factory.dlf := $$(sysupgrade_bin) | check-size $$$$(IMAGE_SIZE) | \ + IMAGE/factory.dlf := $$(sysupgrade_bin) | check-size | \ senao-header -r 0x0202 -p 0x41 -t 2 DEVICE_VENDOR := Sitecom DEVICE_MODEL := WLR-6000 @@ -113,7 +113,7 @@ define Device/trendnet_tew-691gr BLOCKSIZE := 64k IMAGE_SIZE := 7872k IMAGES += factory.bin - IMAGE/factory.bin := $$(sysupgrade_bin) | check-size $$$$(IMAGE_SIZE) | \ + IMAGE/factory.bin := $$(sysupgrade_bin) | check-size | \ umedia-header 0x026910 DEVICE_VENDOR := TRENDnet DEVICE_MODEL := TEW-691GR @@ -127,7 +127,7 @@ define Device/trendnet_tew-692gr BLOCKSIZE := 64k IMAGE_SIZE := 7872k IMAGES += factory.bin - IMAGE/factory.bin := $$(sysupgrade_bin) | check-size $$$$(IMAGE_SIZE) | \ + IMAGE/factory.bin := $$(sysupgrade_bin) | check-size | \ umedia-header 0x026920 DEVICE_VENDOR := TRENDnet DEVICE_MODEL := TEW-692GR From 547f1ec25af59f9e69ae3cb69d1312e63138d4bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= Date: Thu, 20 Feb 2020 13:40:54 +0100 Subject: [PATCH 05/12] busybox: enable truncate on bcm53xx target MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It's needed for optimized sysupgrade. On host machine this change increased busybox size by 4096 B. Signed-off-by: Rafał Miłecki --- package/utils/busybox/Config-defaults.in | 1 + 1 file changed, 1 insertion(+) diff --git a/package/utils/busybox/Config-defaults.in b/package/utils/busybox/Config-defaults.in index c0aaecbb30..91c9b9b5b9 100644 --- a/package/utils/busybox/Config-defaults.in +++ b/package/utils/busybox/Config-defaults.in @@ -846,6 +846,7 @@ config BUSYBOX_DEFAULT_TRUE default y config BUSYBOX_DEFAULT_TRUNCATE bool + default y if TARGET_bcm53xx default n config BUSYBOX_DEFAULT_TTY bool From 8abefc8896e7138a101fbb3d228946c43321503e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= Date: Thu, 20 Feb 2020 13:40:55 +0100 Subject: [PATCH 06/12] bcm53xx: sysupgrade: optimize building UBI image MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Use "truncate" to adjust size of existing file instead of "dd" which required creating a copy. This saves space on tmpfs. It may be as low as 2.1 MiB when using OpenWrt default user space and way more (20+ MiB) when flashing vendor firmware. Signed-off-by: Rafał Miłecki --- target/linux/bcm53xx/base-files/lib/upgrade/platform.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/target/linux/bcm53xx/base-files/lib/upgrade/platform.sh b/target/linux/bcm53xx/base-files/lib/upgrade/platform.sh index 1686462cde..40b2ef67be 100644 --- a/target/linux/bcm53xx/base-files/lib/upgrade/platform.sh +++ b/target/linux/bcm53xx/base-files/lib/upgrade/platform.sh @@ -1,4 +1,4 @@ -RAMFS_COPY_BIN='osafeloader oseama otrx' +RAMFS_COPY_BIN='osafeloader oseama otrx truncate' PART_NAME=firmware @@ -281,7 +281,7 @@ platform_do_upgrade_nand_trx() { while [ "$(dd if=$dir/root skip=$ubi_length bs=1 count=4 2>/dev/null)" = "UBI#" ]; do ubi_length=$(($ubi_length + 131072)) done - dd if=$dir/root of=/tmp/root.ubi bs=131072 count=$((ubi_length / 131072)) 2>/dev/null + truncate -s $ubi_length $dir/root [ $? -ne 0 ] && { echo "Failed to prepare new UBI image." return @@ -289,7 +289,7 @@ platform_do_upgrade_nand_trx() { # Flash mtd write /tmp/kernel.trx firmware || exit 1 - nand_do_upgrade /tmp/root.ubi + nand_do_upgrade $dir/root } platform_do_upgrade_nand_seama() { From 8c33debb528919abdb11abd7561538abb57b875b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= Date: Mon, 30 Dec 2019 07:54:53 +0100 Subject: [PATCH 07/12] samba36: log error if getting device info failed MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Rafał Miłecki --- package/network/services/samba36/Makefile | 2 +- package/network/services/samba36/files/samba.hotplug | 12 +++++++++--- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/package/network/services/samba36/Makefile b/package/network/services/samba36/Makefile index a4392f62c5..161f6b45aa 100644 --- a/package/network/services/samba36/Makefile +++ b/package/network/services/samba36/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=samba PKG_VERSION:=3.6.25 -PKG_RELEASE:=14 +PKG_RELEASE:=15 PKG_SOURCE_URL:=https://download.samba.org/pub/samba \ https://download.samba.org/pub/samba/stable diff --git a/package/network/services/samba36/files/samba.hotplug b/package/network/services/samba36/files/samba.hotplug index e1ae64e655..abb4346af0 100644 --- a/package/network/services/samba36/files/samba.hotplug +++ b/package/network/services/samba36/files/samba.hotplug @@ -6,7 +6,7 @@ device_get_vars() { json_init json_load "$(ubus call block info)" - json_select devices + json_select devices || return 1 json_get_keys keys for key in $keys @@ -18,13 +18,16 @@ device_get_vars() { shift json_get_vars $@ json_select .. - break + json_select .. + return 0 } json_select .. done json_select .. + + return 2 } [ -f /var/run/config/samba ] || { @@ -32,7 +35,10 @@ device_get_vars() { } [ "$ACTION" = "add" ] && { - device_get_vars $DEVICE label mount + device_get_vars $DEVICE label mount || { + logger -t samba-hotplug "Failed to get $DEVICE info" + exit 1 + } [ -n "$mount" ] && { uci -c /var/run/config batch <<-EOF set samba.$DEVICE="sambashare" From 1775d50bdeaccc573f2625e73473d7fd6748ef09 Mon Sep 17 00:00:00 2001 From: Roger Pueyo Centelles Date: Sun, 15 Mar 2020 18:20:03 +0100 Subject: [PATCH 08/12] ath79: add support for Ubiquiti NanoBridge M (XM) This patch adds support for the Ubiquiti NanoBridge M (XM), a 802.11n wireless with a feed+dish form factor, with the same board definition as the Bullet M (XM). Specifications: - Atheros AR7241 SoC - 32 MB RAM - 8 MB SPI flash - 1x 10/100 Mbps Ethernet port, 24 Vdc PoE-in - Power and LAN green LEDs - 4x RSSI LEDs (red, orange, green, green) - UART (115200 8N1) Flashing via stock GUI: - WARNING: flashing OpenWrt from AirOS v5.6 or newer will brick your device! Read the wiki for more info. - Downgrade to AirOS v5.5.x (latest available is 5.5.11) first. - Upload the factory image via AirOS web GUI. Flashing via TFTP: - WARNING: flashing OpenWrt from AirOS v5.6 or newer will brick your device! Read the wiki for more info. - Downgrade to AirOS v5.5.x (latest available is 5.5.11) first. - Use a pointy tool (e.g., pen cap, slotted screwdriver) to keep the reset button pressed. - Power on the device (keep reset button pressed). - Keep pressing until LEDs flash alternatively LED1+LED3 => LED2+LED4 => LED1+LED3, etc. - Release reset button. - The device starts a TFTP server at 192.168.1.20. - Set a static IP on the computer (e.g., 192.168.1.21/24). - Upload via tftp the factory image: $ tftp 192.168.1.20 tftp> bin tftp> trace tftp> put openwrt-ath79-generic-xxxxx-ubnt_nanobridge-m-squashfs-factory.bin Signed-off-by: Roger Pueyo Centelles [rebase, fix includes in DTS, add label MAC address, add SOC and fix sorting in generic-ubnt.mk] Signed-off-by: Adrian Schmutzler --- .../linux/ath79/dts/ar7241_ubnt_nanobridge-m.dts | 15 +++++++++++++++ .../ath79/generic/base-files/etc/board.d/01_leds | 1 + .../generic/base-files/etc/board.d/02_network | 2 ++ .../etc/hotplug.d/firmware/10-ath9k-eeprom | 1 + target/linux/ath79/image/generic-ubnt.mk | 9 +++++++++ 5 files changed, 28 insertions(+) create mode 100644 target/linux/ath79/dts/ar7241_ubnt_nanobridge-m.dts diff --git a/target/linux/ath79/dts/ar7241_ubnt_nanobridge-m.dts b/target/linux/ath79/dts/ar7241_ubnt_nanobridge-m.dts new file mode 100644 index 0000000000..005ef27caa --- /dev/null +++ b/target/linux/ath79/dts/ar7241_ubnt_nanobridge-m.dts @@ -0,0 +1,15 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT +/dts-v1/; + +#include "ar7241.dtsi" +#include "ar724x_ubnt_xm.dtsi" +#include "ar724x_ubnt_xm_outdoor.dtsi" + +/ { + compatible = "ubnt,nanobridge-m", "ubnt,xm", "qca,ar7241"; + model = "Ubiquiti NanoBridge M"; +}; + +ð1 { + compatible = "syscon", "simple-mfd"; +}; diff --git a/target/linux/ath79/generic/base-files/etc/board.d/01_leds b/target/linux/ath79/generic/base-files/etc/board.d/01_leds index 2df7dca89d..046339aa0a 100755 --- a/target/linux/ath79/generic/base-files/etc/board.d/01_leds +++ b/target/linux/ath79/generic/base-files/etc/board.d/01_leds @@ -253,6 +253,7 @@ trendnet,tew-823dru) ubnt,bullet-m-ar7240|\ ubnt,bullet-m-ar7241|\ ubnt,bullet-m-xw|\ +ubnt,nanobridge-m|\ ubnt,nanostation-loco-m|\ ubnt,nanostation-loco-m-xw|\ ubnt,nanostation-m|\ diff --git a/target/linux/ath79/generic/base-files/etc/board.d/02_network b/target/linux/ath79/generic/base-files/etc/board.d/02_network index fc1fee4844..cb84d31c01 100755 --- a/target/linux/ath79/generic/base-files/etc/board.d/02_network +++ b/target/linux/ath79/generic/base-files/etc/board.d/02_network @@ -46,6 +46,7 @@ ath79_setup_interfaces() ubnt,lap-120|\ ubnt,litebeam-ac-gen2|\ ubnt,nanobeam-ac|\ + ubnt,nanobridge-m|\ ubnt,nanostation-ac-loco|\ ubnt,nanostation-loco-m|\ ubnt,nanostation-loco-m-xw|\ @@ -449,6 +450,7 @@ ath79_setup_macs() ubnt,airrouter|\ ubnt,bullet-m-ar7240|\ ubnt,bullet-m-ar7241|\ + ubnt,nanobridge-m|\ ubnt,nanostation-loco-m|\ ubnt,nanostation-m|\ ubnt,picostation-m|\ diff --git a/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom b/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom index 0cf8b43514..a96b44b1c9 100644 --- a/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom +++ b/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom @@ -87,6 +87,7 @@ case "$FIRMWARE" in ubnt,airrouter|\ ubnt,bullet-m-ar7240|\ ubnt,bullet-m-ar7241|\ + ubnt,nanobridge-m|\ ubnt,nanostation-loco-m|\ ubnt,nanostation-m|\ ubnt,picostation-m|\ diff --git a/target/linux/ath79/image/generic-ubnt.mk b/target/linux/ath79/image/generic-ubnt.mk index d2c4f73797..7ad54083b6 100644 --- a/target/linux/ath79/image/generic-ubnt.mk +++ b/target/linux/ath79/image/generic-ubnt.mk @@ -177,6 +177,15 @@ define Device/ubnt_nanobeam-ac endef TARGET_DEVICES += ubnt_nanobeam-ac +define Device/ubnt_nanobridge-m + $(Device/ubnt-xm) + SOC := ar7241 + DEVICE_MODEL := NanoBridge M + DEVICE_PACKAGES += rssileds + SUPPORTED_DEVICES += bullet-m +endef +TARGET_DEVICES += ubnt_nanobridge-m + define Device/ubnt_nanostation-ac $(Device/ubnt-wa) DEVICE_MODEL := Nanostation AC From 1f4020a293476d5e34461a655cb9f6540cefeea2 Mon Sep 17 00:00:00 2001 From: Alexander Couzens Date: Sun, 22 Mar 2020 02:03:19 +0100 Subject: [PATCH 09/12] squashfskit4/Makefile: introduce PKG_RELEASE=1 When adding patches, the PKG_RELEASE should be increased. Signed-off-by: Alexander Couzens --- tools/squashfskit4/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/squashfskit4/Makefile b/tools/squashfskit4/Makefile index 4808c5607f..4d099b59c3 100644 --- a/tools/squashfskit4/Makefile +++ b/tools/squashfskit4/Makefile @@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=squashfskit4 PKG_VERSION:=4.14 - +PKG_RELEASE:=1 PKG_SOURCE:=squashfskit-v$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=https://github.com/squashfskit/squashfskit/releases/download/v$(PKG_VERSION)/ PKG_HASH:=5761aaa3aedc4f7112b708367d891c9abdc1ffea972e3fe47923ddba23984d95 From be4ed1db18e68cc57f03788b4529afbbf629411c Mon Sep 17 00:00:00 2001 From: Robert Marko Date: Thu, 19 Mar 2020 12:22:07 +0100 Subject: [PATCH 10/12] tools: squashfskit4: fix build with GCC10 In order to build squashfskit with GCC10, this backport from upstream is needed. Signed-off-by: Robert Marko [increase PKG_RELEASE] Signed-off-by: Alexander Couzens --- tools/squashfskit4/Makefile | 2 +- ...002-fix-build-failure-against-gcc-10.patch | 43 +++++++++++++++++++ 2 files changed, 44 insertions(+), 1 deletion(-) create mode 100644 tools/squashfskit4/patches/0002-fix-build-failure-against-gcc-10.patch diff --git a/tools/squashfskit4/Makefile b/tools/squashfskit4/Makefile index 4d099b59c3..396a7c0edc 100644 --- a/tools/squashfskit4/Makefile +++ b/tools/squashfskit4/Makefile @@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=squashfskit4 PKG_VERSION:=4.14 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_SOURCE:=squashfskit-v$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=https://github.com/squashfskit/squashfskit/releases/download/v$(PKG_VERSION)/ PKG_HASH:=5761aaa3aedc4f7112b708367d891c9abdc1ffea972e3fe47923ddba23984d95 diff --git a/tools/squashfskit4/patches/0002-fix-build-failure-against-gcc-10.patch b/tools/squashfskit4/patches/0002-fix-build-failure-against-gcc-10.patch new file mode 100644 index 0000000000..46c6a5ea0f --- /dev/null +++ b/tools/squashfskit4/patches/0002-fix-build-failure-against-gcc-10.patch @@ -0,0 +1,43 @@ +From fe2f5da4b0f8994169c53e84b7cb8a0feefc97b5 Mon Sep 17 00:00:00 2001 +From: Sergei Trofimovich +Date: Sun, 26 Jan 2020 18:35:13 +0000 +Subject: [PATCH] squashfs-tools: fix build failure against gcc-10 +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +On gcc-10 (and gcc-9 -fno-common) build fails as: + +``` +cc ... -o mksquashfs +ld: read_fs.o:(.bss+0x0): + multiple definition of `fwriter_buffer'; mksquashfs.o:(.bss+0x400c90): first defined here +ld: read_fs.o:(.bss+0x8): + multiple definition of `bwriter_buffer'; mksquashfs.o:(.bss+0x400c98): first defined here +``` + +gcc-10 will change the default from -fcommon to fno-common: +https://gcc.gnu.org/PR85678. + +The error also happens if CFLAGS=-fno-common passed explicitly. + +Reported-by: Toralf Förster +Bug: https://bugs.gentoo.org/706456 +Signed-off-by: Sergei Trofimovich +--- + squashfs-tools/mksquashfs.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/squashfs-tools/mksquashfs.h b/squashfs-tools/mksquashfs.h +index 1beefef7..b6503063 100644 +--- a/squashfs-tools/mksquashfs.h ++++ b/squashfs-tools/mksquashfs.h +@@ -143,7 +143,7 @@ struct append_file { + #endif + + extern struct cache *reader_buffer, *fragment_buffer, *reserve_cache; +-struct cache *bwriter_buffer, *fwriter_buffer; ++extern struct cache *bwriter_buffer, *fwriter_buffer; + extern struct queue *to_reader, *to_deflate, *to_writer, *from_writer, + *to_frag, *locked_fragment, *to_process_frag; + extern struct append_file **file_mapping; From 280868e54d52c6d9bca987dc476dd0adac2922ab Mon Sep 17 00:00:00 2001 From: David Bauer Date: Thu, 19 Mar 2020 10:33:20 +0100 Subject: [PATCH 11/12] ath79: align Ubiquiti AC Pro ethernet map to factory The Uniquiti AC Pro and Ubiquiti AC Mesh Pro currently have the "Primary" and "Secondary" ethernet ports configured to offer LAN as well as WAN. However, Uiquiti describes the following behavior for the devices Ethernet ports: > Secondary UniFi Access Point (UAP) Ethernet ports don't > provide PoE passthrough (to run current to a second powered > device), but they do support data passthrough. > It serves as a bridged interface between main / secondary > Ethernet port. To reduce confusion for users (as LAN and WAN functionality is not visible on the device itself), configure both ports to offer LAN functionality. Users can still configure a WAN interface on a port they are able to choose. CC: Lucian Cristian Reported-by: Florian Klink Signed-off-by: David Bauer --- .../linux/ath79/generic/base-files/etc/board.d/02_network | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/target/linux/ath79/generic/base-files/etc/board.d/02_network b/target/linux/ath79/generic/base-files/etc/board.d/02_network index cb84d31c01..9db21caad8 100755 --- a/target/linux/ath79/generic/base-files/etc/board.d/02_network +++ b/target/linux/ath79/generic/base-files/etc/board.d/02_network @@ -185,8 +185,6 @@ ath79_setup_interfaces() ;; nec,wg1200cr|\ ubnt,nanostation-ac|\ - ubnt,unifiac-mesh-pro|\ - ubnt,unifiac-pro|\ yuncore,a782|\ yuncore,xd4200) ucidef_add_switch "switch0" \ @@ -307,6 +305,11 @@ ath79_setup_interfaces() ucidef_add_switch "switch0" \ "0@eth0" "5:lan" "1:wan" ;; + ubnt,unifiac-mesh-pro|\ + ubnt,unifiac-pro) + ucidef_add_switch "switch0" \ + "0@eth0" "2:lan:1" "3:lan:2" + ;; zbtlink,zbt-wd323|\ xiaomi,mi-router-4q) ucidef_set_interface_wan "eth1" From 46d0ce19f1b8df37773a0a4ef68e5d330af981df Mon Sep 17 00:00:00 2001 From: David Bauer Date: Sun, 22 Mar 2020 01:34:56 +0100 Subject: [PATCH 12/12] iwinfo: update to latest Git HEAD 9f5a7c4 iwinfo: add missing HT modename for HT-None 06a03c9 Revert "iwinfo: add BSS load element to scan result" 9a4bae8 iwinfo: add device id for Qualcomm Atheros QCA9990 eba5a20 iwinfo: add device id for BCM43602 a6914dc iwinfo: add BSS load element to scan result bb21698 iwinfo: add device id for Atheros AR9287 7483398 iwinfo: add device id for MediaTek MT7615E Signed-off-by: David Bauer --- package/network/utils/iwinfo/Makefile | 6 +++--- .../network/utils/iwinfo/patches/000-brcm-hardware.patch | 9 --------- 2 files changed, 3 insertions(+), 12 deletions(-) delete mode 100644 package/network/utils/iwinfo/patches/000-brcm-hardware.patch diff --git a/package/network/utils/iwinfo/Makefile b/package/network/utils/iwinfo/Makefile index c7548dee98..b1b60e671c 100644 --- a/package/network/utils/iwinfo/Makefile +++ b/package/network/utils/iwinfo/Makefile @@ -11,9 +11,9 @@ PKG_RELEASE:=1 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL=$(PROJECT_GIT)/project/iwinfo.git -PKG_SOURCE_DATE:=2020-01-05 -PKG_SOURCE_VERSION:=bf2c1069a7f14d1af1e02c8edd2b7338f0355ac8 -PKG_MIRROR_HASH:=b5f370e087005783e816866eb031952c4b37f8b6c649c1ac1dacfb0b95fd61a7 +PKG_SOURCE_DATE:=2020-03-22 +PKG_SOURCE_VERSION:=9f5a7c4f9b78cb2de8fe5dd7af55bf0221706402 +PKG_MIRROR_HASH:=d62cae4b3d2f65c189f179c3dabf1c8c244c5de801439c483ea87dcf8e85b476 PKG_MAINTAINER:=Jo-Philipp Wich PKG_LICENSE:=GPL-2.0 diff --git a/package/network/utils/iwinfo/patches/000-brcm-hardware.patch b/package/network/utils/iwinfo/patches/000-brcm-hardware.patch deleted file mode 100644 index 009a6f985c..0000000000 --- a/package/network/utils/iwinfo/patches/000-brcm-hardware.patch +++ /dev/null @@ -1,9 +0,0 @@ -Index: libiwinfo-2020-01-05-bf2c1069/hardware.txt -=================================================================== ---- libiwinfo-2020-01-05-bf2c1069.orig/hardware.txt -+++ libiwinfo-2020-01-05-bf2c1069/hardware.txt -@@ -180,3 +180,4 @@ - 0x14c3 0x7650 0x14c3 0x7650 0 0 "MediaTek" "MT7610E" - 0x14c3 0x7662 0x14c3 0x7662 0 0 "MediaTek" "MT76x2E" - 0x1ae9 0x0310 0x1ae9 0x0000 0 0 "Wilocity" "Wil6210" -+0x14e4 0xaa52 0x14e4 0xaa52 0 0 "Broadcom" "BRCM43602"