diff mbox series

[OpenWrt-Devel,6/6] layerscape: sysupgrade: require metadata

Message ID 20200225190741.113235-6-tomek_n@o2.pl
State Accepted
Delegated to: Petr Štetiar
Headers show
Series [OpenWrt-Devel,1/6] layerscape: resurrect support for FRDM-LS1012A | expand

Commit Message

Tomasz Maciej Nowak Feb. 25, 2020, 7:07 p.m. UTC
Require the image metadata check so no invalid image could be fed to
sysupgrade without force option.

Cc: Mathew McBride <matt@traverse.com.au>
Signed-off-by: Tomasz Maciej Nowak <tomek_n@o2.pl>
---
 target/linux/layerscape/base-files/lib/upgrade/platform.sh | 2 ++
 target/linux/layerscape/image/armv8_64b.mk                 | 1 +
 2 files changed, 3 insertions(+)
diff mbox series

Patch

diff --git a/target/linux/layerscape/base-files/lib/upgrade/platform.sh b/target/linux/layerscape/base-files/lib/upgrade/platform.sh
index a2ee81cf3a..013023295b 100644
--- a/target/linux/layerscape/base-files/lib/upgrade/platform.sh
+++ b/target/linux/layerscape/base-files/lib/upgrade/platform.sh
@@ -6,6 +6,8 @@ 
 RAMFS_COPY_BIN="/usr/sbin/fw_printenv /usr/sbin/fw_setenv /usr/sbin/ubinfo /bin/echo"
 RAMFS_COPY_DATA="/etc/fw_env.config /var/lock/fw_printenv.lock"
 
+REQUIRE_IMAGE_METADATA=1
+
 platform_do_upgrade_traverse_nandubi() {
 	bootsys=$(fw_printenv bootsys | awk -F= '{{print $2}}')
 	newbootsys=2
diff --git a/target/linux/layerscape/image/armv8_64b.mk b/target/linux/layerscape/image/armv8_64b.mk
index bd7055b3ee..ff4846c9bf 100644
--- a/target/linux/layerscape/image/armv8_64b.mk
+++ b/target/linux/layerscape/image/armv8_64b.mk
@@ -291,5 +291,6 @@  define Device/traverse-ls1043
   IMAGE/root = append-rootfs
   IMAGE/sysupgrade.bin = sysupgrade-tar | append-metadata
   MKUBIFS_OPTS := -m 2048 -e 124KiB -c 4096
+  SUPPORTED_DEVICES := traverse,ls1043s traverse,ls1043v
 endef
 TARGET_DEVICES += traverse-ls1043