When talking about https://bugs.lede-project.org/index.php?do=details&task_id=685 with jow and lynxis, we came to the conclusion that the best way to fix sysupgrades would be to generalize the staged sysupgrade used on NAND devices to work on all targets. That is what this patchset does, with some nice extras like staged sysupgrade support from failsafe mode (which did not work at all on NAND devices before).
I have tested these patches on ar71xx (squashfs+jffs2), ramips (squashfs+ ubifs) and x86 (ext4), and they seems to work perfectly; they should be tested on a lot more targets before they are applied though. The same patchset can be found the "sysupgrade" branch of my staging tree at https://git.lede-project.org/?p=lede/neoraider/staging.git;a=summary Note: the diffstat looks a lot scarier than it should; most of the added lines are the procd patches that I have included in the LEDE repo for now to facilitate testing the series. Matthias Matthias Schiffer (13): procd: prepare NAND sysupgrade for making upgraded dynamically linked procd: system: always support staged sysupgrade procd: upgraded: link dynamically, chroot during exec procd: upgraded: add support for passing a "command" argument to stage2 procd: remove procd-nand package base-files: always use staged sysupgrade fstools: snapshot: handle jffs2 conversion using upgraded procd: remove code that has become unnecessary after sysupgrade changes procd: init: add support for sysupgrades triggered from preinit base-files: sysupgrade cleanup base-files: add support for staged sysupgrades from failsafe mode ramips: sysupgrade: move nand_do_upgrade call to platform_do_upgrade x86: sysupgrade: explicitly rescan disk after writing partition table package/base-files/Makefile | 13 +- .../files/lib/preinit/40_run_failsafe_hook | 6 +- .../files/lib/preinit/99_10_failsafe_login | 11 +- package/base-files/files/lib/upgrade/common.sh | 167 +++---------- .../files => base-files/files/lib/upgrade}/nand.sh | 63 +---- package/base-files/files/lib/upgrade/stage2 | 150 ++++++++++++ package/base-files/files/sbin/sysupgrade | 73 +++--- package/system/fstools/Makefile | 2 +- package/system/fstools/files/snapshot | 16 +- package/system/procd/Makefile | 41 +--- package/system/procd/files/nand-preinit.sh | 21 -- ...1-system-always-support-staged-sysupgrade.patch | 112 +++++++++ ...raded-link-dynamically-chroot-during-exec.patch | 231 +++++++++++++++++ ...d-support-for-passing-a-command-argument-.patch | 104 ++++++++ ...-that-has-become-unnecessary-after-sysupg.patch | 120 +++++++++ ...pport-for-sysupgrades-triggered-from-prei.patch | 272 +++++++++++++++++++++ .../ramips/base-files/lib/upgrade/platform.sh | 9 +- .../linux/x86/base-files/lib/upgrade/platform.sh | 6 +- 18 files changed, 1112 insertions(+), 305 deletions(-) rename package/{system/procd/files => base-files/files/lib/upgrade}/nand.sh (89%) create mode 100755 package/base-files/files/lib/upgrade/stage2 delete mode 100644 package/system/procd/files/nand-preinit.sh create mode 100644 package/system/procd/patches/0001-system-always-support-staged-sysupgrade.patch create mode 100644 package/system/procd/patches/0002-upgraded-link-dynamically-chroot-during-exec.patch create mode 100644 package/system/procd/patches/0003-upgraded-add-support-for-passing-a-command-argument-.patch create mode 100644 package/system/procd/patches/0004-Remove-code-that-has-become-unnecessary-after-sysupg.patch create mode 100644 package/system/procd/patches/0005-init-add-support-for-sysupgrades-triggered-from-prei.patch -- 2.12.2 _______________________________________________ Lede-dev mailing list Lede-dev@lists.infradead.org http://lists.infradead.org/mailman/listinfo/lede-dev