Dual-image NAND upgrade from interactive command line?

I'm running into a problem where my dual-image EA8300 isn't "taking" sysupgrade and just booting to the existing firmware on the other partition set. It's been a long time since I've had a serial line on my routers. Is there already a way to run a NAND upgrade interactively to diagnose what is happening or otherwise capture diagnostic information during the "silent" portion of the existing sysupgrade process?

I can refresh my memory of base-files/files/lib/upgrade/nand.sh but would rather not reinvent things.

Looks like the problem was that somewhere along the way nand_upgrade_tar() wasn't getting passed the second argument cmd rather than gz (which could be empty for the tar use case). Looks like it was fixed in a9402a83e6

Hand patching allows sysupgrade off the impacted builds.

$ git diff a9402a83e6^ a9402a83e6
diff --git a/package/base-files/files/lib/upgrade/nand.sh b/package/base-files/files/lib/upgrade/nand.sh
index 9fa3cd2ddd..ca302557c8 100644
--- a/package/base-files/files/lib/upgrade/nand.sh
+++ b/package/base-files/files/lib/upgrade/nand.sh
@@ -300,7 +300,7 @@ nand_upgrade_fit() {
 # Write images in the TAR file to MTD partitions and/or UBI volumes as required
 nand_upgrade_tar() {
        local tar_file="$1"
-       local cmd="$2"
+       local cmd="${2:-cat}"
        local jffs2_markers="${CI_JFFS2_CLEAN_MARKERS:-0}"
 
        # WARNING: This fails if tar contains more than one 'sysupgrade-*' directory.
1 Like