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.

for TFTP-server setup and Building of the image:

With serial connection use `printenv ´ and look for the correct
ip-adresses used in uboot environment, in my case the router expects  TFTP-server to have 172.21.5.30 IP-adress
and with this information I compiled my image already with 172.21.5.1 for router-IP, so you don´t have to change always
the IP-adresses from your server, or other PC
the login for Telnet, or http is also 172.21.5.1

br

cm

maddes.b wrote:

(as normal user)
mkdir ~/kamikaze-webtest/                                 
... do all the checkout stuff from the HowTo ...
patch -p0  < <patchfile>
svn add tools/wrt350nv2-builder
svn propset svn:executable "*" tools/wrt350nv2-builder/src/wrt350nv2-reflashscript

I've been having trouble with the build after issuing the svn propset command. Without it, build works fine, but when I set it, make fails at the point of compiling webupgrade. If I don't set it (I forgot to one time) make works just fine and a .img file is created, however if I add this command, build doesn't work.. Have I made some kind of mistake? (I am a noob, it's not unlikely!) I tried my best to follow the instructions to the letter...

Update:

Build finally worked! A flashable image was created and using the web interface I was able to flash successfully!

However.... (don't you hate that word? I think it was invented specifically for geeks and beta testers hmm )

I can connect via telnet (thank god).

I can't edit /etc/config/network. I can open it in vi, I can make all the changes I like, I can write the file, but when I reboot the router, all my changes are gone!

I did a df, everything is full hmm 100%

Is there something I need to mount? I let the router do it's thing after the upgrade, I remember Dirk mentioning a 2nd reboot and some kind of formatting of jffs2, but I don't see any /jffs2 listed in the df..

Any ideas anyone?

(Last edited by DaBigMac on 14 Mar 2009, 19:02)

Check what does mount say about mini_fo - you should have jffs2 partition mounted on /jffs and merged with squashfs on root, something like:

/dev/mtdblock2 on /jffs type jffs2 (rw)
mini_fo:/jffs on / type mini_fo (rw)

There should also be a rootfs_data mtd partition created automatically by kernel (this one takes up all the space inside rootfs partition that's not actually occupied by squashfs):

root@OpenWrt:/# cat /proc/mtd
dev:    size   erasesize  name
mtd0: 00160000 00010000 "kernel"
mtd1: 00660000 00010000 "rootfs"
mtd2: 001a0000 00010000 "rootfs_data"
mtd3: 00040000 00010000 "u-boot"

What you describe looks like you only have ramdisk merged on root, which means any files you write will get lost after reset. JFFS2 partition should be created some time after the first system boot, and then mounted automatically on every reboot. Can you post whole serial console log from reset to a completely started system? There's probably something wrong with jffs2 creation (not enough place perhaps? how large's your kernel+root image?)

(Last edited by relghuar on 17 Mar 2009, 19:54)

For me it looks like this:

root@OpenWrt:/# mount mini_fo
mount: can't find mini_fo in /etc/fstab
root@OpenWrt:/# mount
...
mini_fo:/tmp/root on / type mini_fo (rw)
root@OpenWrt:/# cat /proc/mtd
dev:    size   erasesize  name
mtd0: 00100000 00010000 "kernel"
mtd1: 00650000 00010000 "rootfs"
mtd2: 00170000 00010000 "rootfs_data"
mtd3: 00040000 00010000 "u-boot"

The images have the following sizes:
openwrt-wrt350nv2-uImage = 989KB
openwrt-wnr854t-squashfs.img = 2.432KB
openwrt-wrt350nv2-webupgrade.img = 5.942KB

Here's the complete log:

...snip....
Uncompressing Linux................................................................. done, booting the kernel.
Linux version 2.6.28.7 (openwrt@debian5) (gcc version 4.1.2) #2 Sun Mar 15 17:58:48 CET 2009
...snip....
squashfs: version 3.0 (2006/03/15) Phillip Lougher
Registering mini_fo version $Id$
JFFS2 version 2.2. (NAND) (SUMMARY)  © 2001-2006 Red Hat, Inc.
msgmni has been set to 59
io scheduler noop registered
io scheduler deadline registered (default)
Serial: 8250/16550 driver2 ports, IRQ sharing disabled
serial8250.0: ttyS0 at MMIO 0xf1012000 (irq = 3) is a 16550A
console [ttyS0] enabled
MV-643xx 10/100/1000 ethernet driver version 1.4
mv643xx_eth smi: probed
net eth0: port 0 with MAC address 00:00:00:00:51:81
physmap platform flash device: 00800000 at f4000000
physmap-flash.0: Found 1 x16 devices at 0x0 in 8-bit bank
 Amd/Fujitsu Extended Query Table at 0x0040
physmap-flash.0: Swapping erase regions for broken CFI table.
number of CFI chips: 1
cfi_cmdset_0002: Disabling erase-suspend-program due to code brokenness.
cmdlinepart partition parsing not available
Searching for RedBoot partition table in physmap-flash.0 at offset 0x7f0000
No RedBoot partition table detected in physmap-flash.0
Using physmap partition information
Creating 3 MTD partitions on "physmap-flash.0":
0x00000000-0x00100000 : "kernel"
0x00100000-0x00750000 : "rootfs"
mtd: partition "rootfs" set to be root filesystem
mtd: partition "rootfs_data" created automatically, ofs=5E0000, len=170000
0x005e0000-0x00750000 : "rootfs_data"
0x007c0000-0x00800000 : "u-boot"
i2c /dev entries driver
TCP westwood registered
NET: Registered protocol family 17
Distributed Switch Architecture driver version 0.1
eth0: detected a Marvell 88E6131 switch
dsa slave smi: probed
802.1Q VLAN Support v1.8 Ben Greear <greearb@candelatech.com>
All bugs added by David S. Miller <davem@redhat.com>
drivers/rtc/hctosys.c: unable to open rtc device (rtc0)
VFS: Mounted root (squashfs filesystem) readonly.
Freeing init memory: 88K
Please be patient, while OpenWrt loads ...
- preinit -
Press CTRL-C for failsafe
switching to jffs2
Cowardly refusing to erase blocks on filesystem with no valid JFFS2 nodes
empty_blocks 0, bad_blocks 0, c->nr_blocks 23
jffs2 not ready yet; using ramdisk
mini_fo: using base directory: /
mini_fo: using storage directory: /tmp/root
- init -

Please press Enter to activate this console. eth0: link up, 1000 Mb/s, full duplex, flow control disabled
eth0: link up, 1000 Mb/s, full duplex, flow control disabled
device lan2 entered promiscuous mode
device eth0 entered promiscuous mode
device lan1 entered promiscuous mode
device lan3 entered promiscuous mode
device lan4 entered promiscuous mode
cfg80211: Using static regulatory domain info
cfg80211: Regulatory domain: US
        (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
        (2402000 KHz - 2472000 KHz @ 40000 KHz), (600 mBi, 2700 mBm)
        (5170000 KHz - 5190000 KHz @ 40000 KHz), (600 mBi, 2300 mBm)
        (5190000 KHz - 5210000 KHz @ 40000 KHz), (600 mBi, 2300 mBm)
        (5210000 KHz - 5230000 KHz @ 40000 KHz), (600 mBi, 2300 mBm)
        (5230000 KHz - 5330000 KHz @ 40000 KHz), (600 mBi, 2300 mBm)
        (5735000 KHz - 5835000 KHz @ 40000 KHz), (600 mBi, 3000 mBm)
cfg80211: Calling CRDA for country: US
Registered led device: ath9k-phy0::radio
Registered led device: ath9k-phy0::assoc
Registered led device: ath9k-phy0::tx
Registered led device: ath9k-phy0::rx
phy0: Atheros AR5416 MAC/BB Rev:2 AR2133 RF Rev:81: mem=0xc2980000, irq=36
cfg80211: Calling CRDA for country: AT
PPP generic driver version 2.4.2
ip_tables: (C) 2000-2006 Netfilter Core Team
nf_conntrack version 0.5.0 (512 buckets, 2048 max)



BusyBox v1.11.3 (2009-03-14 18:06:36 CET) built-in shell (ash)
Enter 'help' for a list of built-in commands.

  _______                     ________        __
 |       |.-----.-----.-----.|  |  |  |.----.|  |_
 |   -   ||  _  |  -__|     ||  |  |  ||   _||   _|
 |_______||   __|_____|__|__||________||__|  |____|
          |__| W I R E L E S S   F R E E D O M
 KAMIKAZE (bleeding edge, r14889) -------------------
  * 10 oz Vodka       Shake well with ice and strain
  * 10 oz Triple sec  mixture into 10 shot glasses.
  * 10 oz lime juice  Salute!
 ---------------------------------------------------
root@OpenWrt:/#

After some minutes the following came up:

Cowardly refusing to erase blocks on filesystem with no valid JFFS2 nodes
empty_blocks 0, bad_blocks 0, c->nr_blocks 23

Build was done from scratch, just target system "Marvell Orion" selected then saved and compiled.

(Last edited by maddes.b on 21 Mar 2009, 11:30)

Hmm strange one... I've never seen this message before, it's a kernel output probably from jffs2 module. The only thing I can think of now is the image creation patch and webupgrade process. It's not quite straightforward actually, if you would only take stock webupgrade image from linksys site and burn it directly to flash it wouldn't work (you wouldn't even get to u-boot command line, just to some strange ethernet interface from sercomm), so the webupgrade process modifies the image in some ways. I have no idea how exactly, but I suppose it could possibly cause problems for jffs2 format process.
I can't really test it as I've never used the webupgrade way, just direct u-boot flashing. And I'm not sure after all the tweaks I've done to u-boot and router itself that I can still bring the stock firmware back online smile
If you feel adventurous you can try to flash openwrt through u-boot (see my post in this thread about a month back). If the process is not clear from my ranting there, just let me know and I can set up an exact procedure for you...

(Last edited by relghuar on 18 Mar 2009, 02:34)

maddes.b wrote:

For me it looks like this:

After some minutes the following came up:

Cowardly refusing to erase blocks on filesystem with no valid JFFS2 nodes
empty_blocks 0, bad_blocks 0, c->nr_blocks 23

Build was done from scratch, just target system "Marvell Orion" selected then saved and compiled.

Could you check to see if you have a file called '/bin/root.squashfs.clean' in you system? If that's the case the reflash hasn't done it's work yet, you should just be able to use dd to flash this clean filesystem to your rootfs partition. Just reboot after that and everthing should be fine.

dd if=/bin/root.squashfs.clean of=/dev/mtdblock1

(Last edited by dirkNL on 18 Mar 2009, 02:56)

File is present and flashed it as told:

root@OpenWrt:/# ls -la /bin/root*
-rwx------    1 root     root      1310724 Mar 15  2009 /bin/root.squashfs.clean
root@OpenWrt:/# dd if=/bin/root.squashfs.clean of=/dev/mtdblock1
2560+1 records in
2560+1 records out

On the first reboot I got the following additional log:

jffs2_scan_eraseblock(): End of filesystem marker found at 0x0
jffs2_build_filesystem(): unlocking the mtd device... done.
jffs2_build_filesystem(): erasing all blocks after the end marker... done.
mini_fo: using base directory: /
mini_fo: using storage directory: /jffs
...
root@OpenWrt:/# mount
...
mini_fo:/jffs on / type mini_fo (rw)

When I changed some settings then they were available after the next reboot:

root@OpenWrt:/# uci set network.lan.dns=10.0.0.254
root@OpenWrt:/# uci set network.lan.gateway=10.0.0.254
root@OpenWrt:/# uci commit
root@OpenWrt:/# reboot
...
root@OpenWrt:/# uci show network

Thanks for your help Dirk, that fixed it.
It seems the webupgrade image still has some issues sad

Kind regards
Maddes

Well, you could check if the filesystem you initially flashed contains a file in the rc called S99flash or something similar. Perhaps this "service" wasn't copied and so the reflash wasn't done for you...

I reflashed and checked, the file /etc/rc.d/S99reflash was present but not executable.
Updated the webupgrade patches to include a "chmod +x" for it, reflashed and it worked.
Get it from this post.

(Last edited by maddes.b on 21 Mar 2009, 02:10)

I've made some unwise changes to my config. Is there any way to clear the nvram, or restore default settings??

I've tried various lengths of time pressing the reset button, nothing seems to restore defaults..

I have a serial connection, so I have access to uboot and the openwrt terminal..

P.S. The problem with the /jffs2 was solved by the solution suggested. I had exactly the same problems as maddes.b did. I have not as yet tried the new webupgrade patch, but it's on my to do list. I'd prefer to get my current configuration working again.

Many thanks,

Mannie.

(Last edited by DaBigMac on 25 Mar 2009, 03:48)

BigMac, nvram isn't used anymore, in its place is the jffs2 overlay.

You can run 'firstboot' in order to completely clean the the jffs2 overlay. Do a reboot afterwards and you should be running the default image again.

edit:
Oh wait, you haven't got linux. well ehr, can't you boot a clean image with tftp?

edit2:
i keep misreading... if you have the linux console, just run 'firstboot', and do a reboot. All should be restored to default

(Last edited by dirkNL on 25 Mar 2009, 16:22)

I want to say hello; I followed Your diskussion for a while and now I'll  try to set up my wrt350nv2 with OpenWrt. So let's go...

@maddes.b Your tutorials and summaries were very helpful, thank You!

After a couple of reflashing, the latest snapshot and LuCI are working.

But now I'm confused, because my wlan will not get up.
I have configured the wrt as N-client with WPA2-PSK.

$ uci show

wireless.wlan0=wifi-device
wireless.wlan0.type=mac80211
wireless.wlan0.channel=11
wireless.wlan0.disabled=1
wireless.@wifi-iface[0]=wifi-iface
wireless.@wifi-iface[0].device=wlan0
wireless.@wifi-iface[0].network=lan
wireless.@wifi-iface[0].mode=sta
wireless.@wifi-iface[0].encryption=psk2
wireless.@wifi-iface[0].key=deadbeef
wireless.@wifi-iface[0].ssid=openWRT

Seems to be OK.
My AP (WNR834B) displays the connection at 89% ... 49% ... off ... 89% ... and so on.
Serialconsole shows in a loop:

...
br-lan: topology change detected, propagating
br-lan: port 5(wlan0) entering forwarding state
br-lan: port 5(wlan0) entering disabled state
br-lan: topology change detected, propagating
br-lan: port 5(wlan0) entering forwarding state
br-lan: port 5(wlan0) entering disabled state
...

Is that still an issue?
Or is a stable N/WPA2 link possible and I just have to configure something elsewhere.


@dirkNL
thanx for the advice concerning 'firstboot', but my wrt300nV2 hangs afterwards.
Serialconsole shows in a loop:

mini_fo_lookup: ERR from storage dentry, lookup failed.
mini_fo_d_delete: negative dentry passed.
mini_fo_d_release: no private data.
mini_fo_lookup: ERR from storage dentry, lookup failed.
mini_fo_d_delete: negative dentry passed.
mini_fo_d_release: no private data.
.......

After swiching off an on, it started clean, so no problem at all.

Update:
The unstable connection results of a different Fragmentation Threshold in my WNR834B.
Nevertheless, there is a handshake with the AP by now, but no data transmission.

I'll try a tcpdump....

(Last edited by mrk on 1 Apr 2009, 17:32)

dirkNL wrote:

BigMac, nvram isn't used anymore, in its place is the jffs2 overlay.

You can run 'firstboot' in order to completely clean the the jffs2 overlay. Do a reboot afterwards and you should be running the default image again.

edit:
Oh wait, you haven't got linux. well ehr, can't you boot a clean image with tftp?

edit2:
i keep misreading... if you have the linux console, just run 'firstboot', and do a reboot. All should be restored to default

Thanks DirkNL,

firstboot worked wonderfully. Now for some heavy BT'ing and stability testing.. Lets see how this thing handles load..

Update:

It seems there is still some way to go in utilizing the full performance of this router. Initial tests are not impressive. Over a 2Mb/s link, using PPPoE with standard settings (as per using LUCI to configure my WAN link), I was barely able to sustain 25K/s, barely more than 10% of the links capacity.

Wireless was even less impressive, I got an initial connection using an Intel 3945 wifi card, but within seconds, data flow would stop. I am planning further tests with other wifi adapters.

(Last edited by DaBigMac on 28 Mar 2009, 17:19)

To point your working copy to the new repository, go inside the working copy and execute:

svn switch --relocate https://svn.openwrt.org/openwrt/trunk svn://svn.openwrt.org/openwrt/trunk
svn up
./scripts/feeds update packages luci

(Last edited by maddes.b on 6 Jul 2009, 02:37)

DaBigMac wrote:

It seems there is still some way to go in utilizing the full performance of this router. Initial tests are not impressive. Over a 2Mb/s link, using PPPoE with standard settings (as per using LUCI to configure my WAN link), I was barely able to sustain 25K/s, barely more than 10% of the links capacity.

Wireless was even less impressive, I got an initial connection using an Intel 3945 wifi card, but within seconds, data flow would stop. I am planning further tests with other wifi adapters.

I can't say anything about wireless, cause I stopped testing new versions some time ago. But I'm surprised at the PPPoE speeds, normal routed traffic (WAN->LAN) shows a very solid 13MB/s on my device as well as the one used by Striker. Don't know about the PPPoE overhead but I couldn't believe that it will be this bad. Maybe someone else can confirm?

Striker and I are both using the router quite some time now on a 100mbit internet connection and so far everything is flying, so I'm surprised to read about this poor PPPoE ratings...

Wireless link ist now working in my configuration.

It is necessary to modify /etc/config/wireless, because LuCi can not handle 11n wifi by now.

The wireless config should be:

config 'wifi-device' 'wlan0'
        option 'type' 'mac80211'
        option 'channel' '9'
        option 'hwmode' '11ng'
        option 'ht_capab' '[HT40-][SHORT-GI-40][DSSS_CCK-40]'
        option 'disabled' '0'

config 'wifi-iface'
        option 'device' 'wlan0'
        option 'mode' 'ap'
        option 'network' 'lan'
        option 'encryption' 'psk2'
        option 'key' ''YourCode'
        option 'ssid' 'openWRT'

The important options are hwmode and ht_capab and be aware chossing a channel beyond '6'.
The options will be transformed by /etc/lib/wifi/hostapd.sh to the correct hostapd.conf file.
You can whatch the result in /var/run directory.

A usefull link is http://www.mail-archive.com/ath9k-devel … 01138.html

The wireless link could be better, but is stable!
My best iperf result -with standard values- has been about 12Mbits/s.
My general values are around 6Mbits/s, but the ap is now circa two walls away in another room.

I think it is now necessary to analyse the wireless stream an collect some debug information for the wireless testing team.

By the way, I have (only) a 10GB - DSL and speed.io shows a bandwith around 9000KBits/s using ppoe.
For me it's as good as before with the original firmware.

Well, I enjoy openWrt on my WRT350Nv2. And I will keep going it and playing something around.
Can someone give me some hints concerning the leds. They are aweful for wifi.

Well my next step will be to harden the webupdate application.
Doing some error checking and the '-v' parameter.

And maybe I will write a tutorial with the "hall of pitfalls" for newbies.
I've learned quite much about openWrt in the last weeks and it's fascinating.

But now my girl want's me back for some time and I have to go on vacation ;-)

Greets Michael

Just tested r15432, but lan port #4 is still not working.

(Last edited by maddes.b on 29 Apr 2009, 00:26)

It's an issue in the upstream drivers, not OpenWrt specific.. When it's fixed, this issue will be gone.

Kaloz wrote:

It's an issue in the upstream drivers, not OpenWrt specific.. When it's fixed, this issue will be gone.

Maybe sooner than you think smile

Lennert and I were just looking to find what was causing the disabled port, turns out it was the switch-chip not setting up all of its in/external ports. Though it will fixed upstream with kernel 2.6.30, if you can't wait here's the fix:

In the kernel sources open up file: net/dsa/mv88e6131.c
line 271 should state:

for (i = 0; i < 6; i++) {

replace that with:

for (i = 0; i < 11; i++) {

And you're good to go.


As for the wireless, I can confirm the post by mrk. Wifi is now stable, though I'd like to add one note. If you are, like me, only using wireless G. Change the hwmode to 11g instead of 11ng. Early tests pointed out 25% increase in wireless G transferspeed with the use of WPA2.

(Last edited by dirkNL on 4 May 2009, 17:47)

Created a patch file called "999-net_dsa_mv88e6131_port_fix.patch" for this and uploaded it on my ftp space.
Just place it inside target/linux/generic-2.6/patches-2.6.28 (or whatever kernel version before 2.6.30 you compile).

Tested with revision 15597 and lan port #4 works fine.

Update: Complete patch from Lennert now in OpenWrt repository.

(Last edited by maddes.b on 8 May 2009, 18:44)

The patch for lan port #4 from Lennert was added by Kaloz in revision 15697.

The snapshot repositories are still not available after the server change, hence I created a repository for Marvel Orion with all buildable packages of revision 15772.

Edit the first lines in /etc/opkg.conf to deactivate the original snapshot repository by outcommenting it, then add a new line which points to my package repository:

#src/gz snapshots http://downloads.openwrt.org/snapshots/orion/packages
src/gz Maddes ftp://ftp.maddes.net/openwrt/kamikaze/orion/packages

Another Orion repository is also available from X-Wrt:

src X-Wrt http://downloads.x-wrt.org/xwrt/kamikaze/snapshots/orion/packages

Update:
Original repository is back, [s]but with issues[/s].

(Last edited by maddes.b on 13 Jul 2009, 23:29)

That's all very useful maddes, thanks a lot for your work!

root@OpenWrt:/tmp# dd if=wrt350nv2-uImage of=/dev/mtdblock0
dd: writing '/dev/mtdblock0': No space left on device
2049+0 records in
2048+0 records out

copy kernel from 0xff800000 to 0x400000 with size 0x200000
## Booting image at 00400000 ...
   Image Name:   Linux-2.6.28.10
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    1061680 Bytes =  1 MB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... Bad Data CRC
Marvell>>

How to change the size of mtd0?

(Last edited by heji on 15 May 2009, 07:56)