diff mbox series

ath79: mikrotik: bump compat version for yafut images

Message ID 20230505125403.15780-1-hacks@slashdirt.org
State Accepted
Delegated to: Petr Štetiar
Headers show
Series ath79: mikrotik: bump compat version for yafut images | expand

Commit Message

Thibaut May 5, 2023, 12:54 p.m. UTC
Following 5264296, Mirotik NAND devices now use yafut to flash the
kernel on devices. This method is incompatible with the old-style
"kernel2minor" flash mechanism.

Even though NAND images were disabled in default build since 21.02, a
user flashing a new-style image onto an old-style image would result in
in a soft-brick[1]. In order to prevent such accidental mishap,
especially as these device images will be reenabled in the upcoming
release, bump the compat version.

After the new image is flashed, the compat version can be updated:

    uci set system.@system[0].compat_version='1.1'
    uci commit

[1] https://github.com/openwrt/openwrt/pull/12225#issuecomment-1517529262

Cc: Michał Kępień <openwrt@kempniu.pl>
Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
---
 target/linux/ath79/image/common-mikrotik.mk | 4 ++++
 1 file changed, 4 insertions(+)

Comments

Robert Marko May 5, 2023, 4:34 p.m. UTC | #1
On Fri, 5 May 2023 at 15:41, Thibaut VARÈNE <hacks@slashdirt.org> wrote:
>
> Following 5264296, Mirotik NAND devices now use yafut to flash the
> kernel on devices. This method is incompatible with the old-style
> "kernel2minor" flash mechanism.
>
> Even though NAND images were disabled in default build since 21.02, a
> user flashing a new-style image onto an old-style image would result in
> in a soft-brick[1]. In order to prevent such accidental mishap,
> especially as these device images will be reenabled in the upcoming
> release, bump the compat version.
>
> After the new image is flashed, the compat version can be updated:
>
>     uci set system.@system[0].compat_version='1.1'
>     uci commit
>
> [1] https://github.com/openwrt/openwrt/pull/12225#issuecomment-1517529262
>
> Cc: Michał Kępień <openwrt@kempniu.pl>
> Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>

Reviewed-by: Robert Marko <robimarko@gmail.com>

Regards,
Robert
> ---
>  target/linux/ath79/image/common-mikrotik.mk | 4 ++++
>  1 file changed, 4 insertions(+)
>
> diff --git a/target/linux/ath79/image/common-mikrotik.mk b/target/linux/ath79/image/common-mikrotik.mk
> index ce349b60b1..b37c8b7197 100644
> --- a/target/linux/ath79/image/common-mikrotik.mk
> +++ b/target/linux/ath79/image/common-mikrotik.mk
> @@ -18,4 +18,8 @@ endef
>  define Device/mikrotik_nand
>    $(Device/mikrotik)
>    IMAGE/sysupgrade.bin = append-kernel | sysupgrade-tar | append-metadata
> +  DEVICE_COMPAT_MESSAGE := \
> +       NAND images switched to yafut. If running older image, reinstall from initramfs.
> +  DEVICE_COMPAT_VERSION := 1.1
> +
>  endef
> --
> 2.37.1 (Apple Git-137.1)
>
>
> _______________________________________________
> openwrt-devel mailing list
> openwrt-devel@lists.openwrt.org
> https://lists.openwrt.org/mailman/listinfo/openwrt-devel
diff mbox series

Patch

diff --git a/target/linux/ath79/image/common-mikrotik.mk b/target/linux/ath79/image/common-mikrotik.mk
index ce349b60b1..b37c8b7197 100644
--- a/target/linux/ath79/image/common-mikrotik.mk
+++ b/target/linux/ath79/image/common-mikrotik.mk
@@ -18,4 +18,8 @@  endef
 define Device/mikrotik_nand
   $(Device/mikrotik)
   IMAGE/sysupgrade.bin = append-kernel | sysupgrade-tar | append-metadata
+  DEVICE_COMPAT_MESSAGE := \
+       NAND images switched to yafut. If running older image, reinstall from initramfs.
+  DEVICE_COMPAT_VERSION := 1.1
+
 endef