aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ramips
diff options
context:
space:
mode:
authorAdrian Schmutzler <freifunk@adrianschmutzler.de>2021-06-20 18:54:36 +0200
committerAdrian Schmutzler <freifunk@adrianschmutzler.de>2021-07-10 19:40:10 +0200
commitcce8d16bf18909e1634c0aeac05e40a7be96a519 (patch)
treea7d60530a46fd5986a1b156de5ed8683cceca08b /target/linux/ramips
parent918908fe7639fde76c486b9be559992873978656 (diff)
downloadupstream-cce8d16bf18909e1634c0aeac05e40a7be96a519.tar.gz
upstream-cce8d16bf18909e1634c0aeac05e40a7be96a519.tar.bz2
upstream-cce8d16bf18909e1634c0aeac05e40a7be96a519.zip
treewide: call check-size before append-metadata
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 <freifunk@adrianschmutzler.de> Acked-by: Paul Spooren <mail@aparcar.org>
Diffstat (limited to 'target/linux/ramips')
-rw-r--r--target/linux/ramips/image/Makefile6
-rw-r--r--target/linux/ramips/image/common-tp-link.mk10
-rw-r--r--target/linux/ramips/image/mt7620.mk10
-rw-r--r--target/linux/ramips/image/mt7621.mk10
-rw-r--r--target/linux/ramips/image/rt305x.mk6
-rw-r--r--target/linux/ramips/image/rt3883.mk2
6 files changed, 22 insertions, 22 deletions
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 cf3225dc81..a11fa21fb4 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