aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ath79
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/ath79
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/ath79')
-rw-r--r--target/linux/ath79/image/Makefile2
-rw-r--r--target/linux/ath79/image/common-mikrotik.mk2
-rw-r--r--target/linux/ath79/image/common-netgear.mk10
-rw-r--r--target/linux/ath79/image/common-tp-link.mk5
-rw-r--r--target/linux/ath79/image/generic-tp-link.mk2
-rw-r--r--target/linux/ath79/image/generic-ubnt.mk4
-rw-r--r--target/linux/ath79/image/generic.mk36
-rw-r--r--target/linux/ath79/image/nand.mk3
-rw-r--r--target/linux/ath79/image/tiny.mk3
9 files changed, 28 insertions, 39 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 daeac8341f..9c4920b4e6 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 e8ea06a07a..01e8533fd6 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
@@ -373,7 +373,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 0db9987d70..fbcc9d186a 100644
--- a/target/linux/ath79/image/generic.mk
+++ b/target/linux/ath79/image/generic.mk
@@ -172,7 +172,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 :=
@@ -336,7 +336,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
@@ -777,7 +777,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
@@ -829,7 +829,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
@@ -891,7 +891,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
@@ -912,8 +912,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
@@ -930,8 +929,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
@@ -950,7 +948,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
@@ -1363,7 +1361,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
@@ -1430,7 +1428,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
@@ -1482,10 +1480,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
@@ -1868,7 +1864,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
@@ -2230,8 +2226,7 @@ define Device/teltonika_rut955
pad-rootfs | teltonika-fw-fake-checksum 20 | 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
@@ -2254,8 +2249,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"