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>
This commit is contained in:
@@ -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 :=
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user