[OpenWrt-Devel] [PATCH 1/2] mvebu: set WRT1900AC WAN interface MAC address

2015-02-21 Thread Claudio Leite
Signed-off-by: Claudio Leite lei...@staticky.com
---
 target/linux/mvebu/base-files/lib/preinit/06_set_iface_mac | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/target/linux/mvebu/base-files/lib/preinit/06_set_iface_mac 
b/target/linux/mvebu/base-files/lib/preinit/06_set_iface_mac
index 30f1370..19f6e75 100644
--- a/target/linux/mvebu/base-files/lib/preinit/06_set_iface_mac
+++ b/target/linux/mvebu/base-files/lib/preinit/06_set_iface_mac
@@ -11,8 +11,9 @@ preinit_set_mac_address() {
case $(mvebu_board_name) in
armada-xp-mamba)
mac=$(mtd_get_mac_ascii devinfo hw_mac_addr)
+   mac_wan=$(macaddr_add $mac 1)
ifconfig eth0 hw ether $mac 2/dev/null
-   ifconfig eth1 hw ether $mac 2/dev/null
+   ifconfig eth1 hw ether $mac_wan 2/dev/null
;;
esac
 }
-- 
2.1.4
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 2/2] mvebu: set default WRT1900AC switch config

2015-02-21 Thread Claudio Leite
This sets 'enable_vlan' and thus uses 802.1q
VLANs, but without tagging on either interface.

Signed-off-by: Claudio Leite lei...@staticky.com
---
 target/linux/mvebu/base-files/etc/uci-defaults/02_network | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/target/linux/mvebu/base-files/etc/uci-defaults/02_network 
b/target/linux/mvebu/base-files/etc/uci-defaults/02_network
index 8b1ed6a..9464f36 100644
--- a/target/linux/mvebu/base-files/etc/uci-defaults/02_network
+++ b/target/linux/mvebu/base-files/etc/uci-defaults/02_network
@@ -17,6 +17,9 @@ board=$(mvebu_board_name)
 case $board in
 armada-xp-mamba)
ucidef_set_interfaces_lan_wan eth0 eth1
+   ucidef_add_switch switch0 1 1
+   ucidef_add_switch_vlan switch0 1 0 1 2 3 5
+   ucidef_add_switch_vlan switch0 2 4 6
;;
 
 *)
-- 
2.1.4
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] MI424WR Rev I Hynix NAND Error

2015-02-21 Thread James Hilliard
I've been trying to install OpenWRT on an Actiontec MI424WR Rev I, however
some variants of this router use a Hynix NAND chip that OpenWRT doesn't
seem to be able to access. There are other versions of this router that use
a Eon NAND chip that works fine. I've attached the full boot-log. The stock
firmware is the same for both NAND Chips.

The Bad Hynix NAND chip comes up as:
[0.574220] nand: Could not find valid ONFI parameter page; aborting
[0.580612] nand: device found, Manufacturer ID: 0xad, Chip ID: 0xf1
[0.587017] nand: Hynix NAND 128MiB 3,3V 8-bit
[0.591494] nand: 128MiB, SLC, page size: 2048, OOB size: 64
[0.597187] Scanning device for bad blocks
[0.607966] Bad eraseblock 114 at 0x00e4
[0.665416] 4 ofpart partitions found on MTD device orion_nand

While the Eon Nand chip that works comes up as:
[0.573914] nand: device found, Manufacturer ID: 0x92, Chip ID: 0xf1
[0.580301] nand: Eon NAND 128MiB 3,3V 8-bit
[0.584617] nand: 128MiB, SLC, page size: 2048, OOB size: 64
[0.590310] Scanning device for bad blocks
[0.624209] 4 ofpart partitions found on MTD device orion_nand
[?1034hbash-3.2$ screen /dev/cu.usbserial 115200
[?1049h[!p[?3;4l[?1h=(B
BootROM 1.34

Booting from NAND flash

BootROM: Image checksum verification PASSED

 __   __  _ _
|  \/  | __ _ _    _| | |
| |\/| |/ _` | '__\ \ / / _ \ | |
| |  | | (_| | |   \ V /  __/ | |
|_|  |_|\__,_|_|\_/ \___|_|_|
 _   _   _
| | | |   | __ )  ___   ___ | |_ 
| | | |___|  _ \ / _ \ / _ \| __| 
| |_| |___| |_) | (_) | (_) | |_ 
 \___/|/ \___/ \___/ \__| 
 ** LOADER **


U-Boot 2009.08 (May 11 2012 - 16:31:26) Marvell version: 2.1.6_NQ

Board: MI424WR-I
SoC:   88F6560 A0
CPU:   Marvell Feroceon (Rev 1) - LE
   CPU @ 1200Mhz, L2 @ 480Mhz
   DDR3 @ 400Mhz, TClock @ 200Mhz
PEX 0: Root Complex Interface, Detected Link X1
PEX 1: Detected No Link.
DRAM:  128 MB
   CS 0: base 0x size 128 MB
   Addresses 10M - 0M are saved for the U-Boot usage.
NAND:  1bit HM ECC, Size: 128 MiB
USB 0: Host Mode
Shutting down unused interfaces:
   PON
   SATA
   3xFE-PHY
Modules Detected:
   No PON module.
   RGMIIA Module on Switch port #6.
   RGMIIB Module on MAC0.
   Ethernet Switch on MAC1.
   QSGMII Module.
Initialized 1545 PHY
Net:   egiga0, egiga1 [PRIME]
Hit any key to stop autoboot:  1  0 

NAND read: device 0 offset 0x300, size 0x20
 2097152 bytes read: OK
## Booting kernel from Legacy Image at 0200 ...
   Image Name:   ARM OpenWrt Linux-3.14.14
   Created:  2014-07-31  15:01:33 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:1619677 Bytes =  1.5 MB
   Load Address: 8000
   Entry Point:  8000
   Verifying Checksum ... OK
   Loading Kernel Image ... OK
OK

Starting kernel ...

Uncompressing Linux... done, booting the kernel.
[0.00] Booting Linux on physical CPU 0x0
[0.00] Linux version 3.14.14 (leitec@dirk) (gcc version 4.8.3 
(OpenWrt/Linaro GCC 4.8-2014.04 r41582) ) #41 Thu Jul 31 11:00:46 EDT 2014
[0.00] CPU: Feroceon 88FR131 [56251311] revision 1 (ARMv5TE), 
cr=00053977
[0.00] CPU: VIVT data cache, VIVT instruction cache
[0.00] Machine model: Actiontec MI424WR-I
[0.00] Memory policy: Data cache writeback
[0.00] Built 1 zonelists in Zone order, mobility grouping on.  Total 
pages: 32512
[0.00] Kernel command line: console=ttyS0,115200 ubi.mtd=3 
root=ubi0:rootfs rootfstype=ubifs rw
[0.00] PID hash table entries: 512 (order: -1, 2048 bytes)
[0.00] Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
[0.00] Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
[0.00] Memory: 125228K/131072K available (3234K kernel code, 151K 
rwdata, 916K rodata, 133K init, 181K bss, 5844K reserved)
[0.00] Virtual kernel memory layout:
[0.00] vector  : 0x - 0x1000   (   4 kB)
[0.00] fixmap  : 0xfff0 - 0xfffe   ( 896 kB)
[0.00] vmalloc : 0xc880 - 0xff00   ( 872 MB)
[0.00] lowmem  : 0xc000 - 0xc800   ( 128 MB)
[0.00] modules : 0xbf00 - 0xc000   (  16 MB)
[0.00]   .text : 0xc0008000 - 0xc0415d5c   (4152 kB)
[0.00]   .init : 0xc0416000 - 0xc04374ac   ( 134 kB)
[0.00]   .data : 0xc0438000 - 0xc045dee4   ( 152 kB)
[0.00].bss : 0xc045dee4 - 0xc048b3c4   ( 182 kB)
[0.00] NR_IRQS:114
[0.10] sched_clock: 32 bits at 200MHz, resolution 5ns, wraps every 
21474836475ns
[0.98] Calibrating delay loop... 1191.11 BogoMIPS (lpj=5955584)
[0.040049] pid_max: default: 32768 minimum: 301
[0.040134] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[0.040145] Mountpoint-cache hash table entries: 

[OpenWrt-Devel] NCM fails to reconnect

2015-02-21 Thread Sami Olmari
It seems MCN protocol still has some quirks left... it seems that whenever
MCN connection gets disconnected for whatever reason, it can't be brought
back up... even yanking the dongle out and back in does not do basically
anything... it gets detected etc, but nothing else happends...

following logread it shows literally nothing. Like NCM-script isn't there
doing it's magic anymore... ifup wan... nothing.. etc.. Only full reboot
makes it to work again, until next ocnnection breakup happends...

What should we do?

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


[OpenWrt-Devel] [PATCH] dnsmasq: Make parameters optional in dhcpboot config

2015-02-21 Thread Stefan Tomanek
The --dhcp-boot option of dnsmasq does not require servername and serveraddress
arguments if the builtin tftp server is used.

Signed-off-by: Stefan Tomanek stefan.tomanek+open...@wertarbyte.de
---
 .../network/services/dnsmasq/files/dnsmasq.init|7 +++
 1 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/package/network/services/dnsmasq/files/dnsmasq.init 
b/package/network/services/dnsmasq/files/dnsmasq.init
index 40ec584..fb118d5 100644
--- a/package/network/services/dnsmasq/files/dnsmasq.init
+++ b/package/network/services/dnsmasq/files/dnsmasq.init
@@ -364,12 +364,11 @@ dhcp_boot_add() {
[ -n $filename ] || return 0
 
config_get servername $cfg servername
-   [ -n $servername ] || return 0
-
config_get serveraddress $cfg serveraddress
-   [ -n $serveraddress ] || return 0
 
-   xappend 
--dhcp-boot=${networkid:+net:$networkid,}$filename,$servername,$serveraddress
+   [ -n $serveraddress -a ! -n $servername ]  return 0
+
+   xappend 
--dhcp-boot=${networkid:+net:$networkid,}${filename}${servername:+,$servername}${serveraddress:+,$serveraddress}
 
config_get_bool force $cfg force 0
 
-- 
1.7.2.5
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH 2/2] mvebu: set default WRT1900AC switch config

2015-02-21 Thread Claudio Leite
* Claudio Leite (lei...@staticky.com) wrote:
 This sets 'enable_vlan' and thus uses 802.1q
 VLANs, but without tagging on either interface.

Note: this depends on the previous patch, since setting up the switch
when both interfaces have the same MAC address results in a ton of
packet loss. This might be a bug in the switch driver. It may be
related that with the current setup (i.e. without either of these
patches) I see a lot of

[   65.401622] br-lan: received packet on eth0 with own address as
source address

while running NAT routing tests between two PCs, using both LAN and
WAN interfaces. They seem to go away once I change the MAC (patch 1
only) which then also allows the setup from this patch to work. However,
I might be mixed up as to what the cause is, since I haven't looked
into this too deeply yet. Any insight is appreciated.

It's worth noting the original Linksys firmware seems to use the same
MAC on both interfaces.

-Claudio

 
 Signed-off-by: Claudio Leite lei...@staticky.com
 ---
  target/linux/mvebu/base-files/etc/uci-defaults/02_network | 3 +++
  1 file changed, 3 insertions(+)
 
 diff --git a/target/linux/mvebu/base-files/etc/uci-defaults/02_network 
 b/target/linux/mvebu/base-files/etc/uci-defaults/02_network
 index 8b1ed6a..9464f36 100644
 --- a/target/linux/mvebu/base-files/etc/uci-defaults/02_network
 +++ b/target/linux/mvebu/base-files/etc/uci-defaults/02_network
 @@ -17,6 +17,9 @@ board=$(mvebu_board_name)
  case $board in
  armada-xp-mamba)
   ucidef_set_interfaces_lan_wan eth0 eth1
 + ucidef_add_switch switch0 1 1
 + ucidef_add_switch_vlan switch0 1 0 1 2 3 5
 + ucidef_add_switch_vlan switch0 2 4 6
   ;;
  
  *)
 -- 
 2.1.4
 ___
 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