[LEDE-DEV] [PATCH v2 00/19] Universal staged sysupgrade and assorted fixes
Lucian Cristian
luci at createc.ro
Fri May 19 10:25:45 PDT 2017
On 13.05.2017 22:56, Matthias Schiffer wrote:
> Text from my RFC mail:
>
> ---
> 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.
> ---
>
> Some highlights of v2:
> * split whitespace fixes into separate patches
> * add missing include guards to new procd header sysupgrade.h
> * support sysupgrade -p again (suggested by from Daniel Golle)
> * various x86 sysupgrade fixes (now sysupgrade with growing kernel
> partition actually works)
> * apply x86 sysupgrade fixes to sunxi as well
>
> It would be great if someone with access to sunxi hardware could test my
> changes, the sunxi patches were not tested at all.
>
> Thanks for the feedback I got so far.
>
> Matthias
>
>
> Matthias Schiffer (19):
> procd: clean up trailing whitespace in nand.sh
> 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: clean up trailing whitespace in snapshot script
> 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: move partition table change check to
> platform_check_image
> x86: sysupgrade: refactor platform_do_upgrade
> x86: sysupgrade: explicitly rescan disk after writing partition table
> sunxi: sysupgrade: don't write partitions twice
> sunxi: sysupgrade: sync with x86
>
> 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 | 149 +++++++++++
> package/base-files/files/sbin/sysupgrade | 77 +++---
> 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 | 278 +++++++++++++++++++++
> .../ramips/base-files/lib/upgrade/platform.sh | 9 +-
> target/linux/sunxi/Makefile | 2 +-
> .../linux/sunxi/base-files/lib/upgrade/platform.sh | 120 +++++----
> .../linux/x86/base-files/lib/upgrade/platform.sh | 104 +++++---
> 20 files changed, 1259 insertions(+), 387 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
>
Sunxi: Olimex A20-OLinuXino-LIME2
wrote the image to sdcard, setup something, used the same image as
sysupgrade and everything went fine
Regards
More information about the Lede-dev
mailing list