Re: [OpenWrt-Devel] [PATCH 1/3] kirkwood: Pogoplug E02 kernel support for 3.14
Hi Felix, On Thu, May 22, 2014 at 10:12:53PM +0200, Felix Kaechele wrote: this also fixes a typo in the UBIFS_OPTS Signed-off-by: Felix Kaechele hef...@fedoraproject.org --- .../kirkwood/patches-3.14/150-pogoplug_e02.patch | 127 + target/linux/kirkwood/profiles/120-pogoplug.mk | 2 +- 2 files changed, 128 insertions(+), 1 deletion(-) create mode 100644 target/linux/kirkwood/patches-3.14/150-pogoplug_e02.patch Applied in r40827. Thanks! +--- /dev/null b/arch/arm/boot/dts/kirkwood-pogo_e02.dts When sending this upstream you might want to add your name here... Luka ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH 3/3] package: uboot-envtools: add Pogoplug E02 support
Hi Felix, On Thu, May 22, 2014 at 10:12:55PM +0200, Felix Kaechele wrote: The settings require that the OpenWrt provided u-boot is used as either first or second stage bootloader as it modifies the partitioning scheme to move the u-boot environment to a separate mtd partition. Signed-off-by: Felix Kaechele hef...@fedoraproject.org --- package/boot/uboot-envtools/files/kirkwood | 1 + 1 file changed, 1 insertion(+) Applied in r40829. Thanks! Luka ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] ideal battery for solar nodes?
* valent.turko...@gmail.com valent.turko...@gmail.com [23.05.2014 11:22]: So 92Ah is much too big, but is 7Ah too small? Does anybody have experience with batteries and solar power? i have and: it depends (TM) look out for you _local_ Solar Radiation and Temperature. here in Germany during wintertime we have no useable sun for up to 4 weeks at -30 celsius-degrees... bye, bastian ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH] kernel: other.mk: add pps-gpio support
Hi Tim, On Wed, May 21, 2014 at 10:25:32AM -0700, Tim Harvey wrote: The pps-gpio kernel module supports Pulse-Per-Second provided by a GPIO. Signed-off-by: Tim Harvey thar...@gateworks.com --- package/kernel/linux/modules/other.mk | 16 1 file changed, 16 insertions(+) Applied with minor changes in r40831. Thanks! Luka ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] ideal battery for solar nodes?
might be helpfull http://wiki.freifunk.net/Mobiler_UMTS-Router sorry for german, but site is only german... cheers martin 2014-05-23 11:28 GMT+02:00 Bastian Bittorf bitt...@bluebottle.com: * valent.turko...@gmail.com valent.turko...@gmail.com [23.05.2014 11:22]: So 92Ah is much too big, but is 7Ah too small? Does anybody have experience with batteries and solar power? i have and: it depends (TM) look out for you _local_ Solar Radiation and Temperature. here in Germany during wintertime we have no useable sun for up to 4 weeks at -30 celsius-degrees... bye, bastian ___ 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] ideal battery for solar nodes?
Can you specify the usage(in Watts) of these equipment you mentioned and voltage ? A 50W solar panel looks Ok, but you need to calculate the usage in Amps so you can find out how long the battery of that capacity can run without sun and you need the Watts and Voltage for that. Fernando On 23/05/2014 09:58, valent.turko...@gmail.com wrote: How do you calculate ideal battery for solar nodes? I know that it depends on how much routers there are planned. But for example let's use solar node that has one nanostation nanobridge for unplink and picostation for AP. I guess that 50W solar panel should be enough, right? But how big should the battery be? Is 7Ah enough? At my company we use 92Ah batteries for powering ADSL DSLAMs, and are replacing then now with new ones. Using a too big battery is also not advised because then you need much bigger solar panels because lead battery also looses lots of power due it's internal resistance. So 92Ah is much too big, but is 7Ah too small? Does anybody have experience with batteries and solar power? ___ 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] ideal battery for solar nodes?
Well, without the Watts or Current consumed it's impossible to make any estimations. Just a rough guess based on other people's usage as you mentioned below. Fernando On 23/05/2014 12:47, heini66 wrote: the wr741 is running with 5v dc. i talked to the user and he toled me, it is possible to opperate the mobile ap for 5-6h, belonging how much trafic is running on it. sorry, i can't tell somthing about the current.( don't own one to get a messurement ) but when he is able to work with 4 aa mignon for 5-6h, it can't be that much. 2014-05-23 12:40 GMT+02:00 Fernando Frediani fhfredi...@gmail.com mailto:fhfredi...@gmail.com: Can you specify the usage(in Watts) of these equipment you mentioned and voltage ? A 50W solar panel looks Ok, but you need to calculate the usage in Amps so you can find out how long the battery of that capacity can run without sun and you need the Watts and Voltage for that. Fernando On 23/05/2014 09:58, valent.turko...@gmail.com mailto:valent.turko...@gmail.com wrote: How do you calculate ideal battery for solar nodes? I know that it depends on how much routers there are planned. But for example let's use solar node that has one nanostation nanobridge for unplink and picostation for AP. I guess that 50W solar panel should be enough, right? But how big should the battery be? Is 7Ah enough? At my company we use 92Ah batteries for powering ADSL DSLAMs, and are replacing then now with new ones. Using a too big battery is also not advised because then you need much bigger solar panels because lead battery also looses lots of power due it's internal resistance. So 92Ah is much too big, but is 7Ah too small? Does anybody have experience with batteries and solar power? ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org mailto:openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org mailto: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 v5] ppp: add new protocol PPPoSSH.
Hi, Joshua and list. On 23 May 2014 11:42, Joshua Judson Rosen jro...@harvestai.com wrote: On 2014-05-22 20:17, Yousong Zhou wrote: I am using PPPoSSH with ipset-enabled dnsmasq [1] mainly for accessing and accelerating the speed of several websites. Well, I myself quite enjoy the outcome. PPPoSSH will not accelerate anything, at best it will allow you to hide your packets from traffic shaping firewalls that artificially slow down your connections. For this purpose, you would be far better suited by using the port forwarding features of SSH. My network environment is a limited one. PPPoSSH is only used as an alternative route to sites that are either blocked completely by the ISP, or speed-limited by the campus network admin. The SSH server I use can provide better experience than without it. [...] I still use local/remote/dynamic port forwarding a lot. SOCKS proxy is different in that you have to configure every client that need it. In addition to that, devices like smart phones and tablets cannot use SOCKS proxy in an easy way. I prefer PPP over PTY because it will provide more flexibility. Depending on what sort of resources your device has: if you can run openssh (dropbear doesn't appear to support this, AFAICT), there's also built-in support in that (since version 4.3) for exactly the sort of thing you want, using tun devices (ssh -w), without the recursive TCP issues. (maybe you've already looked at that option; I figured it's worth mentioning just in case) It's a TL-WR720N-v3 box with 4MB flash memory. But PPPoSSH works for me, so I didn't bother trying the OpenSSH's feature on tun device :) It surly should work as it is also used in the pvpn project. Thanks for the input. Regards. yousong -- 'tis an ill wind that blows no minds. ___ 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
-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 dgo...@allnet.de Schulungs-/Veranstaltungsprogramm: http://www.802lab.dehttp://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
Re: [OpenWrt-Devel] [PATCH 1/3] procd: add support for running sysupgrade as PID 1
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 05/22/2014 10:16 PM, André Valentin wrote: Signed-off-by: André Valentin avalen...@marcant.net --- package/system/procd/patches/100-sysupgrade.patch | 73 + 1 file changed, 73 insertions(+) create mode 100644 package/system/procd/patches/100-sysupgrade.patch diff --git a/package/system/procd/patches/100-sysupgrade.patch b/package/system/procd/patches/100-sysupgrade.patch new file mode 100644 index 000..dbe9e5d --- /dev/null +++ b/package/system/procd/patches/100-sysupgrade.patch @@ -0,0 +1,73 @@ +diff -uNrp procd-2014-03-18.orig/procd.h procd-2014-03-18/procd.h +--- procd-2014-03-18.orig/procd.h 2014-03-21 10:15:26.0 +0100 procd-2014-03-18/procd.h 2014-05-20 22:09:35.0 +0200 +@@ -36,6 +36,7 @@ void ubus_init_system(struct ubus_contex + + void procd_state_next(void); + void procd_shutdown(int event); ++void procd_sysupgrade_as_init(int event); + void procd_early(void); + void procd_preinit(void); + void procd_coldplug(void); +diff -uNrp procd-2014-03-18.orig/system.c procd-2014-03-18/system.c +--- procd-2014-03-18.orig/system.c2014-03-21 10:15:26.0 +0100 procd-2014-03-18/system.c 2014-05-20 22:12:17.0 +0200 +@@ -195,6 +195,50 @@ static int system_upgrade(struct ubus_co + } + + enum { ++ UPG_COMMAND, ++ UPG_ARGUMENTS, ++ __UPG_MAX ++}; ++ ++static const struct blobmsg_policy upgrade_policy[__UPG_MAX] = { ++ [UPG_COMMAND] = { .name = command, .type = BLOBMSG_TYPE_STRING }, ++ [UPG_ARGUMENTS] = { .name = arguments, .type = BLOBMSG_TYPE_STRING }, Be careful! sysupgrade parses the arguments and opens files relative to the current working directory $PWD. While just passing through the arguments string does work for absolute path names, it will NOT work for relative paths if $PWD of procd != $PWD of sysupgrade Probably the best is to pass the arguments as single fields in the blobmsg instead of passing a string which is later on interpreted by the shell. [UPG_IMAGE] = { .name = images, .type = BLOBMSG_TYPE_STRING }, [UPG_SAVECONFIG] = { .name = saveconfig, .type = BLOBMSG_TYPE_BOOL }, ++}; ++ ++static int system_upgrade_as_init(struct ubus_context *ctx, struct ubus_object *obj, ++ struct ubus_request_data *req, const char *method, ++ struct blob_attr *msg) ++{ ++ struct blob_attr *tb[__UPG_MAX]; ++const char *cmd; ++ const char *args; ++ ++ if (!msg) ++ return UBUS_STATUS_INVALID_ARGUMENT; ++ ++blobmsg_parse(upgrade_policy, __UPG_MAX, tb, blob_data(msg), blob_len(msg)); these two lines are indented with spaces instead of tabs: ++ if (!tb[UPG_COMMAND] || !tb[UPG_ARGUMENTS]) ++ return UBUS_STATUS_INVALID_ARGUMENT; ++ ++ cmd = strdup(blobmsg_get_string(tb[UPG_COMMAND])); ++ args = strdup(blobmsg_get_string(tb[UPG_ARGUMENTS])); ++ ++ if (!cmd || !strlen(cmd)) { ++LOG(sysupgrade command should not be empty!); ++ return 0; ++ } ++ ++ upgrade_running = 1; ++ LOG(Running sysupgrade as init, cmd: '%s %s'\n, cmd, args); ++ procd_inittab_run(shutdown); ++ if (args strlen(args)) { ++ execl(cmd, cmd, args , (char *) 0); ++ } ++ execl(cmd, cmd, (char *) 0); ++ return 0; ++} ++ ++enum { + WDT_FREQUENCY, + WDT_TIMEOUT, + WDT_STOP, +@@ -296,6 +337,7 @@ static const struct ubus_method system_m + UBUS_METHOD_NOARG(board, system_board), + UBUS_METHOD_NOARG(info, system_info), + UBUS_METHOD_NOARG(upgrade, system_upgrade), ++ UBUS_METHOD(upgrade_as_init, system_upgrade_as_init, upgrade_policy), + UBUS_METHOD(watchdog, watchdog_set, watchdog_policy), + UBUS_METHOD(signal, proc_signal, signal_policy), + }; -BEGIN PGP SIGNATURE- Version: GnuPG v2.0.22 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBAgAGBQJTf0TyAAoJECBgbL4bcbCQYscH/R9D6e0fNkreS1sc+YoDCXG/ JkuN3j0iVR4/BQFl0W2Bn2L5g392BL0HjFPBDV/M+CDH9Iy0XlDLiAf2k3bJgVsJ HOWglRWU7OXT/tYgJfpzRqtHJSm1bgH5amMZp7MPhU8KWtPWrI7y7MZYmGpE6kfS vSjE45WWUVSO9OZfoqgz7t6y+OO4IhEFkEx547HKwEdj56BIH6qL7foia/hQC0sC VK/aFr1bRBlqM8t4u4dpRrlrltkz7OLBQydcWwnivgpmtmGNGseZwNq5BW6QVHlN vSfbGXFrbJJaWrqn/U3Ui2Ew0rPdI5tIzQQod4TjT5lMG0A6MVY2wy1g6hb5QRA= =n18c -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 2/3] sysupgrade: add support for running sysupgrade as PID 1
On 05/22/2014 10:16 PM, André Valentin wrote: diff --git a/package/base-files/files/sbin/sysupgrade b/package/base-files/files/sbin/sysupgrade index 479cbad..5159367 100755 --- a/package/base-files/files/sbin/sysupgrade +++ b/package/base-files/files/sbin/sysupgrade @@ -19,6 +19,8 @@ export NEED_IMAGE= export HELP=0 export FORCE=0 export TEST=0 +export RUN_AS_INIT=0 +export ALL_ARGS=$* # parse options while [ -n $1 ]; do @@ -33,6 +35,7 @@ while [ -n $1 ]; do -r|--restore-backup) export CONF_RESTORE=$2 NEED_IMAGE=1; shift;; -l|--list-backup) export CONF_BACKUP_LIST=1; break;; -f) export CONF_IMAGE=$2; shift;; + -s) export RUN_AS_INIT=1;; I think it should be the default. -F|--force) export FORCE=1;; -T|--test) export TEST=1;; -h|--help) export HELP=1; break;; @@ -62,6 +65,9 @@ upgrade-option: -i interactive mode -c attempt to preserve all changed files in /etc/ -n do not save configuration over reflash +-s run the upgrade process as init (PID 0) + this allows ubifs upgrades i.e. + important: use full image path like /tmp/xx.bin same. -T | --test Verify image and config .tar.gz but do not actually flash. -F | --force @@ -220,6 +226,13 @@ if [ $TEST -eq 1 ]; then exit 0 fi +# should we inform procd to run this script +if [ $RUN_AS_INIT -eq 1 ] [ $$ -ne 1 ]; then same. +ubus call system upgrade_as_init \ +'{ command: /sbin/sysupgrade, arguments: '$ARGV' }' I reckon the best would be to use the running userspace to acquire the upgrade image (in case it's not a local file sitting under /tmp, e.g. http urls do work right now!), and pass the filename as an absolute path in the ubus call. +exit 0 +fi + run_hooks $sysupgrade_pre_upgrade ubus call system upgrade ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH 3/3] bcm53xx_brcm: add sysupgrade support
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 I built a quite feature-complete and by now well-working sysupgrade for the oxnas fork https://www.gitorious.org/openwrt-oxnas/openwrt-oxnas/source/8d0f5e4025d5d9d2c129914b59c03d7c2cde5d93:target/linux/oxnas/base-files/lib/upgrade/platform.sh I re-based it to use your sysupgrade -s code instead of the SIGUSR2-hack I was using before -- works great. The script handles both, combined kernel+rootfs images as well as ubnized images. Other targets where e.g. kernel needs to be started in bare NAND rather than inside an ubi volume due to the lack of bootloader support, this can easily be added by having do_upgrade_combined white the kernel via nandwrite and initialize the filesystems in UBI. -BEGIN PGP SIGNATURE- Version: GnuPG v2.0.22 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBAgAGBQJTf0c6AAoJECBgbL4bcbCQCEEH+QFT2jHzMaV8wep6A7lea3ia F5KpShmiWl198JPUJdiLSTaKGX6drT33x8HuS6mi8Il5SGYu4JEvFdpI4S4RLfDI mHMXTzl+zk1Te+2MMh9V3wGGDX3kt3ms1hRj2CD5dzim7hG3q32h2eYsE++yfsPx FyDJctLsTcu2qPaW4quFfrkBhw5dhrJGFl2XUwUmfuH/kYcnY3dbejqw4Ivu6jB8 sGxJMoPhh1K8qjjynbiwuiBQ+9++u/XroSqtI/Qastq5/ZUsWZiFKk28l+SuoZCa d85WhF1D64gdicp0DJmD8T8MtyqDWTYwIlnjnuia4SctoqoVoCINqtWurZ2Cu1M= =3iUC -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
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
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 1/3] procd: add support for running sysupgrade as PID 1
On 2014-05-22 22:16, André Valentin wrote: Signed-off-by: André Valentin avalen...@marcant.net --- package/system/procd/patches/100-sysupgrade.patch | 73 + 1 file changed, 73 insertions(+) create mode 100644 package/system/procd/patches/100-sysupgrade.patch I agree with the general approach, but I'd like you to make a few changes to it: - submit it as a patch to procd git instead of openwrt - rename the command to 'exec' or something like that. It could be used for more than just sysupgrade. - make arguments a string array and maybe combine it with command - maybe add an optional attribute for the directory to chdir() into (because of what daniel pointed out wrt. relative image path) - Felix ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] What openwrt router would do when one connected station is out of range
Dear Sir Any one please tell me What openwrt router would do when one connected station is out of range? Because router can't receive any respone from this station, if it would continue to send packets to this station? And how to capture the wireless log to debug router's action in this scene? Thanks! bjzhougong ___ 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
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 1/3] procd: add support for running sysupgrade as PID 1
On 23/05/2014 15:16, Felix Fietkau wrote: I agree with the general approach, but I'd like you to make a few changes to it: - submit it as a patch to procd git instead of openwrt - rename the command to 'exec' or something like that. It could be used for more than just sysupgrade. - make arguments a string array and maybe combine it with command - maybe add an optional attribute for the directory to chdir() into (because of what daniel pointed out wrt. relative image path) - Felix i'll do that while merging it. i saw 2-3 other details aswell that i want to look into John ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] ideal battery for solar nodes?
Depending on the type of node usage would be 5, 10 and 15W for three typical nodes. Hope this helps. -- follow me - www.twitter.com/valentt http://kernelreloaded.blog385.com linux, anime, spirituality, wireless, scuba, linuxmce smart home, zwave ICQ: 2125241, Skype: valent.turkovic, MSN: valent.turko...@hotmail.com ___ 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
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
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
[OpenWrt-Devel] [PATCH] Creating root default password in buildroot via menuconfig
Hi everybody, to deploy minimal OpenWrt images on multiple routers it is necessary to set a root password, while building the deployable file. Therefore i added a patch that is setting a default password in the /etc/shadow file of the base-files package. It is using the openssl command of the building host to create the hash of the password. Here are the diff files for both the current development branch (Barrier Braker) and the 12.09 branch..please add the patches to both branches, to be able to use it in the currently stable release as well. *12.09-branch (http://git.openwrt.org/?p=12.09/openwrt.git;a=summary):* Signed-off-by: Benjamin Pflueg b...@bensbox.de --- diff --git a/package/base-files/Makefile b/package/base-files/Makefile index 2152edd..db72656 100644 --- a/package/base-files/Makefile +++ b/package/base-files/Makefile @@ -9,6 +9,7 @@ include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/kernel.mk include $(INCLUDE_DIR)/version.mk +include $(INCLUDE_DIR)/baseconf.mk PKG_NAME:=base-files PKG_RELEASE:=118.2 @@ -113,6 +114,11 @@ define Package/base-files/install $(1)/etc/openwrt_version \ $(1)/etc/openwrt_release +$(if $(filter $(BASECONF_ROOT_PASSWORD),x), \ +$(SED) 's/%P/x/g' $(1)/etc/shadow, \ +$(SED) 's/%P/$(shell $(OPENSSL) passwd -1 $(BASECONF_ROOT_PASSWORD) | $(SED_PLAIN) -e 's/[/.$$^]/\\/g' | $(SED_PLAIN) -e 's/\$$/\$$\$$/g')/' $(1)/etc/shadow \ +) + mkdir -p $(1)/CONTROL mkdir -p $(1)/dev mkdir -p $(1)/etc/crontabs diff --git a/package/base-files/files/etc/shadow b/package/base-files/files/etc/shadow index e989890..f35be79 100644 --- a/package/base-files/files/etc/shadow +++ b/package/base-files/files/etc/shadow @@ -1,4 +1,4 @@ -root:x:0:0:9:7::: +root:%P:0:0:9:7::: daemon:*:0:0:9:7::: ftp:*:0:0:9:7::: network:*:0:0:9:7::: diff --git a/package/base-files/image-config.in b/package/base-files/image-config.in index 1371356..79dee49 100644 --- a/package/base-files/image-config.in +++ b/package/base-files/image-config.in @@ -184,3 +184,19 @@ menuconfig VERSIONOPT %d .. Distribution name or openwrt, lowercase %T .. Target name %S .. Target/Subtarget name + +menuconfig BASECONFOPT +bool Base system configurations if IMAGEOPT +default n +help +In here you can set configurations like a default root password. +They are suppose to be very basic and default settings to the +vanilla OpenWRT firmware. + +config BASECONF_ROOT_PASSWORD +string +prompt Custom default root password if BASECONFOPT +help +Usually the firmware does not have the root password set. +Here you can set a default one, that will be in effect +even after a factory reset. diff --git a/rules.mk b/rules.mk index e657eec..8c5d2c2 100644 --- a/rules.mk +++ b/rules.mk @@ -182,9 +182,11 @@ TARGET_AR:=$(TARGET_CROSS)ar TARGET_RANLIB:=$(TARGET_CROSS)ranlib TARGET_CXX:=$(if $(CONFIG_INSTALL_LIBSTDCPP),$(TARGET_CROSS)g++,no) KPATCH:=$(SCRIPT_DIR)/patch-kernel.sh -SED:=$(STAGING_DIR_HOST)/bin/sed -i -e +SED_PLAIN:=$(STAGING_DIR_HOST)/bin/sed +SED:=$(SED_PLAIN) -i -e CP:=cp -fpR LN:=ln -sf +OPENSSL:=openssl INSTALL_BIN:=install -m0755 INSTALL_DIR:=install -d -m0755 diff --git a/include/baseconf.mk b/include/baseconf.mk new file mode 100644 index 000..ad8db58 --- /dev/null +++ b/include/baseconf.mk @@ -0,0 +1,6 @@ + +PKG_CONFIG_DEPENDS += \ +CONFIG_BASECONF_ROOT_PASSWORD + +BASECONF_ROOT_PASSWORD:=$(call qstrip,$(CONFIG_BASECONF_ROOT_PASSWORD)) +BASECONF_ROOT_PASSWORD:=$(if $(BASECONF_ROOT_PASSWORD),$(BASECONF_ROOT_PASSWORD),x) *devel-branch (http://git.openwrt.org/?p=openwrt.git;a=summary):* Signed-off-by: Benjamin Pflueg b...@bensbox.de --- diff --git a/package/base-files/Makefile b/package/base-files/Makefile index 207af35..494047e 100644 --- a/package/base-files/Makefile +++ b/package/base-files/Makefile @@ -9,6 +9,7 @@ include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/version.mk include $(INCLUDE_DIR)/kernel.mk +include $(INCLUDE_DIR)/baseconf.mk PKG_NAME:=base-files PKG_RELEASE:=152 @@ -113,6 +114,11 @@ define Package/base-files/install $(1)/etc/openwrt_version \ $(1)/etc/openwrt_release +$(if $(filter $(BASECONF_ROOT_PASSWORD),x), \ +$(SED) 's/%P/x/g' $(1)/etc/shadow, \ +$(SED) 's/%P/$(shell $(OPENSSL) passwd -1 $(BASECONF_ROOT_PASSWORD) | $(SED_PLAIN) -e 's/[/.$$^]/\\/g' | $(SED_PLAIN) -e 's/\$$/\$$\$$/g')/' $(1)/etc/shadow \ +) + mkdir -p $(1)/CONTROL mkdir -p $(1)/dev mkdir -p $(1)/etc/crontabs diff --git a/package/base-files/files/etc/shadow b/package/base-files/files/etc/shadow index 4b4154f..f35be79 100644 --- a/package/base-files/files/etc/shadow +++ b/package/base-files/files/etc/shadow @@
Re: [OpenWrt-Devel] ideal battery for solar nodes?
See if this helps: http://translate.google.com/translate?hl=ensl=pttl=enu=http%3A%2F%2Fforum.wirelesspt.net%2Fviewtopic.php%3Ff%3D23%26t%3D730sandbox=1 http://translate.google.com/translate?hl=ensl=autotl=enu=http%3A%2F%2Fwirelesspt.net%2Fwiki%2FEnergia_Solar On 05/23/2014 04:58 AM, valent.turko...@gmail.com wrote: How do you calculate ideal battery for solar nodes? I know that it depends on how much routers there are planned. But for example let's use solar node that has one nanostation nanobridge for unplink and picostation for AP. I guess that 50W solar panel should be enough, right? But how big should the battery be? Is 7Ah enough? At my company we use 92Ah batteries for powering ADSL DSLAMs, and are replacing then now with new ones. Using a too big battery is also not advised because then you need much bigger solar panels because lead battery also looses lots of power due it's internal resistance. So 92Ah is much too big, but is 7Ah too small? Does anybody have experience with batteries and solar power? ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel 0x15C4B382.asc Description: application/pgp-keys ___ 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
-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
[OpenWrt-Devel] [PATCH][bcm63xx]: Support for Comtrend VR-3025u and VR-3025un.
Support for Comtrend VR-3025u and VR-3025un. This patch adds support for both VR-3025u and VR-3025un. Due to these routers are very close in terms of board definitions because the only differences are a led name and the board_id, the patch covers both boards. Signed off by: José Vázquez Fernández ppvazquez...@gmail.com Signed off by: Álvaro Fernández nolt...@gmail.com Index: target/linux/brcm63xx/image/Makefile === --- target/linux/brcm63xx/image/Makefile(revisión: 40826) +++ target/linux/brcm63xx/image/Makefile(copia de trabajo) @@ -190,6 +190,10 @@ $(call Image/Build/CFE,$(1),96368MVNgr,6368,96368MVNgr-generic) $(call Image/Build/CFE,$(1),96368MVWG,6368,96368MVWG-generic) + # Comtrend VR-3025xx + $(call Image/Build/CFE,$(1),96368M-1541N,6368,VR-3025u,,--pad 16) + $(call Image/Build/CFE,$(1),96368M-1341N,6368,VR-3025un,,--pad 4) + # Asmax AR 1004g $(call Image/Build/CFEFIXUP,$(1),96348GW-10,AR1004G,6348,AR1004G) # BT Voyager V210_BTR Index: target/linux/brcm63xx/patches-3.10/561-VR_3025.patch === --- target/linux/brcm63xx/patches-3.10/561-VR_3025.patch(revisión: 0) +++ target/linux/brcm63xx/patches-3.10/561-VR_3025.patch(revisión: 0) @@ -0,0 +1,202 @@ +--- a/arch/mips/bcm63xx/boards/board_bcm963xx.c b/arch/mips/bcm63xx/boards/board_bcm963xx.c +@@ -4334,6 +4334,190 @@ static struct board_info __initdata boar + * known 6368 boards + */ + #ifdef CONFIG_BCM63XX_CPU_6368 ++static struct board_info __initdata board_VR3025u = { ++ .name = 96368M-1541N, ++ .expected_cpu_id= 0x6368, ++ ++ .has_uart0 = 1, ++ .has_pci= 1, ++ .has_ohci0 = 1, ++ .has_ehci0 = 1, ++ ++ .has_enetsw = 1, ++ .enetsw = { ++ .used_ports = { ++ [0] = { ++ .used = 1, ++ .phy_id = 1, ++ .name = port1, ++ }, ++ [1] = { ++ .used = 1, ++ .phy_id = 2, ++ .name = port2, ++ }, ++ [2] = { ++ .used = 1, ++ .phy_id = 3, ++ .name = port3, ++ }, ++ [3] = { ++ .used = 1, ++ .phy_id = 4, ++ .name = port4, ++ }, ++ }, ++ }, ++ ++ .leds = { ++ { ++ .name = VR-3025u:green:dsl, ++ .gpio = 2, ++ .active_low = 1, ++ }, ++ { ++ .name = VR-3025u:green:inet, ++ .gpio = 5, ++ }, ++ { ++ .name = VR-3025u:green:lan1, ++ .gpio = 6, ++ .active_low = 1, ++ }, ++ { ++ .name = VR-3025u:green:lan2, ++ .gpio = 7, ++ .active_low = 1, ++ }, ++ { ++ .name = VR-3025u:green:lan3, ++ .gpio = 8, ++ .active_low = 1, ++ }, ++ { ++ .name = VR-3025u:green:lan4, ++ .gpio = 9, ++ .active_low = 1, ++ }, ++ { ++ .name = VR-3025u:green:power, ++ .gpio = 22, ++ .default_trigger = default-on, ++ }, ++ { ++ .name = VR-3025u:red:power, ++ .gpio = 24, ++ }, ++ { ++ .name = VR-3025u:red:inet, ++ .gpio = 31, ++ }, ++ }, ++ ++ .buttons = { ++ { ++ .desc = reset, ++ .gpio = 34, ++ .type = EV_KEY, ++ .code = KEY_RESTART, ++ .debounce_interval =
Re: [OpenWrt-Devel] [PATCH 3/3] bcm53xx_brcm: add sysupgrade support
Hi ! On 23.05.2014 15:03, Daniel wrote: I built a quite feature-complete and by now well-working sysupgrade for the oxnas fork https://www.gitorious.org/openwrt-oxnas/openwrt-oxnas/source/8d0f5e4025d5d9d2c129914b59c03d7c2cde5d93:target/linux/oxnas/base-files/lib/upgrade/platform.sh That looks good! I re-based it to use your sysupgrade -s code instead of the SIGUSR2-hack I was using before -- works great. Nice to hear that you used it and that it works ! The script handles both, combined kernel+rootfs images as well as ubnized images. Other targets where e.g. kernel needs to be started in bare NAND rather than inside an ubi volume due to the lack of bootloader support, this can easily be added by having do_upgrade_combined white the kernel via nandwrite and initialize the filesystems in UBI. Perfect. That make life a lot easier for me. Did you already think about moving the generic stuff to the some kind of ubi include for /lib/upgrade ? Would make sense, specially for newer boards. -- 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
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
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 1/3] procd: add support for running sysupgrade as PID 1
Hi ! On 23.05.2014 15:16, Felix Fietkau wrote: - submit it as a patch to procd git instead of openwrt - rename the command to 'exec' or something like that. It could be used for more than just sysupgrade. - make arguments a string array and maybe combine it with command - maybe add an optional attribute for the directory to chdir() into (because of what daniel pointed out wrt. relative image path) Thanks for taking a look. I totally agree to the points you made. I also was unsure if this exec as init function should be some kind of general stuff. The first thing I thought of was resizing the rootfs volume, or swapping it,... But I will not continue the generic part as you perhaps read. -- André ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel