From patchwork Sun Jun 20 16:56:41 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adrian Schmutzler X-Patchwork-Id: 1494778 X-Patchwork-Delegate: freifunk@adrianschmutzler.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.openwrt.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=jiO/3iFE; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4G7Jmz4sWKz9sRN for ; Mon, 21 Jun 2021 03:00:03 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:To :From:Reply-To:Cc:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=uek216bE84DNqy870sacMJ+rLz+XWntu28lEGGngp68=; b=jiO/3iFEbWKV9E C0BtaCqstzaVLtwKbiCkoMZvErOThyz9hymU1dQ3YScnlCpqemLHt2/wIxezJ28L/sUElWB55NFJe I8vQY8NZ842IQgnDaPiP0AUhP8HoEEXzEir95wSuvRpGfPuroo66SMOivOg9O8QTk4FLceM3xErRI rMIPFpoh1UAyoafMH8M9Kz/2aJxnmX48qhqY3kZePqnfTkKP5+mzfCYeYAgeIfG+nc+9ijhogGGWz eqaZBc8mGjxYb901kwQFJebacOA54zxaoAR+m6Oy6FOkl/GNqTJhvFxc8BA7BDP+lxsbByZtT3hVF FqkcDaoubVQlrX0i3+7w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1lv0lQ-001Lmc-QY; Sun, 20 Jun 2021 16:57:40 +0000 Received: from mout.kundenserver.de ([217.72.192.75]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1lv0lK-001LmA-VL for openwrt-devel@lists.openwrt.org; Sun, 20 Jun 2021 16:57:38 +0000 Received: from buildfff.adridolf.com ([178.26.242.49]) by mrelayeu.kundenserver.de (mreue106 [212.227.15.183]) with ESMTPSA (Nemesis) id 1MWBC8-1lnkOp38EE-00XY84 for ; Sun, 20 Jun 2021 18:57:29 +0200 From: Adrian Schmutzler To: openwrt-devel@lists.openwrt.org Subject: [PATCH] treewide: call check-size before append-metadata Date: Sun, 20 Jun 2021 18:56:41 +0200 Message-Id: <20210620165641.63731-1-freifunk@adrianschmutzler.de> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 X-Provags-ID: V03:K1:uqX5JoRxIM7MPJ4ogKh97QLrGNOTgF8c4LQ2UwKK07LENzIihe2 DltH0m+GNSCd3z4Eyw2oQsTKCFKIeCCQmBQZ9s6LjECvOIEplkJUuEU3cc4FzFPMCSOONnB YoI8fgv+7bdc4JXqZKKilmvduvDyOr7Uo+MFrdymRV7ykam7xhmDHkEokc4mpuGuNYTeK9x SXrMyxXbZO1ZgFfDA4z4g== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:lvPzo1AxU3E=:4qMfYCeVSFC3FwmcGY4/0r DE/H9yvjIrqPMrOMKoikWXzU3wX1rKOifb9ON6p/sE59KodadqHuhsMVNobbG1YE/SnkYZz5z 1B9Lw76+5nCPL6vhUC7tj8J99YzFjz683dNdC76bwNF/Xh8ZgNiwOHihsQAibcoLiDnQnbsRz vUrZ3IreFVnTpMS/gkGrj+eYBZE6QUf7aNtBFn938utriYcf0q7ATRmfppb+6Rf9F7TMd0z37 p+EoRhegojGr+O1SAyU/dqIJ3813px+Dw+lxqxR5KzkO2ZXRZuN83jttfGeg9HEe+Y0MuOoEA wf50j8IY2tF56yhODjPRu4uckpst38RshrYijdhiP4shjqdwJkX9gk0IO0DNqHMDPKSayajwo CH7qmBm95vfcM4PjCEKizUPEXLCZXxQj6GEKoDLBy6Pv9jx/kk45em8X60ONRbMkHBRhLA7d9 h3G0pT0l/3npo9motOS6aEKY4aUluT2abnrT3zV5BC10IuDcFkQ9thOOdWSBNeq+GU26M4Ezp cyfof/0syZUPDBudcLzCKf5u2ZqICUKTMkANX2hsJVt X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210620_095735_519862_78DA45F9 X-CRM114-Status: GOOD ( 10.66 ) X-Spam-Score: 0.0 (/) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: sysupgrade metadata is not flashed to the device, so check-size should be called _before_ adding metadata to the image. While at it, do some obvious wrapping improvements. Signed-off-by: Adrian Schmutzler --- target/linux/ath79/image/Makefile | 2 +- target/linux/ath79/image/common-mikrotik.mk | 2 +- target/linux/ath79/image/common-netgear. [...] Content analysis details: (0.0 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [217.72.192.75 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org sysupgrade metadata is not flashed to the device, so check-size should be called _before_ adding metadata to the image. While at it, do some obvious wrapping improvements. Signed-off-by: Adrian Schmutzler Acked-by: Paul Spooren --- target/linux/ath79/image/Makefile | 2 +- target/linux/ath79/image/common-mikrotik.mk | 2 +- target/linux/ath79/image/common-netgear.mk | 10 +++--- target/linux/ath79/image/common-tp-link.mk | 5 ++- target/linux/ath79/image/generic-tp-link.mk | 2 +- target/linux/ath79/image/generic-ubnt.mk | 4 +-- target/linux/ath79/image/generic.mk | 36 +++++++++------------ target/linux/ath79/image/nand.mk | 3 +- target/linux/ath79/image/tiny.mk | 3 +- target/linux/ipq40xx/image/generic.mk | 8 ++--- target/linux/ipq40xx/image/mikrotik.mk | 2 +- target/linux/ipq806x/image/Makefile | 2 +- target/linux/lantiq/image/Makefile | 4 +-- 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 | 10 +++--- target/linux/ramips/image/mt7620.mk | 10 +++--- target/linux/ramips/image/mt7621.mk | 10 +++--- target/linux/ramips/image/rt305x.mk | 6 ++-- target/linux/ramips/image/rt3883.mk | 2 +- target/linux/realtek/image/Makefile | 2 +- 23 files changed, 64 insertions(+), 75 deletions(-) diff --git a/target/linux/ath79/image/Makefile b/target/linux/ath79/image/Makefile index aa8665fbb2..aee4ddf963 100644 --- a/target/linux/ath79/image/Makefile +++ b/target/linux/ath79/image/Makefile @@ -81,7 +81,7 @@ define Device/Default COMPILE := IMAGES := sysupgrade.bin IMAGE/sysupgrade.bin = append-kernel | pad-to $$$$(BLOCKSIZE) | \ - append-rootfs | pad-rootfs | append-metadata | check-size + append-rootfs | pad-rootfs | check-size | append-metadata endef include $(SUBTARGET).mk diff --git a/target/linux/ath79/image/common-mikrotik.mk b/target/linux/ath79/image/common-mikrotik.mk index 6e739f2d85..5f5fa7899a 100644 --- a/target/linux/ath79/image/common-mikrotik.mk +++ b/target/linux/ath79/image/common-mikrotik.mk @@ -9,7 +9,7 @@ define Device/mikrotik_nor $(Device/mikrotik) IMAGE/sysupgrade.bin := append-kernel | kernel2minor -s 1024 -e | \ pad-to $$$$(BLOCKSIZE) | append-rootfs | pad-rootfs | \ - append-metadata | check-size + check-size | append-metadata endef define Device/mikrotik_nand diff --git a/target/linux/ath79/image/common-netgear.mk b/target/linux/ath79/image/common-netgear.mk index 8a74fdc0c9..5a61caf1f6 100644 --- a/target/linux/ath79/image/common-netgear.mk +++ b/target/linux/ath79/image/common-netgear.mk @@ -32,10 +32,8 @@ define Device/netgear_generic KERNEL := kernel-bin | append-dtb | lzma -d20 | uImage lzma KERNEL_INITRAMFS := kernel-bin | append-dtb | lzma -d20 | uImage lzma IMAGES += factory.img - IMAGE/default := append-kernel | pad-to $$$$(BLOCKSIZE) | netgear-squashfs | \ - append-rootfs | pad-rootfs - IMAGE/sysupgrade.bin := $$(IMAGE/default) | append-metadata | \ - check-size - IMAGE/factory.img := $$(IMAGE/default) | netgear-dni | \ - check-size + IMAGE/default := append-kernel | pad-to $$$$(BLOCKSIZE) | \ + netgear-squashfs | append-rootfs | pad-rootfs + IMAGE/sysupgrade.bin := $$(IMAGE/default) | check-size | append-metadata + IMAGE/factory.img := $$(IMAGE/default) | netgear-dni | check-size endef diff --git a/target/linux/ath79/image/common-tp-link.mk b/target/linux/ath79/image/common-tp-link.mk index 0b7b0e1935..f1d5614aa7 100644 --- a/target/linux/ath79/image/common-tp-link.mk +++ b/target/linux/ath79/image/common-tp-link.mk @@ -22,8 +22,7 @@ define Device/tplink-v2 TPLINK_HVERSION := 3 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/sysupgrade.bin := tplink-v2-image -s | check-size | append-metadata endef define Device/tplink-nolzma @@ -74,7 +73,7 @@ define Device/tplink-safeloader KERNEL := kernel-bin | append-dtb | lzma | tplink-v1-header -O KERNEL_INITRAMFS := $$(KERNEL) IMAGE/sysupgrade.bin := append-rootfs | tplink-safeloader sysupgrade | \ - append-metadata | check-size + check-size | append-metadata 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 8b228a73d2..99fe86f592 100644 --- a/target/linux/ath79/image/generic-tp-link.mk +++ b/target/linux/ath79/image/generic-tp-link.mk @@ -692,7 +692,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 + check-size | append-metadata 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 f8e1d1e432..29a1a710e4 100644 --- a/target/linux/ath79/image/generic-ubnt.mk +++ b/target/linux/ath79/image/generic-ubnt.mk @@ -128,7 +128,7 @@ define Device/ubnt-unifi-jffs2 KERNEL := kernel-bin | append-dtb | lzma | uImage lzma | jffs2 kernel0 IMAGES := sysupgrade.bin factory.bin IMAGE/sysupgrade.bin := append-kernel | pad-to $$$$(KERNEL_SIZE) | append-rootfs |\ - pad-rootfs | append-metadata | check-size + pad-rootfs | check-size | append-metadata IMAGE/factory.bin := $$(IMAGE/sysupgrade.bin) | mkubntimage2 endef @@ -365,7 +365,7 @@ define Device/ubnt_routerstation_common IMAGE/factory.bin := append-rootfs | pad-rootfs | mkubntimage | \ check-size IMAGE/sysupgrade.bin := append-rootfs | pad-rootfs | combined-image | \ - append-metadata | check-size + check-size | append-metadata 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 9d0be2b86b..f4d266838e 100644 --- a/target/linux/ath79/image/generic.mk +++ b/target/linux/ath79/image/generic.mk @@ -163,7 +163,7 @@ 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 + check-size | append-metadata IMAGE/factory.bin := $$(IMAGE/default) | pad-rootfs -x 64 | seama | \ seama-seal | check-size SEAMA_SIGNATURE := @@ -327,7 +327,7 @@ define Device/avm 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 + check-size | append-metadata DEVICE_PACKAGES := fritz-tffs endef @@ -768,7 +768,7 @@ define Device/dlink_dap-2xxx IMAGE/factory.img := append-kernel | pad-offset 6144k 160 | \ append-rootfs | wrgg-pad-rootfs | mkwrggimg | check-size IMAGE/sysupgrade.bin := append-kernel | mkwrggimg | \ - pad-to $$$$(BLOCKSIZE) | append-rootfs | append-metadata | check-size + pad-to $$$$(BLOCKSIZE) | append-rootfs | check-size | append-metadata KERNEL := kernel-bin | append-dtb | relocate-kernel | lzma KERNEL_INITRAMFS := $$(KERNEL) | mkwrggimg endef @@ -820,7 +820,7 @@ define Device/dlink_dap-2695-a1 IMAGE/factory.img := $$(IMAGE/default) | append-rootfs | wrgg-pad-rootfs | \ mkwrggimg | check-size IMAGE/sysupgrade.bin := $$(IMAGE/default) | mkwrggimg | append-rootfs | \ - wrgg-pad-rootfs | append-metadata | check-size + wrgg-pad-rootfs | check-size | append-metadata KERNEL := kernel-bin | append-dtb | relocate-kernel | lzma KERNEL_INITRAMFS := $$(KERNEL) | mkwrggimg DAP_SIGNATURE := wapac02_dkbs_dap2695 @@ -882,7 +882,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 + check-size | append-metadata DEVICE_PACKAGES := kmod-usb-ohci kmod-usb2 kmod-usb-ledtrig-usbport \ kmod-leds-reset kmod-owl-loader SUPPORTED_DEVICES += dir-825-b1 @@ -903,8 +903,7 @@ define Device/dlink_dir-825-c1 pad-rootfs IMAGE/factory.bin := $$(IMAGE/default) | pad-offset $$$$(IMAGE_SIZE) 26 | \ append-string 00DB120AR9344-RT-101214-00 | check-size - IMAGE/sysupgrade.bin := $$(IMAGE/default) | append-metadata | \ - check-size + IMAGE/sysupgrade.bin := $$(IMAGE/default) | check-size | append-metadata endef TARGET_DEVICES += dlink_dir-825-c1 @@ -921,8 +920,7 @@ define Device/dlink_dir-835-a1 pad-rootfs IMAGE/factory.bin := $$(IMAGE/default) | pad-offset $$$$(IMAGE_SIZE) 26 | \ append-string 00DB120AR9344-RT-101214-00 | check-size - IMAGE/sysupgrade.bin := $$(IMAGE/default) | append-metadata | \ - check-size + IMAGE/sysupgrade.bin := $$(IMAGE/default) | check-size | append-metadata endef TARGET_DEVICES += dlink_dir-835-a1 @@ -941,7 +939,7 @@ 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 + check-size | append-metadata IMAGE/factory.bin := $$(IMAGE/default) | pad-rootfs -x 64 | seama | \ seama-seal | check-size IMAGE_SIZE := 15680k @@ -1354,7 +1352,7 @@ define Device/jjplus_ja76pf2 IMAGE/kernel.bin := append-kernel IMAGE/rootfs.bin := append-rootfs | pad-rootfs IMAGE/sysupgrade.bin := append-rootfs | pad-rootfs | combined-image | \ - append-metadata | check-size + check-size | append-metadata KERNEL := kernel-bin | append-dtb | lzma | pad-to $$(BLOCKSIZE) KERNEL_INITRAMFS := kernel-bin | append-dtb IMAGE_SIZE := 16000k @@ -1421,7 +1419,7 @@ define Device/nec_wx1200cr DEVICE_VENDOR := NEC IMAGE/default := append-kernel | pad-offset $$$$(BLOCKSIZE) 64 | append-rootfs IMAGE/sysupgrade.bin := $$(IMAGE/default) | seama | pad-rootfs | \ - append-metadata | check-size + check-size | append-metadata DEVICE_PACKAGES := kmod-ath10k-ct ath10k-firmware-qca9888-ct endef @@ -1473,10 +1471,8 @@ define Device/netgear_ex6400_ex7300 IMAGE_SIZE := 15552k IMAGE/default := append-kernel | pad-offset $$$$(BLOCKSIZE) 64 | \ netgear-rootfs | pad-rootfs - IMAGE/sysupgrade.bin := $$(IMAGE/default) | append-metadata | \ - check-size - IMAGE/factory.img := $$(IMAGE/default) | netgear-dni | \ - check-size + IMAGE/sysupgrade.bin := $$(IMAGE/default) | check-size | append-metadata + IMAGE/factory.img := $$(IMAGE/default) | netgear-dni | check-size DEVICE_PACKAGES := kmod-ath10k-ct ath10k-firmware-qca99x0-ct endef @@ -1859,7 +1855,7 @@ define Device/phicomm_k2t DEVICE_MODEL := K2T IMAGE_SIZE := 15744k IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | \ - append-metadata | check-size + check-size | append-metadata DEVICE_PACKAGES := kmod-leds-reset kmod-ath10k-ct-smallbuffers ath10k-firmware-qca9888-ct endef TARGET_DEVICES += phicomm_k2t @@ -2199,8 +2195,7 @@ define Device/teltonika_rut955 pad-rootfs | teltonika-fw-fake-checksum | append-string master |\ append-md5sum-bin | check-size IMAGE/sysupgrade.bin := append-kernel | pad-to $$$$(BLOCKSIZE) |\ - append-rootfs | pad-rootfs | append-metadata |\ - check-size + append-rootfs | pad-rootfs | check-size | append-metadata endef TARGET_DEVICES += teltonika_rut955 @@ -2223,8 +2218,7 @@ define Device/trendnet_tew-823dru pad-rootfs IMAGE/factory.bin := $$(IMAGE/default) | pad-offset $$$$(IMAGE_SIZE) 26 | \ append-string 00AP135AR9558-RT-131129-00 | check-size - IMAGE/sysupgrade.bin := $$(IMAGE/default) | append-metadata | \ - check-size + IMAGE/sysupgrade.bin := $$(IMAGE/default) | check-size | append-metadata endef TARGET_DEVICES += trendnet_tew-823dru diff --git a/target/linux/ath79/image/nand.mk b/target/linux/ath79/image/nand.mk index caaa01c92d..20cb2f60fa 100644 --- a/target/linux/ath79/image/nand.mk +++ b/target/linux/ath79/image/nand.mk @@ -166,8 +166,7 @@ define Device/netgear_ath79_nand IMAGES := sysupgrade.bin factory.img IMAGE/factory.img := append-kernel | append-ubi | netgear-dni | \ check-size - IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata | \ - check-size + IMAGE/sysupgrade.bin := sysupgrade-tar | check-size | append-metadata UBINIZE_OPTS := -E 5 endef diff --git a/target/linux/ath79/image/tiny.mk b/target/linux/ath79/image/tiny.mk index 29e411c058..f4a03e2840 100644 --- a/target/linux/ath79/image/tiny.mk +++ b/target/linux/ath79/image/tiny.mk @@ -21,8 +21,7 @@ define Device/dlink_dir-615-e4 FACTORY_IMAGE_SIZE := 3456k IMAGES += factory.bin IMAGE/default := append-kernel | append-rootfs | pad-rootfs - IMAGE/sysupgrade.bin := $$(IMAGE/default) | append-metadata | \ - check-size + IMAGE/sysupgrade.bin := $$(IMAGE/default) | check-size | append-metadata 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/generic.mk b/target/linux/ipq40xx/image/generic.mk index 68e565594d..9dee742eb4 100644 --- a/target/linux/ipq40xx/image/generic.mk +++ b/target/linux/ipq40xx/image/generic.mk @@ -35,7 +35,7 @@ define Device/DniImage IMAGES += factory.img 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 | check-size + append-rootfs | pad-rootfs | check-size | append-metadata endef define Build/append-rootfshdr @@ -106,7 +106,7 @@ define Device/8dev_habanero-dvk IMAGE_SIZE := 30976k SOC := qcom-ipq4019 DEVICE_PACKAGES := ipq-wifi-8dev_habanero-dvk - IMAGE/sysupgrade.bin := append-kernel | pad-to 64k | append-rootfs | pad-rootfs | append-metadata | check-size + IMAGE/sysupgrade.bin := append-kernel | pad-to 64k | append-rootfs | pad-rootfs | check-size | append-metadata endef TARGET_DEVICES += 8dev_habanero-dvk @@ -207,7 +207,7 @@ define Device/avm_fritzbox-4040 UBOOT_PARTITION_SIZE := 524288 IMAGES += eva.bin IMAGE/eva.bin := append-uboot | pad-to $$$$(UBOOT_PARTITION_SIZE) | append-kernel | append-rootfs | pad-rootfs - IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | append-metadata | check-size + IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | check-size | append-metadata DEVICE_PACKAGES := fritz-tffs fritz-caldata endef TARGET_DEVICES += avm_fritzbox-4040 @@ -822,7 +822,7 @@ define Device/zyxel_wre6606 DEVICE_DTS_CONFIG := config@4 SOC := qcom-ipq4018 IMAGE_SIZE := 13184k - IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | append-metadata | check-size + IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | check-size | append-metadata DEVICE_PACKAGES := -kmod-ath10k-ct kmod-ath10k-ct-smallbuffers endef TARGET_DEVICES += zyxel_wre6606 diff --git a/target/linux/ipq40xx/image/mikrotik.mk b/target/linux/ipq40xx/image/mikrotik.mk index 7c2fa52738..31497608be 100644 --- a/target/linux/ipq40xx/image/mikrotik.mk +++ b/target/linux/ipq40xx/image/mikrotik.mk @@ -7,7 +7,7 @@ define Device/mikrotik_nor IMAGES = sysupgrade.bin IMAGE/sysupgrade.bin := append-kernel | kernel2minor -s 1024 | \ pad-to $$$$(BLOCKSIZE) | append-rootfs | pad-rootfs | \ - append-metadata | check-size + check-size | append-metadata endef define Device/mikrotik_hap-ac2 diff --git a/target/linux/ipq806x/image/Makefile b/target/linux/ipq806x/image/Makefile index e53fba1e1d..93e7ba3151 100644 --- a/target/linux/ipq806x/image/Makefile +++ b/target/linux/ipq806x/image/Makefile @@ -401,7 +401,7 @@ define Device/ubnt_unifi-ac-hd BLOCKSIZE := 64k IMAGE_SIZE := 14784k DEVICE_PACKAGES := ath10k-firmware-qca9984-ct - IMAGE/sysupgrade.bin := append-kernel | pad-to $$$$(BLOCKSIZE) | append-rootfs | pad-rootfs | append-metadata | check-size + IMAGE/sysupgrade.bin := append-kernel | pad-to $$$$(BLOCKSIZE) | append-rootfs | pad-rootfs | check-size | append-metadata endef TARGET_DEVICES += ubnt_unifi-ac-hd diff --git a/target/linux/lantiq/image/Makefile b/target/linux/lantiq/image/Makefile index c90975d098..ec10cd882a 100644 --- a/target/linux/lantiq/image/Makefile +++ b/target/linux/lantiq/image/Makefile @@ -63,7 +63,7 @@ define Device/Default SOC := $(DEFAULT_SOC) DEVICE_DTS = $$(SOC)_$(1) IMAGES := sysupgrade.bin - IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | append-metadata | check-size + IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | check-size | append-metadata endef define Device/NAND/xway @@ -102,7 +102,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 + append-rootfs | pad-rootfs | check-size | append-metadata endef ifeq ($(SUBTARGET),ase) diff --git a/target/linux/lantiq/image/ar9.mk b/target/linux/lantiq/image/ar9.mk index a973c90beb..9ce36c91e6 100644 --- a/target/linux/lantiq/image/ar9.mk +++ b/target/linux/lantiq/image/ar9.mk @@ -91,10 +91,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 + pad-rootfs | check-size | append-metadata IMAGE/sysupgrade.bin := \ append-kernel | append-rootfs | dgn3500-sercom-footer 0x0 "WW" | \ - pad-rootfs | append-metadata | check-size + pad-rootfs | check-size | append-metadata IMAGE/factory-na.img := \ pad-extra $(DGN3500_KERNEL_OFFSET_DEC) | append-kernel | append-rootfs | \ dgn3500-sercom-footer $(DGN3500_KERNEL_OFFSET_HEX) "NA" | pad-rootfs | \ @@ -121,7 +121,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 + pad-rootfs | check-size | append-metadata 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 cebdf46e12..4dc904d6c1 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 + check-size | append-metadata endef define Device/tplink_tdw8970 diff --git a/target/linux/lantiq/image/vr9.mk b/target/linux/lantiq/image/vr9.mk index d8cabea972..910edd2fb3 100644 --- a/target/linux/lantiq/image/vr9.mk +++ b/target/linux/lantiq/image/vr9.mk @@ -227,7 +227,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 + append-rootfs | pad-rootfs | check-size | append-metadata 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 fc5223f3a4..cd2c425cef 100644 --- a/target/linux/ramips/image/Makefile +++ b/target/linux/ramips/image/Makefile @@ -166,7 +166,7 @@ define Device/Default IMAGES := sysupgrade.bin COMPILE := sysupgrade_bin := append-kernel | append-rootfs | pad-rootfs - IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | append-metadata | check-size + IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | check-size | append-metadata endef define Device/netgear_sercomm_nor @@ -175,7 +175,7 @@ define Device/netgear_sercomm_nor IMAGES += factory.img IMAGE/default := append-kernel | pad-to $$$$(BLOCKSIZE) | append-rootfs | \ pad-rootfs - IMAGE/sysupgrade.bin := $$(IMAGE/default) | append-metadata | check-size + IMAGE/sysupgrade.bin := $$(IMAGE/default) | check-size | append-metadata IMAGE/factory.img := pad-extra $$$$(SERCOMM_PAD) | $$(IMAGE/default) | \ pad-to $$$$(BLOCKSIZE) | sercom-footer | pad-to 128 | \ zip $$$$(SERCOMM_HWNAME).bin | sercom-seal @@ -190,7 +190,7 @@ 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/default) | seama | pad-rootfs | check-size | append-metadata IMAGE/factory.bin := \ $$(IMAGE/default) | pad-rootfs -x 64 | seama | seama-seal | check-size SEAMA_SIGNATURE := diff --git a/target/linux/ramips/image/common-tp-link.mk b/target/linux/ramips/image/common-tp-link.mk index 07ad1ea250..915a086f98 100644 --- a/target/linux/ramips/image/common-tp-link.mk +++ b/target/linux/ramips/image/common-tp-link.mk @@ -11,8 +11,8 @@ define Device/tplink-v1 KERNEL_INITRAMFS := $(KERNEL_DTB) | tplink-v1-header -e -O 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/sysupgrade.bin := tplink-v1-image sysupgrade -e -O | check-size | \ + append-metadata endef define Device/tplink-v2 @@ -26,8 +26,8 @@ define Device/tplink-v2 KERNEL_INITRAMFS := $(KERNEL_DTB) | tplink-v2-header -e IMAGES += factory.bin IMAGE/factory.bin := tplink-v2-image -e - IMAGE/sysupgrade.bin := tplink-v2-image -s -e | append-metadata | \ - check-size + IMAGE/sysupgrade.bin := tplink-v2-image -s -e | check-size | \ + append-metadata 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 + check-size | append-metadata 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 849bd31ef8..c3b9bc9f6b 100644 --- a/target/linux/ramips/image/mt7620.mk +++ b/target/linux/ramips/image/mt7620.mk @@ -327,7 +327,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 + check-size | append-metadata DEVICE_PACKAGES := kmod-mt76x2 kmod-usb2 kmod-usb-ohci \ kmod-usb-ledtrig-usbport endef @@ -341,7 +341,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 + check-size | append-metadata DEVICE_PACKAGES := kmod-mt76x2 kmod-phy-realtek endef TARGET_DEVICES += edimax_ew-7476rpc @@ -354,7 +354,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 + check-size | append-metadata DEVICE_PACKAGES := kmod-mt76x2 kmod-phy-realtek endef TARGET_DEVICES += edimax_ew-7478ac @@ -367,7 +367,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 + check-size | append-metadata DEVICE_PACKAGES := kmod-mt76x2 kmod-usb2 kmod-usb-ohci \ kmod-usb-ledtrig-usbport endef @@ -407,7 +407,7 @@ define Device/fon_fon2601 DEVICE_PACKAGES := kmod-mt76x2 kmod-usb2 kmod-usb-ohci KERNEL_INITRAMFS := $$(KERNEL) | uimage-padhdr IMAGE/sysupgrade.bin := append-kernel | append-rootfs | uimage-padhdr | \ - pad-rootfs | append-metadata | check-size + pad-rootfs | check-size | append-metadata endef TARGET_DEVICES += fon_fon2601 diff --git a/target/linux/ramips/image/mt7621.mk b/target/linux/ramips/image/mt7621.mk index ae9b4757de..bd3d336a89 100644 --- a/target/linux/ramips/image/mt7621.mk +++ b/target/linux/ramips/image/mt7621.mk @@ -289,7 +289,7 @@ define Device/dlink_dir-8xx-a1 KERNEL_INITRAMFS := $$(KERNEL) | uimage-padhdr 96 IMAGES += factory.bin IMAGE/sysupgrade.bin := append-kernel | append-rootfs | uimage-padhdr 96 |\ - pad-rootfs | append-metadata | check-size + pad-rootfs | check-size | append-metadata IMAGE/factory.bin := append-kernel | append-rootfs | uimage-padhdr 96 |\ check-size endef @@ -440,7 +440,7 @@ define Device/edimax_re23s DEVICE_ALT0_MODEL := Gemini RE23S IMAGE/sysupgrade.bin := append-kernel | append-rootfs | \ edimax-header -s CSYS -m RN76 -f 0x70000 -S 0x01100000 | pad-rootfs | \ - append-metadata | check-size + check-size | append-metadata IMAGES += factory.bin IMAGE/factory.bin := append-kernel | append-rootfs | \ edimax-header -s CSYS -m RN76 -f 0x70000 -S 0x01100000 | pad-rootfs | \ @@ -824,7 +824,7 @@ define Device/linksys_ea7xxx uboot-envtools UBINIZE_OPTS := -E 5 IMAGES := sysupgrade.bin factory.bin - IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata | check-size + IMAGE/sysupgrade.bin := sysupgrade-tar | check-size | append-metadata IMAGE/factory.bin := append-kernel | pad-to $$$$(KERNEL_SIZE) | \ append-ubi | check-size | linksys-image type=$$$$(LINKSYS_HWNAME) endef @@ -901,8 +901,8 @@ define Device/MikroTik KERNEL_NAME := vmlinuz KERNEL := kernel-bin | append-dtb-elf IMAGE/sysupgrade.bin := append-kernel | kernel2minor -s 1024 | \ - pad-to $$$$(BLOCKSIZE) | append-rootfs | pad-rootfs | append-metadata | \ - check-size + pad-to $$$$(BLOCKSIZE) | append-rootfs | pad-rootfs | check-size | \ + append-metadata endef define Device/mikrotik_routerboard-750gr3 diff --git a/target/linux/ramips/image/rt305x.mk b/target/linux/ramips/image/rt305x.mk index 4edc2eb3c4..6c339dcba1 100644 --- a/target/linux/ramips/image/rt305x.mk +++ b/target/linux/ramips/image/rt305x.mk @@ -500,7 +500,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 + check-size | append-metadata DEVICE_VENDOR := Edimax DEVICE_MODEL := 3g-6200n SUPPORTED_DEVICES += 3g-6200n @@ -513,7 +513,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 + check-size | append-metadata DEVICE_VENDOR := Edimax DEVICE_MODEL := 3g-6200nl SUPPORTED_DEVICES += 3g-6200nl @@ -1047,7 +1047,7 @@ define Device/trendnet_tew-638apb-v2 BLOCKSIZE := 64k IMAGE_SIZE := 3776k IMAGE/sysupgrade.bin := $$(sysupgrade_bin) | umedia-header 0x026382 | \ - append-metadata | check-size + check-size | append-metadata DEVICE_VENDOR := TRENDnet DEVICE_MODEL := TEW-638APB DEVICE_VARIANT := v2 diff --git a/target/linux/ramips/image/rt3883.mk b/target/linux/ramips/image/rt3883.mk index 1b46d570fd..148bfbbe44 100644 --- a/target/linux/ramips/image/rt3883.mk +++ b/target/linux/ramips/image/rt3883.mk @@ -52,7 +52,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 + check-size | append-metadata DEVICE_VENDOR := Edimax DEVICE_MODEL := BR-6475nD SUPPORTED_DEVICES += br-6475nd diff --git a/target/linux/realtek/image/Makefile b/target/linux/realtek/image/Makefile index ebc0c0a784..cf0d588851 100644 --- a/target/linux/realtek/image/Makefile +++ b/target/linux/realtek/image/Makefile @@ -24,7 +24,7 @@ define Device/Default DEVICE_DTS = $$(SOC)_$(1) IMAGES := sysupgrade.bin IMAGE/sysupgrade.bin := append-kernel | pad-to 64k | append-rootfs | pad-rootfs | \ - append-metadata | check-size + check-size | append-metadata endef # "NGE" refers to the uImage magic