[OpenWrt-Devel] ZyXEL NBG4615

2015-09-19 Thread Nerijus Baliunas
Hello,

it is similar to NBG-419N but has Atheros AR8316 4+1 GbE switch. I enabled
CONFIG_AR8216_PHY=y in target/linux/ramips/rt305x/config-3.18, rebuilt and
loaded openwrt-ramips-rt305x-nbg-419n-initramfs-uImage.bin to SDRAM via TFTP. 

Now /sys/bus/mdio_bus/drivers/Atheros AR8216!AR8236!AR8/ exists, but
# swconfig list
Found: switch0 - rt305x

How can I make switch work?

I found similar problem https://forum.openwrt.org/viewtopic.php?id=49276

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


Re: [OpenWrt-Devel] ZyXEL NBG4615

2015-09-19 Thread John Crispin


On 19/09/2015 11:27, Nerijus Baliunas wrote:
> Hello,
> 
> it is similar to NBG-419N but has Atheros AR8316 4+1 GbE switch. I enabled
> CONFIG_AR8216_PHY=y in target/linux/ramips/rt305x/config-3.18, rebuilt and
> loaded openwrt-ramips-rt305x-nbg-419n-initramfs-uImage.bin to SDRAM via TFTP. 
> 
> Now /sys/bus/mdio_bus/drivers/Atheros AR8216!AR8236!AR8/ exists, but
> # swconfig list
> Found: switch0 - rt305x
> 
> How can I make switch work?
> 
> I found similar problem https://forum.openwrt.org/viewtopic.php?id=49276
> 
> Regards,
> Nerijus

Hi

rt305x has a rgmii that the switch connects to. however we dont have
support in the driver for that rgmii port. you will need to first atch
the driver to support the rgmii interface and then hook up the switch
driver.

John


> ___
> 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 v2] lantiq: ARV7519RW22 fixes - fix flash register (only 1 flash) - power led is green - rename message leds to internet - add leds configuration - enable switch vlans

2015-09-19 Thread Rafał Miłecki
On 18 September 2015 at 21:21, Álvaro Fernández Rojas  wrote:
> Signed-off-by: Álvaro Fernández Rojas 
> Signed-off-by: José Vázquez Fernández 

Please work on some saner commit messages ;) If a commit needs more
explanation, put it  above Signed-off-by lines.
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH v2] lantiq: ARV7519RW22 fixes - fix flash register (only 1 flash) - power led is green - rename message leds to internet - add leds configuration - enable switch vlans

2015-09-19 Thread Álvaro Fernández Rojas
Yeah, sorry but somehow the commit subject and content got merged in the 
subject.

Should I resend it fixed?

El 19/09/2015 a las 12:26, Rafał Miłecki escribió:

On 18 September 2015 at 21:21, Álvaro Fernández Rojas  wrote:

Signed-off-by: Álvaro Fernández Rojas 
Signed-off-by: José Vázquez Fernández 

Please work on some saner commit messages ;) If a commit needs more
explanation, put it  above Signed-off-by lines.

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


[OpenWrt-Devel] [PATCH procd] Add MS_NODEV MS_NOEXEC MS_NOSUID mount options where needed

2015-09-19 Thread Etienne CHAMPETIER
These options aren't mandatory, but can prevent some future
bugs from being exploited. Good reading:
http://lwn.net/Articles/647757/

Value chosen by looking at fedora 22 / ubuntu 14.04

Not tested yet (away from my tests routers)

Not touching jail/jail.c as this conflict with
my pending patch serie

Signed-off-by: Etienne CHAMPETIER 
---
 initd/early.c   | 12 ++--
 plug/coldplug.c |  4 ++--
 2 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/initd/early.c b/initd/early.c
index 89c8104..f410256 100644
--- a/initd/early.c
+++ b/initd/early.c
@@ -62,18 +62,18 @@ early_mounts(void)
 {
unsigned int oldumask = umask(0);
 
-   mount("proc", "/proc", "proc", MS_NOATIME, 0);
-   mount("sysfs", "/sys", "sysfs", MS_NOATIME, 0);
-   mount("none", "/sys/fs/cgroup", "cgroup", 0, 0);
-   mount("tmpfs", "/dev", "tmpfs", MS_NOATIME, "mode=0755,size=512K");
+   mount("proc", "/proc", "proc", MS_NOATIME | MS_NODEV | MS_NOEXEC | 
MS_NOSUID, 0);
+   mount("sysfs", "/sys", "sysfs", MS_NOATIME | MS_NODEV | MS_NOEXEC | 
MS_NOSUID, 0);
+   mount("cgroup", "/sys/fs/cgroup", "cgroup",  MS_NODEV | MS_NOEXEC | 
MS_NOSUID, 0);
+   mount("tmpfs", "/dev", "tmpfs", MS_NOATIME | MS_NOSUID, 
"mode=0755,size=512K");
symlink("/tmp/shm", "/dev/shm");
mkdir("/dev/pts", 0755);
-   mount("devpts", "/dev/pts", "devpts", MS_NOATIME, "mode=600");
+   mount("devpts", "/dev/pts", "devpts", MS_NOATIME | MS_NOEXEC | 
MS_NOSUID, "mode=600");
early_dev();
 
early_console("/dev/console");
if (mount_zram_on_tmp()) {
-   mount("tmpfs", "/tmp", "tmpfs", MS_NOSUID | MS_NODEV | 
MS_NOATIME, NULL);
+   mount("tmpfs", "/tmp", "tmpfs", MS_NOSUID | MS_NODEV | 
MS_NOATIME, 0);
mkdir("/tmp/shm", 01777);
} else {
mkdir("/tmp/shm", 01777);
diff --git a/plug/coldplug.c b/plug/coldplug.c
index bfd3513..123e17d 100644
--- a/plug/coldplug.c
+++ b/plug/coldplug.c
@@ -44,11 +44,11 @@ void procd_coldplug(void)
 
umount2("/dev/pts", MNT_DETACH);
umount2("/dev/", MNT_DETACH);
-   mount("tmpfs", "/dev", "tmpfs", 0, "mode=0755,size=512K");
+   mount("tmpfs", "/dev", "tmpfs", MS_NOSUID, "mode=0755,size=512K");
symlink("/tmp/shm", "/dev/shm");
mkdir("/dev/pts", 0755);
umask(oldumask);
-   mount("devpts", "/dev/pts", "devpts", 0, 0);
+   mount("devpts", "/dev/pts", "devpts", MS_NOEXEC | MS_NOSUID, 0);
udevtrigger.cb = udevtrigger_complete;
udevtrigger.pid = fork();
if (!udevtrigger.pid) {
-- 
1.9.1
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] ZyXEL NBG4615

2015-09-19 Thread Nerijus Baliunas
On Sat, 19 Sep 2015 12:11:06 +0200 John Crispin  wrote:

> > it is similar to NBG-419N but has Atheros AR8316 4+1 GbE switch. I enabled
> > CONFIG_AR8216_PHY=y in target/linux/ramips/rt305x/config-3.18, rebuilt and
> > loaded openwrt-ramips-rt305x-nbg-419n-initramfs-uImage.bin to SDRAM via 
> > TFTP. 
> > 
> > Now /sys/bus/mdio_bus/drivers/Atheros AR8216!AR8236!AR8/ exists, but
> > # swconfig list
> > Found: switch0 - rt305x
> > 
> > How can I make switch work?
> > 
> > I found similar problem https://forum.openwrt.org/viewtopic.php?id=49276
> 
> rt305x has a rgmii that the switch connects to. however we dont have
> support in the driver for that rgmii port. you will need to first atch
> the driver to support the rgmii interface and then hook up the switch
> driver.

drivers/net/phy/ar8216.c already has
if (priv->phy->interface == PHY_INTERFACE_MODE_RGMII)
Is it something similar? How can I add support for rt305x rgmii?

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