layerscape: sysupgrade: require metadata
authorTomasz Maciej Nowak <tomek_n@o2.pl>
Tue, 25 Feb 2020 19:07:41 +0000 (20:07 +0100)
committerPetr Štetiar <ynezz@true.cz>
Thu, 12 Mar 2020 11:59:44 +0000 (12:59 +0100)
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
target/linux/layerscape/image/armv8_64b.mk

index a2ee81cf3a0284465dc78cb27611f17622141dfc..013023295bfe7dea3ec8be18d1ce1d3d623f7a6b 100644 (file)
@@ -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
index bd7055b3ee13851bfd4f807f3c4edf4a6368d49d..ff4846c9bff1f4a481604ea85738f44e29569f80 100644 (file)
@@ -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