aboutsummaryrefslogtreecommitdiffstats
path: root/target
diff options
context:
space:
mode:
authorMathias Kresin <dev@kresin.me>2017-12-28 09:22:45 +0100
committerMathias Kresin <dev@kresin.me>2018-01-09 22:06:55 +0100
commitaa6f5f1787a69c8b9af7533010f2d099075d9826 (patch)
tree68d8aaf0e79e0045c1e3a2457acfaff53870fa05 /target
parent2f757f60355d1ae9874590dcf92eaafd046fc831 (diff)
downloadupstream-aa6f5f1787a69c8b9af7533010f2d099075d9826.tar.gz
upstream-aa6f5f1787a69c8b9af7533010f2d099075d9826.tar.bz2
upstream-aa6f5f1787a69c8b9af7533010f2d099075d9826.zip
kirkwood: use image metadata
Append and enforce image metadata. Remove the device specific image checks, they are replaced by image metadata. Signed-off-by: Mathias Kresin <dev@kresin.me>
Diffstat (limited to 'target')
-rw-r--r--target/linux/kirkwood/base-files/lib/upgrade/platform.sh22
-rw-r--r--target/linux/kirkwood/image/Makefile3
2 files changed, 4 insertions, 21 deletions
diff --git a/target/linux/kirkwood/base-files/lib/upgrade/platform.sh b/target/linux/kirkwood/base-files/lib/upgrade/platform.sh
index b28ee873b3..dd06aa7f22 100644
--- a/target/linux/kirkwood/base-files/lib/upgrade/platform.sh
+++ b/target/linux/kirkwood/base-files/lib/upgrade/platform.sh
@@ -1,27 +1,9 @@
RAMFS_COPY_BIN='fw_printenv fw_setenv'
RAMFS_COPY_DATA='/etc/fw_env.config /var/lock/fw_printenv.lock'
-platform_check_image() {
- [ "$#" -gt 1 ] && return 1
- local board="$(board_name)"
- local magic="$(get_magic_long "$1")"
+REQUIRE_IMAGE_METADATA=1
- case "$board" in
- "linksys-audi"|\
- "linksys-viper")
- [ "$magic" != "27051956" -a "$magic" != "73797375" ] && {
- echo "Invalid image type."
- return 1
- }
- return 0
- ;;
- *)
- nand_do_platform_check $board $1
- return $?
- ;;
- esac
-
- echo "Sysupgrade is not yet supported on $board."
+platform_check_image() {
return 1
}
diff --git a/target/linux/kirkwood/image/Makefile b/target/linux/kirkwood/image/Makefile
index f52ae7de01..b75ef9fbb2 100644
--- a/target/linux/kirkwood/image/Makefile
+++ b/target/linux/kirkwood/image/Makefile
@@ -22,8 +22,9 @@ define Device/Default
SUBPAGESIZE := 512
BLOCKSIZE := 128k
IMAGES := sysupgrade.bin factory.bin
- IMAGE/sysupgrade.bin := sysupgrade-tar
+ IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
IMAGE/factory.bin := append-ubi
+ SUPPORTED_DEVICES := $(1)
endef
define Device/dockstar