Re: [OpenWrt-Devel] Device tree issues with TL-WDR4900 (mpc85xx) and kernel 4.0.1

2015-06-11 Thread Roman Yeryomin
On 7 May 2015 at 15:49, Felix Fietkau n...@openwrt.org wrote:
 On 2015-05-07 08:01, Wojciech Dubowik wrote:
 Try to boot with kernel locking enabled. I have seen jffs2 deadlocks on
 readdir. As far as I remember
 with this patch it went through but I don't know anymore whether I have
 changed sth in config.

 Have a look at (search engine...) [PATCH] fs: jffs2: Add setup code for
 spi nor flash.

 Even with this patch I got some possible dead lock warnings so it might
 be just a partial cure. BTW it's
 a bit scary for future use. Looks like jffs2 doesn't get enough care...
 I believe the locking issues are an overlayfs regression, maybe even
 the same one as this one (which I fixed years ago):
 http://linux-fsdevel.vger.kernel.narkive.com/XRtXLDlf/patch-1-2-overlayfs-fix-a-deadlock-in-ovl-dir-read-merged

 I believe this is the cause of the regression:

 commit 49c21e1cacd74a8c83407c70ad860c994e606e25
 Author: Miklos Szeredi mszer...@suse.cz
 Date:   Sat Dec 13 00:59:42 2014 +0100


I'm working on 4.0 support for ar71xx and found that
/etc/rc.d/S00sysfixtime is not able to finish it's job after second
boot after flashing (t.i. after overlayfs is switched to jffs). I've
run strace and found that find hangs on the very last getdents64 call
(before calling it succesfully many times on previous
files/directories).
I've reverted every change up to
49c21e1cacd74a8c83407c70ad860c994e606e25 to overlayfs and it started
working. Applying 49c21e1cacd74a8c83407c70ad860c994e606e25 back breaks
it. So this commit is indeed the cause of regression.

Miklos, any ideas how to fix it in current tree? I'm using 4.0.5 now
but AFAIK there were no more changes to overlayfs.


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


Re: [OpenWrt-Devel] Ralink MT76228 port to Linux 4.0, set new IP address fail

2015-06-11 Thread Roman Yeryomin
On 11 June 2015 at 16:36, Baptiste Clenet bapcle...@gmail.com wrote:
 Hi,

 I've edited patches from Linux 3.18 to make the MT7628 work with Linux 4.0.
 OpenWRT launches, I have access to the shell.
 Next step, I configure the IP address with /etc/config/network and
 /etc/init.d/network reload. Ifconfig shows me my new address IP.

 But, I can't connect via ssh to my board and if I reboot the board, I
 get errors at boot:
 [   10.23] jffs2: jffs2_scan_inode_node(): CRC failed on node at
 0x004725bc: Read 0x, calculated 0x149094b5
 I would say it appears one hundred times with different calculated CRC.
 and finally the last line is:
 [   11.00] jffs2: notice: (305) jffs2_build_xattr_subsystem:
 complete building xattr subsystem, 0 of xdatum (0 unchecked, 0 orphan)
 and 0 of xref (0 dead, 0 orphan) found.


 Then, I'm able to access to the shell but I still can't connect via
 ssh. The board constantly reports:

 [ 2410.01] ralink_soc_eth 1010.ethernet eth0: transmit timed out
 [ 2410.02] ralink_soc_eth 1010.ethernet eth0: dma_cfg:0055
 [ 2410.03] ralink_soc_eth 1010.ethernet eth0: tx_ring=0,
 base=00dce000, max=128, ctx=126, dtx=126, fdx=123
 [ 2410.05] ralink_soc_eth 1010.ethernet eth0: rx_ring=0,
 base=01a36000, max=128, calc=121, drx=54
 [ 2415.01] ralink_soc_eth 1010.ethernet eth0: transmit timed out
 [ 2415.02] ralink_soc_eth 1010.ethernet eth0: dma_cfg:0055
 [ 2415.03] ralink_soc_eth 1010.ethernet eth0: tx_ring=0,
 base=00dce000, max=128, ctx=126, dtx=126, fdx=123
 [ 2415.05] ralink_soc_eth 1010.ethernet eth0: rx_ring=0,
 base=01a36000, max=128, calc=121, drx=60

 It seems to be related to ethernet driver. Does anyone know those errors?


I have the transmit queue time out error on ar71xx with 4.0.5 also.
Situation is very similar because ralink and ar71xx ethernet drivers
are maintained in OpenWrt only.
I believe it is related to recent timer/clock changes in kernel (in
3.19 AFAIK). But I don't know neither timers nor network Linux stack
so well to tell what/where is the problem exactly.

If somebody with more experience could point to a possible place to
look at that would be awesome.


Regards,
Roman
___
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] ppp: Unnumbered support

2015-06-11 Thread Hans Dedecker
On Wed, Jun 10, 2015 at 8:42 PM, Steven Barth cy...@openwrt.org wrote:
 I just pushed
 http://git.openwrt.org/?p=project/netifd.git;a=commit;h=5cf30b59baa03db2448570c78e7e92873555d2ec
 (not yet bumped in trunk) which allows generic dependencies to
 interfaces by using an empty address, with that you can add a host
 dependency and once fulfilled
 use network_* to get the addresses.

 Please let me know if that works for you.
I have been testing the PPP unnumbered scenario in combination with
the netifd patch and the interface dependency  works as expected.
An updated version of the PPP patch will follow soon.

Thx,
Hans


 Cheers,

 Steven

 On 10.06.2015 14:52, Steven Barth wrote:



 UCI is read as network_get_subnets only returns info for active
 interfaces; e.g. if the referred interface in the unnumbered parameter
 is down it's not possible to install the host dependency based on the
 IP address for the PPP interface.
 Did not (yet) find a way to circumvent this issue.

 Understood, I think the sane way around here would be to add a
 host_dependency on the interface itself (without a specific IP-address).
 Let me see if this can be added to netifd easily.


 Cheers,

 Steven

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


[OpenWrt-Devel] procd reload vs reload_config

2015-06-11 Thread Karl Palsson

Hi,

I've got a procd init script that uses procd_set_param file
/etc/config/special_config.json  Now, maybe I shouldn't have a non-uci file in 
this directory, but that's what I've got, from a predecessor.  If I don't have 
the procd_set_param file line in the init script, then changing the 
special_config.json file and either uci.cursor():apply() or 
/etc/init.d/myprog reload won't restart the process, but it works as 
expected when the procd_set_param file is used.

However, this doesn't work with reload_config which seems to call uci
show xxx for every file in /etc/config.  Which is... not the same
thing?

Should these both work?  Should reload_config work for this case? or is
_only_ meant to reload based on uci config options?  I guess this helps when 
not all processes have procd init scripts?

I'm working on BB currently, but if the behaviour has changed in CC,
that would be good to know as well.

Sincerely,
Karl Palsson___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] OpenWrt Specific Linux Test Project Required

2015-06-11 Thread Dirk Neukirchen
On 11.06.2015 14:16, Anindya Sundar Gayen wrote:
 Linux Test Project

I never heard of that before. Can you clarify ?
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] Ralink MT76228 port to Linux 4.0, set new IP address fail

2015-06-11 Thread Baptiste Clenet
Hi,

I've edited patches from Linux 3.18 to make the MT7628 work with Linux 4.0.
OpenWRT launches, I have access to the shell.
Next step, I configure the IP address with /etc/config/network and
/etc/init.d/network reload. Ifconfig shows me my new address IP.

But, I can't connect via ssh to my board and if I reboot the board, I
get errors at boot:
[   10.23] jffs2: jffs2_scan_inode_node(): CRC failed on node at
0x004725bc: Read 0x, calculated 0x149094b5
I would say it appears one hundred times with different calculated CRC.
and finally the last line is:
[   11.00] jffs2: notice: (305) jffs2_build_xattr_subsystem:
complete building xattr subsystem, 0 of xdatum (0 unchecked, 0 orphan)
and 0 of xref (0 dead, 0 orphan) found.


Then, I'm able to access to the shell but I still can't connect via
ssh. The board constantly reports:

[ 2410.01] ralink_soc_eth 1010.ethernet eth0: transmit timed out
[ 2410.02] ralink_soc_eth 1010.ethernet eth0: dma_cfg:0055
[ 2410.03] ralink_soc_eth 1010.ethernet eth0: tx_ring=0,
base=00dce000, max=128, ctx=126, dtx=126, fdx=123
[ 2410.05] ralink_soc_eth 1010.ethernet eth0: rx_ring=0,
base=01a36000, max=128, calc=121, drx=54
[ 2415.01] ralink_soc_eth 1010.ethernet eth0: transmit timed out
[ 2415.02] ralink_soc_eth 1010.ethernet eth0: dma_cfg:0055
[ 2415.03] ralink_soc_eth 1010.ethernet eth0: tx_ring=0,
base=00dce000, max=128, ctx=126, dtx=126, fdx=123
[ 2415.05] ralink_soc_eth 1010.ethernet eth0: rx_ring=0,
base=01a36000, max=128, calc=121, drx=60

It seems to be related to ethernet driver. Does anyone know those errors?

Regards,

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


Re: [OpenWrt-Devel] OpenWrt Specific Linux Test Project Required

2015-06-11 Thread Anindya Sundar Gayen
Dear Team,


Can you please specify where I `ll get the OpenWrt 14.07 specific Linux 
Test Project.



Thanks  regards,
Anindya Sundar Gayen
Contact | 7842753740
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] can netifd automatically restart a service?

2015-06-11 Thread Nikos Mavrogiannopoulos
On Thu, 2015-06-11 at 09:20 +0100, Bruno Randolf wrote:
 On 06/11/2015 07:32 AM, Nikos Mavrogiannopoulos wrote:
  In issue 574 [0] there is a big discussion of the behavior of
  transmission in openwrt. To summarize it:
  * By default when transmission downloads, it may crash the router due to
  high memory consumption and OOB. That crash may lead to reboot or not.
  * To avoid that, some memory limitations can be set (such as disabling
  overcommit), and then transmission will exit, but the router would be
  functional.
  
  I think the 2nd is quite a reasonable approach as it is more important
  to keep the router up and running than transmission (or any other
  individual service). However, a way to reduce the impact would be for
  netifd to restart transmission if crashed. Can that be done already, or
  inittab is the only option?
 
 procd can do that. E.g. a sample init.d/service file:
 
 #!/bin/sh /etc/rc.common

Thank you for the replies. I'll try to modify transmission for that,
unless someone is faster to it.

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


Re: [OpenWrt-Devel] Patches/files when using external Git repo

2015-06-11 Thread Stefan Agner
Sorry about the useless subject, one unconsecrated moment and it was too
late :-)

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


[OpenWrt-Devel] [PATCH v2] base-files: add /etc/profile.d support

2015-06-11 Thread Hendrik Lüth
OpenWrt should support an optinal /etc/profile.d directory like most other Linux
distributions. This allows packages to install their own scripts into
/etc/profile.d/. This is the second version, which includes suggestions from
the mailing-list.
---
 package/base-files/files/etc/profile | 10 ++
 1 file changed, 10 insertions(+)

diff --git a/package/base-files/files/etc/profile 
b/package/base-files/files/etc/profile
index 3dd58e1..d7129c3 100644
--- a/package/base-files/files/etc/profile
+++ b/package/base-files/files/etc/profile
@@ -14,3 +14,13 @@ export PS1='\u@\h:\w\$ '
 
 [ -x /usr/bin/arp ] || arp() { cat /proc/net/arp; }
 [ -x /usr/bin/ldd ] || ldd() { LD_TRACE_LOADED_OBJECTS=1 $*; }
+
+[ -z $FAILSAFE ]  {
+  if [ -d /etc/profile.d ]; then
+for i in /etc/profile.d/*.sh ; do
+  if [ -r $i ]; then
+. $i
+  fi
+done
+  fi
+}
-- 
2.4.2
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] OpenWrt

2015-06-11 Thread Stefan Agner
Hi all,

While trying to integrate a new platform, I tried using the external Git
clone option (CONFIG_KERNEL_GIT_CLONE_URI and friends). This worked
fine, however when the build system came to build the WLAN drivers
(mac80211) package, the built aborted with this error:

default.install
make[3]: Leaving directory
'/home/ags/projects/openwrt/openwrt/package/network/utils/iw'
make[3]: Entering directory
'/home/ags/projects/openwrt/openwrt/package/kernel/mac80211'
rm -f
/home/ags/projects/openwrt/openwrt/staging_dir/target-arm_cortex-a5+neon_uClibc-0.9.33.2_eabi/stamp/.mac80211_installed
cmp
/home/ags/projects/openwrt/openwrt/build_dir/target-arm_cortex-a5+neon_uClibc-0.9.33.2_eabi/linux-vf610/compat-wireless-2015-03-09/include/linux/ath9k_platform.h
/home/ags/projects/openwrt/openwrt/build_dir/target-arm_cortex-a5+neon_uClibc-0.9.33.2_eabi/linux-vf610/linux-4.0.4/include/linux/ath9k_platform.h
/home/ags/projects/openwrt/openwrt/build_dir/target-arm_cortex-a5+neon_uClibc-0.9.33.2_eabi/linux-vf610/compat-wireless-2015-03-09/include/linux/ath9k_platform.h
/home/ags/projects/openwrt/openwrt/build_dir/target-arm_cortex-a5+neon_uClibc-0.9.33.2_eabi/linux-vf610/linux-4.0.4/include/linux/ath9k_platform.h
differ: char 1349, line 44
Makefile:2019: recipe for target
'/home/ags/projects/openwrt/openwrt/build_dir/target-arm_cortex-a5+neon_uClibc-0.9.33.2_eabi/linux-vf610/compat-wireless-2015-03-09/.configured_yynyynnnynnyyn'
failed


As far as I understand the Makefile the cmp check some files to be in
the right version (e.g. patches/files no applied). The updated files
seem to be available in the folder
./target/linux/generic/files/include/linux/ath9k_platform.h, however,
probably due to using an external tree, they do not get applied. Hence
my question: Is there a way to let the build system apply them even when
using the external tree functionality?

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


Re: [OpenWrt-Devel] can netifd automatically restart a service?

2015-06-11 Thread Bastian Bittorf
* Nikos Mavrogiannopoulos n...@gnutls.org [11.06.2015 09:35]:
 individual service). However, a way to reduce the impact would be for
 netifd to restart transmission if crashed. Can that be done already, or
 inittab is the only option?

you can convert the initscript for using 'procd'.
take as an example the file '/etc/init.d/log'.

you can just try:
# pidof logd
# killall logd
# sleep 10
# pidof logd

(the pid has changed)

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


Re: [OpenWrt-Devel] can netifd automatically restart a service?

2015-06-11 Thread Yousong Zhou
On 11 June 2015 at 14:32, Nikos Mavrogiannopoulos n...@gnutls.org wrote:
 In issue 574 [0] there is a big discussion of the behavior of
 transmission in openwrt. To summarize it:
 * By default when transmission downloads, it may crash the router due to
 high memory consumption and OOB. That crash may lead to reboot or not.
 * To avoid that, some memory limitations can be set (such as disabling
 overcommit), and then transmission will exit, but the router would be
 functional.

 I think the 2nd is quite a reasonable approach as it is more important
 to keep the router up and running than transmission (or any other
 individual service). However, a way to reduce the impact would be for
 netifd to restart transmission if crashed. Can that be done already, or
 inittab is the only option?


Migrate transmission to procd for service management.  Use
`procd_set_param respawn` to define the respawn behaviour.  As for
resource limit, there is also a `procd_set_param limits`, but i have
never tried it myself [0].  The yet-to-be-implemented cgroups support
of procd may also help [1] :)

 [0] procd limits usage,
https://lists.openwrt.org/pipermail/openwrt-devel/2015-January/030351.html
 [1] adding seccomp and service jailing to procd,
https://lists.openwrt.org/pipermail/openwrt-devel/2015-March/032197.html


yousong

 regards,
 Nikos

 [0]. https://github.com/openwrt/packages/issues/574
 ___
 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


[OpenWrt-Devel] can netifd automatically restart a service?

2015-06-11 Thread Nikos Mavrogiannopoulos
In issue 574 [0] there is a big discussion of the behavior of
transmission in openwrt. To summarize it:
* By default when transmission downloads, it may crash the router due to
high memory consumption and OOB. That crash may lead to reboot or not.
* To avoid that, some memory limitations can be set (such as disabling
overcommit), and then transmission will exit, but the router would be
functional.

I think the 2nd is quite a reasonable approach as it is more important
to keep the router up and running than transmission (or any other
individual service). However, a way to reduce the impact would be for
netifd to restart transmission if crashed. Can that be done already, or
inittab is the only option?

regards,
Nikos

[0]. https://github.com/openwrt/packages/issues/574
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] automated builds with hardening features enabled

2015-06-11 Thread Daniel Golle
Hi!

Thinking about how we could improve automated QA, I was wondering if
we could have buildbot also run builds with hardening features enabled?

For the beginning, it'd be enough if every 10th build would have SSP,
seccomp/jails, RELRO, ... as well as LXC-related features enabled.
Then we could have broken_packages_hardened/* and package maintainers
could get aware that stuff breaks if hardening is enabled.
In a way, the same could be applied for debugging (CONFIG_DEBUG) as
well as localization (BUILD_NLS), but I reckon it makes sense to
start-off with all sorts of hardening features enabled.

What do you think?
Could tasks to build hardened snapshots for all targets be dispatched
by buildbot.openwrt.org?
Who'd want to donate a buildslave for that?


Cheers


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


Re: [OpenWrt-Devel] can netifd automatically restart a service?

2015-06-11 Thread Bruno Randolf
On 06/11/2015 07:32 AM, Nikos Mavrogiannopoulos wrote:
 In issue 574 [0] there is a big discussion of the behavior of
 transmission in openwrt. To summarize it:
 * By default when transmission downloads, it may crash the router due to
 high memory consumption and OOB. That crash may lead to reboot or not.
 * To avoid that, some memory limitations can be set (such as disabling
 overcommit), and then transmission will exit, but the router would be
 functional.
 
 I think the 2nd is quite a reasonable approach as it is more important
 to keep the router up and running than transmission (or any other
 individual service). However, a way to reduce the impact would be for
 netifd to restart transmission if crashed. Can that be done already, or
 inittab is the only option?

procd can do that. E.g. a sample init.d/service file:

#!/bin/sh /etc/rc.common

START=99

USE_PROCD=1
PROG=/usr/sbin/yourprog
CONFFILE=/etc/your.conf

start_service() {
procd_open_instance
procd_set_param command $PROG
procd_set_param file $CONFFILE
procd_set_param respawn
procd_close_instance
}

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