OpenWrt Forum Archive

Topic: Support for Marvell 88F5xx81 based routers

The content of this topic has been archived between 18 Jan 2014 and 6 May 2018. Unfortunately there are posts – most likely complete pages – missing.

Of course ramdisk builds are preferred, also a good reason to establish a serial connection to your device.
e.g. leave stock firmware on it, and test OpenWrt ramdisk images via tftp.

Maddes: I tried to boot your uImage files from your FTP site in uboot.

Using pumpkin TFTP server: put <image file> <router host IP>
It would start to send the file but I kept getting "Bad packet format" from uboot TFTP server.

must have missed the magic to get ram boot working on the wnr854

@maddes

I have fixed the annoyance of the mac address defaulting to 00:00:00:00:51:81 -- as I understand it because of Linksys not properly setting an env var in u-boot for the LAN driver to read the mac address from.

To fix this, I have

* located the offset of the mac address in the u-boot partiton
* read it out and put it into /etc/config/network
* fixed the /lib/network/config.sh so it sets the macaddr on the bridged lan ports (lan1 through lan4). This seems to be a bug to me to be honest, maybe this should be commited to trunk. The current config.sh in trunk leaves these on their default settings, 00:00:00:00:51:81, breaking my fix.

I have written a script to accomplish the first two tasks, I call it 'fixmacaddr'. This should probably be run on firstboot. Code follows:

#!/bin/sh
# Copyright (C) 2010 Peter van Valderen
#
# This script reads the hardware lan mac address from
# the u-boot partition and assigns it to all devices
# in /etc/config/network

MTDPART=`cat /proc/mtd | grep u-boot`
if [ -z "$MTDPART" ]; then
    echo no u-boot mtd partition found, exiting...
    exit
fi

incrementMac () {
    MACADDR=$1

    i=0
    MACADDR2=
    while [ ${#MACADDR} -gt 0 ]; do
        LEN=`expr ${#MACADDR} - 1`
        LASTCHAR=${MACADDR:$LEN:1}
        MACADDR=${MACADDR:0:$LEN}

        if [ "$LASTCHAR" = ":" ]; then
            if [ "$i" -eq "0" -o "$INCREMENTNEXT" -eq "1" ]; then
                if [ "$PART" -eq "255" ]; then
                PART=0
                INCREMENTNEXT=1
                else
                PART=`expr $PART + 1`
                INCREMENTNEXT=0
                fi
            fi
            MACADDR2=`printf "%02x" ${PART}`:${MACADDR2}
            PART=
    
            i=`expr $i + 1`
        else
            PART=${LASTCHAR}${PART}    
        fi
    done

    echo `printf "%02x" ${PART}`:${MACADDR2} | sed 's/:$//g'
}

# parse mtd partition number
PARTNR=`echo $MTDPART | sed 's/[a-z]*\([0-9]*\):.*/\1/'`
# get macaddr from mtd partition
MACADDR=`dd if=/dev/mtdblock${PARTNR} bs=1 skip=262048 count=6 2>/dev/null | hexdump -e '1/1 "%02x:"' | sed 's/:$//g'`
# get macaddr+1 for wan
MACADDR2=`dd if=/dev/mtdblock${PARTNR} bs=1 skip=262048 count=6 2>/dev/null | hexdump -e '1/1 "%d:"' | sed 's/:$//g'`
MACADDR2=`incrementMac $MACADDR2` 

# add mac address to each section
uci set network.eth0.macaddr=$MACADDR
uci set network.lan.macaddr=$MACADDR
uci set network.wan.macaddr=$MACADDR2
uci commit

Here is the patch to /lib/network/config.sh:

--- config.sh.orig.bak    Fri Jan  2 01:43:42 1970
+++ config.sh    Mon Mar 29 18:18:42 2010
@@ -115,6 +115,8 @@
     config_get iftype "$config" type
     case "$iftype" in
         bridge)
+            local macaddr
+            config_get macaddr "$config" macaddr
             [ -x /usr/sbin/brctl ] && {
                 ifconfig "br-$config" 2>/dev/null >/dev/null && {
                     local newdevs devices
@@ -139,7 +141,13 @@
                     # result in another setup_interface() call, so we simply stop processing
                     # the current event at this point.
                 }
-                ifconfig "$iface" up 2>/dev/null >/dev/null
+                
+                if [ -z "$macaddr" ]; then
+                    ifconfig "$iface" up 2>/dev/null >/dev/null
+                else
+                    ifconfig "$iface" hw ether "$macaddr" up 2>/dev/null
+                fi
+                
                 return 1
             }
         ;;

As said, this latter one should probably be put in the trunk ( src/package/base-files/files/lib/network/config.sh ), I am not quite sure that when one sets a macaddr for a bridge, that its 'child' interfaceds should not get that macaddr set.

Here are the files as direct downloads for your convenience:
fixmacaddr (v2) ([s]fixmacaddr (v1)[/s])
config.sh.diff

[edit]: I forgot to mention, the SVN revision that this patch applies to (and was tested on) is r20245.
[edit 2]: updated fixmacaddr so it increments the hardware mac by 1 and sets it for wan, old script set wan,lan,eth0 all to hw mac ( p.s. i know i suck at shell script ;) )

(Last edited by StrikerNL on 30 Mar 2010, 09:01)

The primary fix for config.sh is cleaned up and sent to the OpenWrt devel list. Now it's also documented in ticket #7111. Let's hope for a fast commit to trunk:

Index: package/base-files/files/lib/network/config.sh
===================================================================
--- package/base-files/files/lib/network/config.sh    (revision 20654)
+++ package/base-files/files/lib/network/config.sh    (working copy)
@@ -115,6 +115,8 @@
     config_get iftype "$config" type
     case "$iftype" in
         bridge)
+            local macaddr
+            config_get macaddr "$config" macaddr
             [ -x /usr/sbin/brctl ] && {
                 ifconfig "br-$config" 2>/dev/null >/dev/null && {
                     local newdevs devices
@@ -139,7 +141,7 @@
                     # result in another setup_interface() call, so we simply stop processing
                     # the current event at this point.
                 }
-                ifconfig "$iface" up 2>/dev/null >/dev/null
+                ifconfig "$iface" ${macaddr:+hw ether "${macaddr}"} up 2>/dev/null >/dev/null
                 return 1
             }
         ;;

I can also confirm the offset for the local mac address inside the U-Boot mtd partition, and that wan/internet is always local mac plus 1.
Stock firmware also sets the local mac address for wifi/wlan, while OpenWrt reads the mac address from the wireless card.

(Last edited by maddes.b on 8 Apr 2010, 18:23)

Well done maddes.

By the way, I added the WRT350N to here: http://wiki.openwrt.org/toh/start#linksys -- I haven't added the 2.1 though, I'm not sure what the differences are, if any. We have a "V2" and "V2.1" here and they run on the same image.

It was listed on the old list as well. Maybe we should create a wiki page with things of general interest, such as flashing from linksys webif, recovery with the downloade mode, et cetera. Good to have a central place I think?

(Last edited by StrikerNL on 3 Apr 2010, 11:23)

Agree. v2.1 and v2.0 should have the same hardware, just a new revision.
Pictures and boot log of v2.1 available at ftp://ftp.maddes.net/openwrt/trunk/orio … n_aus_v21/

Everybody is welcome to fill the wiki with useful information.
Maybe just try to coordinate in this thread before.

(Last edited by maddes.b on 7 Apr 2010, 19:46)

Hello,

Everybody

I found this: http://www.dd-wrt.com/wiki/index.php/JTAG

EJTAG Debrick Utility v3.0.1 Tornado-MOD

           Supported Chips
           ---------------
           Broadcom BCM4702 Rev 1 CPU
           Broadcom BCM4704 KPBG Rev 9 CPU
           Broadcom BCM4704 Rev 8 CPU
           Broadcom BCM4712 Rev 1 CPU
           Broadcom BCM4712 Rev 2 CPU
           Broadcom BCM4716 Rev 1 CPU
           Broadcom BCM4785 Rev 1 CPU
           Broadcom BCM5350 Rev 1 CPU
           Broadcom BCM5352 Rev 1 CPU
           Broadcom BCM5354 KFBG Rev 1 CPU
           Broadcom BCM5354 KFBG Rev 2 CPU
           Broadcom BCM5354 KFBG Rev 3 CPU
           Broadcom BCM3345 KPB Rev 1 CPU
           Broadcom BCM5365 Rev 1 CPU
           Broadcom BCM5365 Rev 1 CPU
           Broadcom BCM6345 Rev 1 CPU
           Broadcom BCM6348 Rev 1 CPU
           Broadcom BCM6338 Rev 1 CPU
           Broadcom BCM6358 Rev 1 CPU
           Broadcom BCM6368 Rev 1 CPU
           Broadcom BCM4321 RADIO STOP
           Broadcom BCM4321L RADIO STOP
           TI AR7WRD TNETD7300GDU Rev 1 CPU
           BRECIS MSP2007-CA-A1 CPU
           TI TNETV1060GDW CPU
           Linkstation 2 with RISC K4C chip
           Atheros AR531X/231X CPU
           XScale IXP42X 266mhz
           XScale IXP42X 400mhz
           XScale IXP42X 533mhz
           ARM 940T
           Marvell Feroceon 88F5181
           LX4380

download URL: http://www.tiaowiki.com/download//file.php?id=24


I have a D-Link DIR-615 A1 router< Marvell 88F5180/8MB/32MB/88w8361 MiniPCI Wifi card/88E6061 Switch chip >,which is very similar to WNR854T & WRT350N V2 & Belkin N1( F5D7132 1102 )and several AR5008-3NX/3NG MiniPCI Cards.I'll try to backup the CFE and WholeFlash,then test this Firmware Backfire 10.03 on DIR-615 A1

DIR-615 A1 TTL info:

U-Boot 1.1.1 (Dec  1 2006 - 14:26:56)
CAMEO uBoot Linux Loader version: 1.3.0.0

DRAM CS[0] base 0x00000000   size  32MB 
DRAM Total size  32MB 
before entry mvFlashInit 
Flash: flashStructGet manu 0x89 id 0x17 
INTEL 28F640J3A (64 Mbit)
Size:  8 MB,Bus Width: 1, device Width: 1.
Flash base: 0xff800000,Number of Sectors: 64 Type: REGULAR.
  Sector Start Addresses:
    00000000      00020000      00040000      00060000      00080000     
    000a0000      000c0000      000e0000      00100000      00120000     
    00140000      00160000      00180000      001a0000      001c0000     
    001e0000      00200000      00220000      00240000      00260000     
    00280000      002a0000      002c0000      002e0000      00300000     
    00320000      00340000      00360000      00380000      003a0000     
    003c0000      003e0000      00400000      00420000      00440000     
    00460000      00480000      004a0000      004c0000      004e0000     
    00500000      00520000      00540000      00560000      00580000     
    005a0000      005c0000      005e0000      00600000      00620000     
    00640000      00660000      00680000      006a0000      006c0000     
    006e0000      00700000      00720000      00740000      00760000 (RO)
    00780000 (RO) 007a0000 (RO) 007c0000 (RO) 007e0000 (RO)
[8192kB@ff800000] Flash:  8 MB
Addresses 20M - 0M are saved for the U-Boot usage.
Mem malloc Initialization (20M - 16M): Done
*** Warning - bad CRC, using default environment


Soc: 88F5181 B1
CPU: ARM926 (Rev 0) running @ 500Mhz 
SysClock = 166Mhz , TClock = 166Mhz 


USB 0: host mode
PCI 0: PCI Express Root Complex Interface
PCI 1: Conventional PCI, speed = 33000000
Net:   egiga0 [PRIME]
Hit any key to stop autoboot:  0 
### JFFS2 loading 'uImage' to 0x400000
Scanning JFFS2 FS: ..... done.
### JFFS2 load complete: 1099492 bytes loaded to 0x400000
## Booting image at 00400000 ...
   Image Name:   Linux-2.4.27-vrs1
   Created:      2007-07-26   6:29:23 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    1099428 Bytes =  1 MB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
OK

Starting kernel ...

Uncompressing Linux.......................................................................... done, booting the kernel.
ZLinux version 2.4.27-vrs1 (root@localhost.localdomain) (gcc version 3.4.4 (release) (CodeSourcery ARM 2005q3-1)) #2 Thu Jul 26 14:28:55 CST 2007
CPU: ARM926EJ-Sid(wb) revision 0
Machine: MV-88fxx81
Using UBoot passing parameters structure
Sys Clk = 166000000, Tclk = 166000000


- Warning - This LSP release was tested only with U-Boot release 1.7.0 

On node 0 totalpages: 8192
zone(0): 8192 pages.
zone(1): 0 pages.
zone(2): 0 pages.
Kernel command line: console=ttyS0,115200 mtdparts=phys_mapped_flash:6m(root),1m@6m(nvram),1m@7m(uboot)ro root=/dev/mtdblock1 rw ip=192.168.0.1:192.168.0.100:::DB88FXX81:eth0:none
Calibrating delay loop... 331.77 BogoMIPS
Memory: 32MB 0MB 0MB 0MB = 32MB total
Memory: 29884KB available (2034K code, 366K data, 88K init)
Dentry cache hash table entries: 4096 (order: 3, 32768 bytes)
Inode cache hash table entries: 2048 (order: 2, 16384 bytes)
Mount cache hash table entries: 512 (order: 0, 4096 bytes)
Buffer cache hash table entries: 1024 (order: 0, 4096 bytes)
Page-cache hash table entries: 8192 (order: 3, 32768 bytes)
CPU: Testing write buffer: pass
POSIX conformance testing by UNIFIX
init hw started.

CPU Interface
-------------
SDRAM_CS0 ....base 00000000, size  32MB 
SDRAM_CS1 ....disable
SDRAM_CS2 ....disable
SDRAM_CS3 ....disable
PEX0_MEM ....base e0000000, size 128MB 
PEX0_IO ....base f2000000, size   1MB 
PCI0_MEM ....base e8000000, size 128MB 
PCI0_IO ....base f2100000, size   1MB 
INTER_REGS ....base f1000000, size   1MB 
DEVICE_CS0 ....no such
DEVICE_CS1 ....no such
DEVICE_CS2 ....no such
DEV_BOOCS ....base f4000000, size  16MB 
PCI: bus0: Fast back to back transfers enabled
HW already initialized.
PCI: bus1: Fast back to back transfers enabled
Linux NET4.0 for Linux 2.4
Based upon Swansea University Computer Society NET3.039
Initializing RT netlink socket
 bankwidth 1, base f4000000, size 1000000

  Marvell Development Board (LSP Version 0.0.102)-- RD-88F5181L-VOIP-FE 

 Detected Tclk 166000000 and SysClk 166000000 
Starting kswapd
Journalled Block Device driver loaded
NTFS driver v1.1.22 [Flags: R/O]
JFFS2 version 2.1. (C) 2001 Red Hat, Inc., designed by Axis Communications AB.
pty: 256 Unix98 ptys configured
Serial driver version 5.05c (2001-07-08) with MANY_PORTS SHARE_IRQ SERIAL_PCI enabled
ttyS00 at 0xf1012000 (irq = 3) is a 16550A
HDLC line discipline: version $Revision: 1.1.1.1 $, maxframe=4096
N_HDLC line discipline registered.
Marvell Gigabit Ethernet Driver 'egiga':
  o Ethernet descriptors in DRAM
  o DRAM SW cache-coherency
  o Loading network interface 
  o Using switch header mode
qdInit 
qdStart: CPU port 0x5 
Switch driver initialized
Can't get netConfig: Use default
UNM is not initialized yet
2 VLANs created: CpuPortMask = 0x1f
vid=0:  DISABLED(0), portMask=0x7c0, portNum=5
vid=1:       VLAN_1, portMask=0x10, portNum=1
vid=2:       VLAN_2, portMask=0x0f, portNum=4
vid=12: ISOLATED(12), portMask=0x00, portNum=0
Port - Vlan
 0  - VLAN_2
 1  - VLAN_2
 2  - VLAN_2
 3  - VLAN_2
 4  - VLAN_1
 5  - VLAN_ALL
load virtual interface vid = 1
 register if with name  
Init the hal
: Ilegal MTU value 1500,  rounding MTU to: 1506 
 if eth0 registered
load virtual interface vid = 2
 register if with name  
 if eth1 registered
PPP generic driver version 2.4.2
PPP Deflate Compression module registered
PPP BSD Compression module registered
SCSI subsystem driver Revision: 1.00
physmap flash device: 1000000 at f4000000
cfi_cmdset_0001: Erase suspend on write enabled
Using buffer write method
Using command line partition definition
Creating 3 MTD partitions on "Physically mapped flash":
0x00000000-0x00600000 : "root"
0x00600000-0x00700000 : "nvram"
0x00700000-0x00800000 : "uboot"
usb.c: registered new driver hub
EHCI Marvell Init
ehci_marvell_probe: driver=c01ecc40
hcd allocated: marvell_hcd=c02ee664
mv_ehci_0: IRQ=17, Regs=f1050100
mv_ehci - Bus allocated: bus=c02e0e40
usb.c: new USB bus registered, assigned bus number 1
mv_ehci - Bus registered: bus=c02e0e40
ehci_hcd <NULL>: USB 2.0 enabled, EHCI 1.00, driver 2003-Dec-29/2.4
hub.c: USB hub found
ehci_hub_descriptor: hcs_params=0x10011, ports=1, Characteristics=0x0089
hub.c: 1 port detected
mv_ehci - Started
host/usb-uhci.c: $Revision: 1.1.1.1 $ time 14:28:59 Jul 26 2007
host/usb-uhci.c: High bandwidth mode enabled
host/usb-uhci.c: v1.275:USB Universal Host Controller Interface driver
usb.c: registered new driver hiddev
usb.c: registered new driver hid
hid-core.c: v1.8.1 Andreas Gal, Vojtech Pavlik <vojtech@suse.cz>
hid-core.c: USB HID support drivers
pegasus.c: v0.4.32 (2003/06/06):Pegasus/Pegasus II USB Ethernet driver
usb.c: registered new driver pegasus
rtl8150.c: rtl8150 based usb-ethernet driver v0.4.3 (2002/12/31)
usb.c: registered new driver rtl8150
Initializing USB Mass Storage driver...
usb.c: registered new driver usb-storage
USB Mass Storage support registered.
Initializing Cryptographic API
NET4: Linux TCP/IP 1.0 for NET4.0
IP Protocols: ICMP, UDP, TCP, IGMP
IP: routing cache hash table of 512 buckets, 4Kbytes
TCP: Hash tables configured (established 2048 bind 4096)
GRE over IPv4 tunneling driver
Linux IP multicast router 0.06 plus PIM-SM
vid = 1 mvBindings[priv->vid]->header[0] = 24 
IP-Config: Guessing netmask 255.255.255.0
IP-Config: Complete:
      device=eth0, addr=192.168.0.1, mask=255.255.255.0, gw=255.255.255.255,
     host=DB88FXX81, domain=, nis-domain=(none),
     bootserver=192.168.0.100, rootserver=192.168.0.100, rootpath=
ip_conntrack version 2.1 (256 buckets, 2048 max) - 308 bytes per conntrack
ip_conntrack_rtsp v0.01 loading
ip_nat_rtsp v0.01 loading
ip_conntrack_pptp version 1.9 loaded
ip_nat_pptp version 1.5 loaded
ip_tables: (C) 2000-2002 Netfilter core team
ipt_time loading
NET4: Unix domain sockets 1.0/SMP for Linux NET4.0.
NET4: Ethernet Bridge 008 for NET4.0
Fast Floating Point Emulator V0.94M by Peter Teichmann.
cramfs: wrong magic
FAT: bogus logical sector size 34276
UMSDOS: msdos_read_super failed, mount aborted.
FAT: bogus logical sector size 34276
FAT: bogus logical sector size 34276
CLEANMARKER node found at 0x00010000, not first node in block (0x00000000)
CLEANMARKER node found at 0x00030000, not first node in block (0x00020000)
CLEANMARKER node found at 0x00050000, not first node in block (0x00040000)
CLEANMARKER node found at 0x00070000, not first node in block (0x00060000)
CLEANMARKER node found at 0x00090000, not first node in block (0x00080000)
CLEANMARKER node found at 0x000b0000, not first node in block (0x000a0000)
CLEANMARKER node found at 0x000d0000, not first node in block (0x000c0000)
CLEANMARKER node found at 0x000f0000, not first node in block (0x000e0000)
CLEANMARKER node found at 0x00110000, not first node in block (0x00100000)
CLEANMARKER node found at 0x00130000, not first node in block (0x00120000)
CLEANMARKER node found at 0x00150000, not first node in block (0x00140000)
CLEANMARKER node found at 0x00170000, not first node in block (0x00160000)
CLEANMARKER node found at 0x00190000, not first node in block (0x00180000)
CLEANMARKER node found at 0x001b0000, not first node in block (0x001a0000)
CLEANMARKER node found at 0x001d0000, not first node in block (0x001c0000)
CLEANMARKER node found at 0x001f0000, not first node in block (0x001e0000)
CLEANMARKER node found at 0x00210000, not first node in block (0x00200000)
CLEANMARKER node found at 0x00230000, not first node in block (0x00220000)
CLEANMARKER node found at 0x00250000, not first node in block (0x00240000)
CLEANMARKER node found at 0x00270000, not first node in block (0x00260000)
CLEANMARKER node found at 0x00290000, not first node in block (0x00280000)
CLEANMARKER node found at 0x002b0000, not first node in block (0x002a0000)
CLEANMARKER node found at 0x002d0000, not first node in block (0x002c0000)
CLEANMARKER node found at 0x002f0000, not first node in block (0x002e0000)
CLEANMARKER node found at 0x00310000, not first node in block (0x00300000)
CLEANMARKER node found at 0x00330000, not first node in block (0x00320000)
CLEANMARKER node found at 0x00350000, not first node in block (0x00340000)
CLEANMARKER node found at 0x00370000, not first node in block (0x00360000)
CLEANMARKER node found at 0x00390000, not first node in block (0x00380000)
CLEANMARKER node found at 0x003b0000, not first node in block (0x003a0000)
CLEANMARKER node found at 0x003d0000, not first node in block (0x003c0000)
CLEANMARKER node found at 0x003f0000, not first node in block (0x003e0000)
CLEANMARKER node found at 0x00410000, not first node in block (0x00400000)
CLEANMARKER node found at 0x00430000, not first node in block (0x00420000)
CLEANMARKER node found at 0x00450000, not first node in block (0x00440000)
VFS: Mounted root (jffs2 filesystem).
Freeing init memory: 88K
8ZZZZ

BusyBox v1.1.0 (2007.07.26-06:29+0000) Built-in shell (ash)
Enter 'help' for a list of built-in commands.

/ # device eth1 entered promiscuous mode
vid = 2 mvBindings[priv->vid]->header[0] = 0 
eth0: mac address changed
vid = 1 mvBindings[priv->vid]->header[0] = 24 
eth1: mac address changed
vid = 2 mvBindings[priv->vid]->header[0] = 0 
init gpio_ioctl Successful,  major = 201
GPIO driver for DIR615
gpio.o: opened.
gpio.o: closed.
gpio.o: opened.
gpio.o: opened.
gpio.o: opened.
gpio.o: opened.
br0: port 1(eth1) entering learning state
br0: port 1(eth1) entering forwarding state
br0: topology change detected, propagating
wan action: UNPLUG upnp
pc : [<40133dcc>]    lr : [<00009104>]    Tainted: P 
sp : befffe2c  ip : 00011818  fp : befffe48
r10: 00000000  r9 : 00000000  r8 : 00011a38
r7 : 00000000  r6 : 00000000  r5 : 000118c8  r4 : 0000000b
r3 : 00000000  r2 : 00000065  r1 : 0000946c  r0 : 0000000a
Flags: nzCv  IRQs on  FIQs on  Mode USER_32  Segment user
Control: A005317F  Table: 01A04000  DAC: 00000015
gpio.o: closed.
help

Built-in commands:
-------------------
        . : alias bg break cd chdir continue eval exec exit export false
        fg hash help jobs kill let local pwd read readonly return set
        shift times trap true type ulimit umask unalias unset wait

/ #

(Last edited by glk17 on 4 Apr 2010, 15:18)

Hi, and thank's for all this amazing work.

I have a WRT350n V2 and I have installed a serial port on it.
Done correctly TFTP ramdisk boot and sysupgrade from Maddes.b FTP.
Everything is ok, except WIFI: it works OK, but can't manage to make it work at 802.11n rates.

I have another question: do you know scripts to add in /lib/preinit to manage root pivot on USB partition ?

baxter104 wrote:

but can't manage to make it work at 802.11n rates.

I have encountered devices that refuse to work in 11ng mode, also I have encountered devices that refuse to work in 11g mode (they only work if n is also enabled -- maybe this is one of the differences between v2.0 and v2.1?). For now there is little that you can do but wait (submit bugreports?) until ath9k (http://linuxwireless.org/en/users/Drivers/ath9k) drivers are updated to fix these problems.

(Last edited by StrikerNL on 7 Apr 2010, 08:02)

Seems we just missed the macaddr support for the 10.03 release. A bit of a shame, but oh well.

Uh, that was a fast (not to say hasty) release of Backfire.
Fortunately the fix for the mac address issue is only a script fix, no compilation, so can be applied by anyone with ease.
Created ticket #7111 for it, to document it for others.

(Last edited by maddes.b on 7 Apr 2010, 18:46)

maddes.b wrote:

Uh, that was a fast (not to say hasty) release of Backfire.

Indeed, slightly odd to say the least? 3 rc's and a final in less than two weeks?

The second part of the mac address fix for WRT350Nv2 has been reworked:

#!/bin/sh
#
# Copyright (C) 2010 Peter van Valderen and Matthias Buecher
#
# This script reads the WRT350Nv2 hardware lan mac address from
# the u-boot partition and assigns it to all lan devices
#

# determine U-Boot mtd partition number
MTD=`grep -e 'u-boot' /proc/mtd`
MTD=`echo ${MTD} | sed 's/[a-z]*\([0-9]*\):.*/\1/'`
[ -z "${MTD}" ] && {
    echo 'No U-Boot mtd partition found, exiting...'
    return 1
}

MACADDR=`dd if=/dev/mtdblock${MTD} bs=1 skip=262048 count=6 2>/dev/null | hexdump -e '1/1 "%02x"'`
MACADDR2=$(( 0x${MACADDR} + 1))
MACADDR2=`printf "%012x" ${MACADDR2}`

MACADDR=`echo ${MACADDR} | sed 's/\(..\)/\1:/g' | sed 's/:$//'`
MACADDR2=`echo ${MACADDR2} | sed 's/\(..\)/\1:/g' | sed 's/:$//'`

# add mac address to each section
uci set network.eth0.macaddr=$MACADDR
uci set network.lan.macaddr=$MACADDR
uci set network.wan.macaddr=$MACADDR2
uci commit

Already incorporated this into the uci-defaults script and created ticket #7113 for it.

(Last edited by maddes.b on 8 Apr 2010, 18:22)

Hi everyone,
May be it is not a right place to ask my question, sorry for that.
But: does Backfire firmware allow to do hard reset? I've flashed my 350v2 and have done all my settings but finally like to do hard reset (you know, all time it is essential step) and have no success. The router keep all settings.
I`m a little bit confused.

Thanks for any advise.

Call the following command on the command line, then reboot your router.

firstboot

This will reset OpenWrt and it will be like after a clean flash (all your settings erased).

maddes.b wrote:

Call the following command on the command line, then reboot your router.

firstboot

This will reset OpenWrt and it will be like after a clean flash (all your settings erased).

Thanks a lot!

Now after i've tried to apply MAC patch and change it in 'lan' interfaces menu I cannot get GUI. Laptop can connect to router both lan and wifi (does WPA2, DHCP works, etc., so looks like working normal) but all times i got 'timeout' when try to connect to webGUI.

Actually it seems i must to restore through tftp sad

Lan MAC should propagate to lan bridge children, as I can see from the script above, It doesn't do that nor automagically. So your problem to access.
Fortunately I have a remedy for that:

# Copy MAC from the bridge to its interfaces
# DEBUG="echo"
bridge_mac() {
    local brif macaddr
    for brif in $(brctl show | awk '$2 ~ /^[0-9].*\./ { print $1 };!/faces$/ { print $NF }'); do
        case "$brif" in
            br-*)
                # Get the MAC address for bridge interfaces
                macaddr="$(ifconfig $brif | awk '/HWaddr/ {print $5}')"
            ;;
            *)
                # Set the MAC address of bridge interfaces
                $DEBUG ifconfig "$brif" hw ether "$macaddr"
            ;;
        esac
    done
}

BTW on the wiki WNR854T appears twice, on lan ports counts "gbE" is missing, even on the WTR350Nv2 description.

@behemoth_kat:
First do you need a different MAC address? If not, then no need to apply the MAC address patch in advance.
If you do, then did you read *this* page completely about the MAC address fix? And applied the config.sh patch correctly (post #804)?

(Last edited by maddes.b on 8 Apr 2010, 18:21)

maddes.b wrote:

@behemoth_kat:
First do you need a different MAC address? If not, then no need to apply the MAC address patch in advance.
If you do, then did you read *this* page completely about the MAC address fix? And applied the config.sh patch correctly (post #804)?

yes, i need a different MAC address because of provider restriction. And again yes about for second question with one remark: i cannot get command line (and connect router in general) after i apply MAC patch and changed my MAC address for *lan* interface although it looks like boots and working all interfaces, etc.

For all my tests "network.eth0.macaddr" and "network.lan.macaddr" were set to the same MAC address.

While testing different MAC addresses I recognized that a switch, which is between my PC and the WRT350Nv2, doesn't recognize the new MAC address and prevents connection.
Just turning it off and back on to clear the ARP tables, etc. worked for me.

(Last edited by maddes.b on 8 Apr 2010, 18:41)

Next weekend my ftp space will be completely erased.
So if you still need old WRT350Nv2 stock firmwares and/or sources, then hurry.

(Last edited by maddes.b on 8 Apr 2010, 18:43)

maddes.b wrote:

Just turning it off and back on to clean the ARP tables, etc. worked for me.

looks like it doesn't work for my wrt350nv2. Keep all settings (IP, SSID) after different attempts to reset (303030, 30/5/5)

Is any chance to get CL or reset router in other way?