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>
This commit is contained in:
parent
2f757f6035
commit
aa6f5f1787
2 changed files with 4 additions and 21 deletions
|
@ -1,27 +1,9 @@
|
||||||
RAMFS_COPY_BIN='fw_printenv fw_setenv'
|
RAMFS_COPY_BIN='fw_printenv fw_setenv'
|
||||||
RAMFS_COPY_DATA='/etc/fw_env.config /var/lock/fw_printenv.lock'
|
RAMFS_COPY_DATA='/etc/fw_env.config /var/lock/fw_printenv.lock'
|
||||||
|
|
||||||
|
REQUIRE_IMAGE_METADATA=1
|
||||||
|
|
||||||
platform_check_image() {
|
platform_check_image() {
|
||||||
[ "$#" -gt 1 ] && return 1
|
|
||||||
local board="$(board_name)"
|
|
||||||
local magic="$(get_magic_long "$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."
|
|
||||||
return 1
|
return 1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -22,8 +22,9 @@ define Device/Default
|
||||||
SUBPAGESIZE := 512
|
SUBPAGESIZE := 512
|
||||||
BLOCKSIZE := 128k
|
BLOCKSIZE := 128k
|
||||||
IMAGES := sysupgrade.bin factory.bin
|
IMAGES := sysupgrade.bin factory.bin
|
||||||
IMAGE/sysupgrade.bin := sysupgrade-tar
|
IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
|
||||||
IMAGE/factory.bin := append-ubi
|
IMAGE/factory.bin := append-ubi
|
||||||
|
SUPPORTED_DEVICES := $(1)
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define Device/dockstar
|
define Device/dockstar
|
||||||
|
|
Loading…
Reference in a new issue