Re: [OpenWrt-Devel] [PATCH 0/3] RFC: Enable sysupgrade on ubifs rootfs

2014-05-23 Thread Andre Valentin

Hi!

On 23.05.2014 16:12, John Crispin wrote:


ok, i will rework the series and merge the first 2 patches in the next
days.

i noticed the series passes the cmdline of sysupgrade which is a bit
ugly so i will change that to using imagename + preserve_settings or
similar


That sounds good:-) Can't wait to see it! If I can support just tell!

--

André
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH 0/3] RFC: Enable sysupgrade on ubifs rootfs

2014-05-23 Thread Andre Valentin

Hi!

On 23.05.2014 15:08, John Crispin wrote:

Hi,

is this neccessary ? should a forced detach not be enough ? that is
why we added the forced detach ioctl.

could you try to use "ubi detach rootfs" instead of unmount ?

Damn, I did not notice this. I have to use a different kernel source..
Thanks for the hint, I'll keep you posted!

--

André
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH 0/3] RFC: Enable sysupgrade on ubifs rootfs

2014-05-23 Thread Daniel
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 05/23/2014 04:12 PM, John Crispin wrote:
> ok, i will rework the series and merge the first 2 patches in the next 
> days.
> 
> i noticed the series passes the cmdline of sysupgrade which is a bit ugly 
> so i will change that to using imagename + preserve_settings or similar

Sounds beautiful!
-BEGIN PGP SIGNATURE-
Version: GnuPG v2.0.22 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQEcBAEBAgAGBQJTf4TNAAoJECBgbL4bcbCQhVIIAJl0/YluLrRST16fbGjnN/zf
Cy33CWYikzcIq1LwwHWJyND0faY9e5FWK9OU8zYNLJ49SmXspnMfatI3c1uKDxKN
0IWPerUgyZwEz38QQ06hnYrwicOmkfv56gnyyNQ6/oqZzCDZN9puM4x1FKgMD203
cXIF7xwxK/R/RzsquAumkTcTyHNQxvvFd2GkHGtfN0jlI/HjDJ21N+OfUWQ51CN3
u6Shdm7DrO6u3kvrdnPXk5c1DJDMPsjw9J4khIB9+U6UQ/HkK4YvWYr25BbEw1Id
0tb2xit1wYKpArMCh+Wyqri1f+zssRh/nd8IWeoF8UaBznrqwW4Boa04XZNumRo=
=4EXN
-END PGP SIGNATURE-
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH 0/3] RFC: Enable sysupgrade on ubifs rootfs

2014-05-23 Thread John Crispin


On 23/05/2014 16:47, André Valentin wrote:
> Hi!
> 
> currently I cannot comment this, I will do it in the late evening.
> But please notice that this was a request for comments. It was not
> intended to be merged, because there are still some minor and ugly
> things in it. I just wanted to know what you think about this
> before I invest more time in it.
> 
> Till later,
> 
> André ___ openwrt-devel
> mailing list openwrt-devel@lists.openwrt.org 
> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
> 

Hi Andre,

in short .. yes we know and discussed int he replies already what
still needs to be done. you sent a patch for stuff that people were
already working on so the patch will hit trunk in a modified version
pretty quickly i think. the approach you took is correct once we
tweaked a few details

John
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH 0/3] RFC: Enable sysupgrade on ubifs rootfs

2014-05-23 Thread André Valentin
Hi!

currently I cannot comment this, I will do it in the late evening. But please 
notice that this was a request for comments. It was not intended to be merged, 
because there are still some minor and ugly things in it.
I just wanted to know what you think about this before I invest more time in it.

Till later,

André
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH 0/3] RFC: Enable sysupgrade on ubifs rootfs

2014-05-23 Thread John Crispin


On 23/05/2014 15:13, Jo-Philipp Wich wrote:
> Replacing pid 1 is the safest, cleanest and most generic solution
> as it will support any kind of underlying storage system so you can
> e.g. umount an ext4 root or perform LVM ops in case the system runs
> from a volume group etc.
> 
> ~ Jow


ok, i will rework the series and merge the first 2 patches in the next
days.

i noticed the series passes the cmdline of sysupgrade which is a bit
ugly so i will change that to using imagename + preserve_settings or
similar

John
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH 0/3] RFC: Enable sysupgrade on ubifs rootfs

2014-05-23 Thread Jo-Philipp Wich
Hey.
> is this neccessary ? should a forced detach not be enough ? that is
> why we added the forced detach ioctl.

The forced detaching might solve the issue for the ubi case but not in a
general way.

Replacing pid 1 is the safest, cleanest and most generic solution as it
will support any kind of underlying storage system so you can e.g.
umount an ext4 root or perform LVM ops in case the system runs from a
volume group etc.

~ Jow



signature.asc
Description: OpenPGP digital signature
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH 0/3] RFC: Enable sysupgrade on ubifs rootfs

2014-05-23 Thread John Crispin
Hi,

is this neccessary ? should a forced detach not be enough ? that is
why we added the forced detach ioctl.

could you try to use "ubi detach rootfs" instead of unmount ?


John



On 23/05/2014 14:40, Daniel wrote:
> Hi André,
> 
> I'm also working a lot on UBI(fs) support lately. First of all, a
> patch like this one is needed also for squashfs on ubiblock or any
> platform with a root device which actually got some sort of
> locking... I used a hack jow made at some point on my UBI targets
> to solve this for now 
> https://www.gitorious.org/openwrt-oxnas/openwrt-oxnas/commit/ac14e2e15f99c90f38addb12074579763e3dd62a
>
>  It's nice to see that you made a nicer solution for this problem
> and I gave it a shot on my targets with good results.
> 
> I got some comments which I will write as reply to the individual
> patches.
> 
> 
> Cheers
> 
> Daniel
> 
> On 05/22/2014 10:16 PM, André Valentin wrote:
>> 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
> 
> 
> 
> ___ openwrt-devel
> mailing list openwrt-devel@lists.openwrt.org 
> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
> 
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH 0/3] RFC: Enable sysupgrade on ubifs rootfs

2014-05-23 Thread Daniel
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi André,

I'm also working a lot on UBI(fs) support lately. First of all, a patch like
this one is needed also for squashfs on ubiblock or any platform with a root
device which actually got some sort of locking...
I used a hack jow made at some point on my UBI targets to solve this for now
https://www.gitorious.org/openwrt-oxnas/openwrt-oxnas/commit/ac14e2e15f99c90f38addb12074579763e3dd62a

It's nice to see that you made a nicer solution for this problem and I gave it
a shot on my targets with good results.

I got some comments which I will write as reply to the individual patches.


Cheers

Daniel

On 05/22/2014 10:16 PM, André Valentin wrote:
> 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
> 


- -- 
ALLNET GmbH ; Maistr. 2 ; D-82110 Germering ; Germany
Tel. +49-89-89422217 - Fax +49-89-89422233
http://www.allnet.de
email: Daniel Golle 
Schulungs-/Veranstaltungsprogramm: http://www.802lab.de
Geschäftsführer: Wolfgang Marcus Bauer
Handelsregister München B 95922 ; UST-ID-Nr. DE 128214294 ;
St.-Nr.117/115/00164
WEEE-Reg.-NR. DE 13101093
Bankverbindung:
Sparkasse Fürstenfeldbruck KTO: 2774594 ; BLZ: 70053070
Swift-Code: BYLADEM1FFB ; IBAN: DE6170053072774594
-BEGIN PGP SIGNATURE-
Version: GnuPG v2.0.22 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQEcBAEBAgAGBQJTf0G7AAoJECBgbL4bcbCQ2ocH/iWyHW8Iv2DZCejV9HgY/8j/
JjzZNJ9Ql9ha2CtSKGItzN47ZqKAUBL/Re3CjdX1Bx4AIH4MiCICNXSgXRmY3Uh0
51V6jWoAMV2wgGvCeaKgkhmu2UYgt35UKDGWbj+OrKkyUiiXBH+cwelTLuwWf7Xu
7m97GhMjjOJ0HMKfXPRsBzIOABEcUAityVU9DM96L+ozXx8y9b/jI2cLXVLJlaxD
pbQIxgsZC9zdGcNHRjpPsbHfEUto/4z37cvPBu+r1CeiMi2kJ0ZzXQUdixXcj5QQ
+qhU8Mmr63CpfKNQLwMxeSp9H5Qb0zxCV7lYyTciOwIHHJVpWNEHz7Vxjq9YDgg=
=UdAn
-END PGP SIGNATURE-
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 0/3] RFC: Enable sysupgrade on ubifs rootfs

2014-05-22 Thread André Valentin
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
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel