[OpenWrt-Devel] [PATCH] octeon: Allow sysupgrade restore on ER

Jonathan Thibault jonathan at navigue.com
Mon Nov 12 10:56:14 EST 2018


This is a very simple patch that completes sysupgrade functionality on 
UBNT ER8.

Default layout leaves about 128MB free on the kernel partition so there 
is plenty of space for temporary config backups.


diff --git a/target/linux/octeon/base-files/lib/preinit/79_move_config 
b/target/linux/octeon/base-files/lib/preinit/79_move_config
index ec63d9f5ff..d50bac081b 100644
--- a/target/linux/octeon/base-files/lib/preinit/79_move_config
+++ b/target/linux/octeon/base-files/lib/preinit/79_move_config
@@ -10,6 +10,11 @@ move_config() {
                         [ -f /mnt/sysupgrade.tgz ] && mv -f 
/mnt/sysupgrade.tgz /
                         umount /mnt
                         ;;
+               er)
+                       mount -t vfat /dev/mmcblk0p1 /mnt
+                       [ -f /mnt/sysupgrade.tgz ] && mv -f 
/mnt/sysupgrade.tgz /
+                       umount /mnt
+                       ;;
         esac
  }

diff --git a/target/linux/octeon/base-files/lib/upgrade/platform.sh 
b/target/linux/octeon/base-files/lib/upgrade/platform.sh
index cd49c0da36..2a2136f196 100755
--- a/target/linux/octeon/base-files/lib/upgrade/platform.sh
+++ b/target/linux/octeon/base-files/lib/upgrade/platform.sh
@@ -28,6 +28,11 @@ platform_copy_config() {
                 cp -af "$CONF_TAR" /mnt/
                 umount /mnt
                 ;;
+       er)
+               mount -t vfat /dev/mmcblk0p1 /mnt
+               cp -af "$CONF_TAR" /mnt/
+               umount /mnt
+               ;;
         esac
  }


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel



More information about the openwrt-devel mailing list