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.

If restarting wireless is sufficient, then you can do this via a simple nightly cron job:

# file: /etc/crontabs/root

# Restarts router, interrupts LAN for a longer period (1+ minute)
#0 5     * * *     reboot

# Restarts network only, interrupts LAN for a long period (~1 minute)
#0 5     * * *     /etc/init.d/network restart

# Restarts only Wireless/WLAN/Wifi plus Internet connection, does not interrupt LAN (good for backups, etc.)
0 5     * * *     /sbin/wifi up
0 5     * * *     /sbin/ifup wan

Could you also update your previous posts with the OpenWrt revisions you are currently running with. Thanks.

(Last edited by maddes.b on 6 Apr 2010, 00:31)

Thanks! I'll try that next time it happens. I plan to power off the router and modem with usb, if network restart doesn't work. But I need a build environment first smile I'm running build 19562, everything seems to work as expected (except luci, can't access a few modules, but I'll deinstall luci anyway)

I've installed the new build 19562(the upgrade removed my ftp issues) and I'm having issues with qos-scripts and iptables throwing segmentation faults when I invoke the mark module

so for instance

iptables -t mangle -A FORWARD -p UDP

functions fine


iptables -t mangle -A FORWARD -p UDP -j MARK

throws a segmentation fault

I'd like to check if it's just me or if others are experiencing the same problems or if I've messed up the installation and broken something strange though I've been trying reinstalling the relevant packages.

Can you please check the linux kernel version with "uname -a"?
If it says 2.6.32.x instead of 2.6.30.x, then I accidentially uploaded a test build of 19562.

Executed both commands without issues on my system, but I do not have qos-sccripts installed, so I just get a normal iptables error message.

maddes.b wrote:

Can you please check the linux kernel version with "uname -a"?
If it says 2.6.32.x instead of 2.6.30.x, then I accidentially uploaded a test build of 19562.

Executed both commands without issues on my system, but I do not have qos-sccripts installed, so I just get a normal iptables error message.

Linux OpenWrt #1 Tue Feb 9 18:31:15 CET 2010 armv5tel GNU/Linux

if qos-scripts aren't installed you might not have the mark module installed for iptables, I believe the relevant module is iptables-mod-ipopt

Could reproduce the problem, the 2nd command results in a segmentation fault ( Although without gdb, it's quite hard to debug smile (not enough space free for gdb)

You can install additional huge packages onto usb storage. This was also discussed in this thread and several others, the wiki contains some information too.
If I remember correctly you specify a different dest root in opkg.conf plus some more.

I only have a vfat usb hdd at the moment. I need a build environment anyway and with debug symbols it might be a bit easier to debug (I haven't done debugging on anything busybox, so I have no idea if it'll work. ulimit -c unlimited didn't produce a core file, as I would have expected)
network restart resolved my connection problem, so I'll add a cron job for that. My repeater shows 130MBit/s - I had that with the stock firmware as well until I changed some wifi settings, so I'll play with the settings a bit too wink

changed htmode to HT40+ / HT40- ... my repeater shows 300MBit/s - need to do a few performance tests, but it looks good

HT40 is way way to unstable to be usefull. Wouldn't recommend it.

Doesn't seem to be HT40 related, needed to restart the network a few times today because wifi wasn't working properly. (was connected, but couldn't ping the router)

(Last edited by strale on 14 Feb 2010, 21:48)


After reading this lengthy thread <whew> I hope I've got this question right...  smile

I have an WNR845T with a very old Xwrt flash. (r13021).  no wan support   <been a nice paperweight for over a year!>
Lan and webif are working so to upgrade I just need your updated sysupgrade, mtd, and  etc...
I don't have means to compile at present, and no jtag/serial tools.

Is there an ipk or tarball the needed binaries/scripts?  (or did I miss that one elusive post)

This would be an awesome tool to point many at on this thread at that had similar issues,
as well as a possible quick-fix to apply to the official builds until they integrate your patches.

Thanks so much for moving this platform along !  big_smile


I believe maddes is out of the country, he's not likely to respond anytime soon.

I don't think there is an easy way to upgrade from non openwrt firmware other than the original linksys firmware. Your only bet may be getting an mtd image and dd'ing it to mtdblock, but that's a shaky procedure at best (me and DirkNL bricked a WRT350n once using that exact procedure -- had to unbrick using JTAG).

I might be wrong though.

(Last edited by StrikerNL on 16 Feb 2010, 13:11)

Striker is right I'm "out of the country" (not at home), fortunately not out of this world.
Will have access to the forum from time to time.

You can not implement a new mtd partitioning into an existing old installation.
But you can update by flashing via "dd" or "mtd write".

First check your current mtd partitioning with "cat /proc/mtd".
For WNR845T it should be:
dev:    size   erasesize  name
mtd0: 00100000 000x0000 "kernel"
mtd1: 00660000 000x0000 "rootfs"

Then use the info from post #340, paragraph "Flashing in Linux / with same kernel mtd size".
Using "mtd write" would even be better than "dd", because I do not provide padded images anymore.
But if you want to use "dd" with a padded image, than above that paragraph is the code for "" which shows how to create a padded image.
And at the beginning of that post is an example how to split a squashfs release image ("openwrt-wnr854t-squashfs.img").

Read the mentioned posts, play around a little bit in linux with the images and "dd" (or in your router's /tmp dir).
If you feel comfortable you may decide to flash in linux via "dd" or "mtd write".
And I always recommend to document your steps, helps to find your own bugs and create good bug reports (what file, md5sum check, what commands, error messages, file sizes, file compares, etc.).
Process sequence:  download, md5 check, upload, md5 check, split, flash

(Last edited by maddes.b on 16 Feb 2010, 23:38)

I want to warn people for using dd for upgrading, i've been using it since the beginning of this project to flash my upgraded kernel and rootfs. However it seems as if it is no longer a solid option. 99% of the time the kernel flashes without problems, but the rootfs almost everytime now fails. You don't get an error message while flashing, but you do get a big hint that it hasn't done what it should. The dd command for flashing rootfs (approx 1mb) should take about 30 secs to complete. When you see the command finish after just 2 to 10 seconds, you know it is wrong. One way to recover from this is booting into a ramimage and flashing from within there.

The other way should be in recovery mode, but i have yet to work with that smile serial console is your friend.

X-Wrt IS OpenWrt with Webif² web interface. It can be downloaded from here. Currently at r19550.
So you must have ssh access to your router to fetch some info:
From Linux console: ssh root@
From Windows must use Putty.

sed -n 's,^H.*: ,,p' /proc/cpuinfo wrote:

Netgear WNR854T

opkg list_installed base-files wrote:

base-files - 26-r17427 -

cat /proc/mtd wrote:

dev:    size   erasesize  name
mtd0: 00100000 00020000 "kernel"
mtd1: 00660000 00020000 "rootfs"
mtd2: 00460000 00020000 "rootfs_data"
mtd3: 00040000 00020000 "uboot"

ls -la /dev/mtdblock* wrote:

brw-r--r--    1 root     root      31,   0 Dec 31  1969 /dev/mtdblock0
brw-r--r--    1 root     root      31,   1 Dec 31  1969 /dev/mtdblock1
brw-r--r--    1 root     root      31,   2 Dec 31  1969 /dev/mtdblock2
brw-r--r--    1 root     root      31,   3 Dec 31  1969 /dev/mtdblock3

Step 1: Download

cd /tmp

Step 2: md5 check

md5sum -c md5sums wrote:

md5sum: can't open 'openwrt-wrt350nv2-squashfs-webupgrade.img': No such file or directory
openwrt-wrt350nv2-squashfs-webupgrade.img: FAILED
md5sum: can't open 'openwrt-wrt350nv2-uImage': No such file or directory
openwrt-wrt350nv2-uImage: FAILED
md5sum: can't open 'openwrt-wnr854t-uImage': No such file or directory
openwrt-wnr854t-uImage: FAILED
md5sum: can't open 'openwrt-dt2-squashfs-webupgrade.img': No such file or directory
openwrt-dt2-squashfs-webupgrade.img: FAILED
md5sum: can't open 'openwrt-dt2-squashfs.img': No such file or directory
openwrt-dt2-squashfs.img: FAILED
md5sum: can't open 'openwrt-wrt350nv2-squashfs-recovery.bin': No such file or directory
openwrt-wrt350nv2-squashfs-recovery.bin: FAILED
md5sum: can't open 'openwrt-wrt350nv2-squashfs.img': No such file or directory
openwrt-wrt350nv2-squashfs.img: FAILED
openwrt-wnr854t-squashfs.img: OK
md5sum: can't open 'openwrt-wnr854t-squashfs-webupgrade.img': No such file or directory
openwrt-wnr854t-squashfs-webupgrade.img: FAILED
md5sum: can't open 'openwrt-orion-squashfs.img': No such file or directory
openwrt-orion-squashfs.img: FAILED
md5sum: can't open 'openwrt-dt2-uImage': No such file or directory
openwrt-dt2-uImage: FAILED
md5sum: WARNING: 10 of 11 computed checksums did NOT match

Step 3: File size

ls -la openwrt* wrote:

-rw-r--r--    1 root     root      3276800 Feb 16 15:17 openwrt-wnr854t-squashfs.img

Step 4: Split
Reading #340... Will edit later

(Last edited by Nilfred on 16 Feb 2010, 20:50)

Thanks Nilfred, for the start.

Step 4: Split
a) kernel uImage

dd if=openwrt-wnr854t-squashfs.img of=openwrt-wnr854t-uImage bs=1024k count=1

b) rootfs

dd if=openwrt-wnr854t-squashfs.img of=root.squashfs.wnr854t bs=1024k skip=1

Step 5: Flash
a) sync


b) kernel uImage

mtd write openwrt-wnr854t-uImage "kernel"

c) rootfs

mtd write root.squashfs.wnr854t "rootfs"

d) reboot


Use at your own risk.

(Last edited by maddes.b on 17 Feb 2010, 19:04)

Got access to my development machine.
Rebuild r17264 and r17456 to include the latest sysupgrade patch and the leds patch for WRT350Nv2.
Additionally build current r19684, only difference to OpenWrt snapshot is the leds patch for WRT350Nv2.

If there are no complaints about the led patch after I get back home, then I will submit it to the developer list to be put into trunk.
After that my ftp space will be deleted except for the r17xxx builds.

(Last edited by maddes.b on 7 Apr 2010, 21:44)

Who believe in magic?
So add this to the mwl8k driver for it to pick up the card:

+    { PCI_VDEVICE(MARVELL, 0x2a02), .driver_data = MWL8363, },

a813c8c0dd58deab9472d8e3e7c0fb5b  netmw145.sys
07fcb3fc7f2b4c7fbc78575796ea984b  fmimage_8XX1.fw
ccbbe74ebfae9daecbd329cc818faaa3  helper_8XX1.fw
Rename (not so) obviusly to:

Hope this work for Netgear WNR854T. I'm not a magician.

(Last edited by Nilfred on 15 Apr 2010, 08:00)

I could use some magic too!

I try to get an MP-6421 Mini PCI controller working with my WRT350nv2.
Unfortunately the controller doesn't show up on the PCI-bus. So I'm stuck right at the beginning:((
I would really like to see that card working.

PS: I did some testing (r19643) using iperf: Switching performance is nearly 300 Mbit/s. Not that bad. Jumboframe support seems to be broken, though.

To extract the firmware for the mwl8k driver, open your Ubuntu terminal:

sudo apt-get install cabextract unshield
mkdir mwl8k
cd mwl8k
wget -O mrv8k_extract_fw.c ''
mkdir mess
cabextract -F Disk1/data*.* -d mess wn311t_4_2_setup.exe
unshield -g Driver -d mess x mess/Disk1/
gcc -o mrv8k_extract_fw mrv8k_extract_fw.c
./mrv8k_extract_fw mess/Driver/netmw145.sys
rm -r mess
md5sum -b *.fw
mv fmimage_8XX1.fw fmimage_8363.fw
mv helper_8XX1.fw helper_8363.fw

Some outputs:

md5sum -b *.fw wrote:

48c79b085f7f5a590d3dbc15647e519f *fmimage_8XX0.fw
07fcb3fc7f2b4c7fbc78575796ea984b *fmimage_8XX1.fw
f22c7bf04808480422770b4a2b9c08ab *fmimage_8XX2.fw
941d3f9f88b78fe38f4bf8bd9d24a728 *fmimage_8XX3.fw
0fe11f415adbbd5e8ca03641705c4a6c *helper_8XX0.fw
ccbbe74ebfae9daecbd329cc818faaa3 *helper_8XX1.fw
561e43b20532ae19e8bdea9e8f296ff0 *helper_8XX2.fw

gcc -o mrv8k_extract_fw mrv8k_extract_fw.c -DUSE_OPENSSL -lcrypto wrote:

mrv8k_extract_fw.c:44:25: error: openssl/sha.h: File or directory does not exist
mrv8k_extract_fw.c: In function ‘main’:
mrv8k_extract_fw.c:84: warning: format ‘%x’ expects type ‘unsigned int’, but argument 2 has type ‘long int’
mrv8k_extract_fw.c:94: warning: format ‘%x’ expects type ‘unsigned int’, but argument 2 has type ‘long int’
mrv8k_extract_fw.c: In function ‘export_to_bin’:
mrv8k_extract_fw.c:132: error: ‘SHA_DIGEST_LENGTH’ undeclared (first use in this function)
mrv8k_extract_fw.c:132: error: (Each undeclared identifier is reported only once
mrv8k_extract_fw.c:132: error: for each function it appears in.)

(Last edited by Nilfred on 15 Apr 2010, 08:01)

Good morning everybody (time zone is CET).

Found a way to apply the WRT350Nv2 LED uci settings without disturbing other hardware.
Mainly by using a script in /etc/uci-defaults that checks for the hardware (similar to the sysupgrade), then applies the necessary uci settings for that hardware.
Also updated the USB script to work with different hardware and /sys/class/leds paths.
Updated patches are available at … es/kernel/

New builds when time allows.

(Last edited by maddes.b on 7 Apr 2010, 21:44)

maddes.b wrote:

Currently rebuilding 17264 with sysupgrade support for WRT350 and WNR854T. Will take 12-14 hours.

I did my first build in roughly 3 hours on Ubuntu 9.10 amd64:

sudo apt-get install subversion ncurses-term flex gettext zlib1g-dev libncurses5-dev gawk
cd ~
mkdir openwrt
cd openwrt
svn co svn://
cd ~/openwrt/trunk
make menuconfig
make package/symlinks
make -j6 V=99 download
make -j2
ls -la ~/openwrt/trunk/bin/orion/

As you can see, I use 6 threads for simultaneous download source code and 2 threads/cores to compile. I'm aware that "make -j2" breaks things (openssl documented)
Did I take too many shortcuts?
Where mwl8k.c, fmimage_8361.fw and helper_8361.fw should go?

Build time depends at first on the range of packages you select, and second if you start from scratch or if the tools were already build before.
Here are my values (all after a distclean), if the tools were already compiled then you can reduce these times by roughly 45 minutes:
* Mini build = 1.5h (nothing extra selected)
* Release build = 2.5h (all packages of trunk selected, and no extra feeds)
* Package build = 12h (all packages from trunk, package feed, luci feed, x-wrt feed)

Btw I'm compiling with Debian 5.0 "Lenny" x86 inside a VirtualBox VM with just 1 CPU of my Intel Quad 9650 (3GHz) on a Win XP x86 host.

Right now, I can not help with the mwl8k backport.
But after you have created your own build, just check if there are alreay mwl8k files inside your build tree (use find).
Then create a patch for mwl8k.c and put it in target/linux/orion/patches, see the existing patches to have a clue how your patch should look like, e.g. it must be a -p1 patch.
For the firmware files find out where they are typically located inside the build tree, then put them there.

Also I suggest to contact nbd of the OpenWrt team after you got most of that done.
He is normally very busy, but if you provide good prepared information (patch + firmware files), then he is normally helping or even committing WLAN/Wifi stuff to trunk.
Catch him on IRC or via mail

(Last edited by maddes.b on 21 Feb 2010, 20:41)

jow posted a fix for seg faults in r19827.
Maybe this will fix the issues with kernel 2.6.32.

Another trunk change to fix this is in r19851.

(Last edited by maddes.b on 25 Feb 2010, 02:39)

My WRT350Nv2.1 still encounters wifi problems (wifi network is visible but cannot connect to) every few days. Power recycle helps (haven't tried soft reboot).
KAMIKAZE r19544 from maddes.b, only luci added.

Instead of Striker's mentioned scheduled reboot we now have a cron running 'wifi' daily at 7am. AFAIK this is a good enough workaround for the unstable wifi. The instability here always came after a few days.

(Last edited by dirkNL on 25 Feb 2010, 00:23)

I compiled r19875 with kernel and got no seg faults with my setup so far.

USB and WLAN/Wifi LED are working fine for me.

Would be great if also WNR845T users could check out that build.

Recognized that kernel is available. So rebuild and re-uploaded.

(Last edited by maddes.b on 27 Feb 2010, 11:28)