Hi!
I'm playing with different hardware, mainly with NAND storage. I'm happy with
ubi and ubifs, because it makes life easier and is a nice tool like lvm.
But I noticed that I was unable to upgrade an ubifs volume. I used the
sysupgrade framework, it unmounted root and killed several process. rootfs
was unmounted, but I still was not allowed to write the new image. I always
got "Resource busy". It seems that the left over processes (procd, ash,
telnet) still keep the ubifs volume open.
So I deciced to add an upgrade feature to procd. This allows procd to exec
an upgrade command, so allowing it to run as PID 1. I were able to kill all
processes, and the update went fine.
These patches now do the following:
procd: Add an ubus function which starts the upgrade process
sysupgrade: Add an special switch for this update type and allow the script
to kill all processes if run under PID 1.
platform.sh: Example sysupgrade plattform code for my developement tree.
Please consider these patches as a RFC. They are not final and need your
expertise and hints. I do appreciate every proposal.
André
André Valentin (3):
procd: add support for running sysupgrade as PID 1
sysupgrade: add support for running sysupgrade as PID 1
bcm53xx_brcm: add sysupgrade support
package/base-files/files/lib/upgrade/common.sh | 32 +++---
package/base-files/files/sbin/sysupgrade | 13 +++
package/system/procd/patches/100-sysupgrade.patch | 73 +++++++++++++
.../base-files/lib/upgrade/platform.sh | 108 ++++++++++++++++++++
4 files changed, 214 insertions(+), 12 deletions(-)
create mode 100644 package/system/procd/patches/100-sysupgrade.patch
create mode 100755 target/linux/bcm53xx_brcm/base-files/lib/upgrade/platform.sh
--
1.7.10.4
_______________________________________________
openwrt-devel mailing list
[email protected]
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel