401 (edited by Nilfred 2009-09-08 05:56:20)

Re: Support for Marvell 88F5xx81 based routers

Netgear WNR854T crash course
Initial status:
[Router: OK] [Internet: OK] [Wireless: OK] [Fear: None]
Download a copy of your exactly original firmware version number. If not available, upgrade to latest, reset to factory defaults and reconfigure.
Backup original settings http://192.168.1.1/BAK_backup.htm - Save a Copy of Current Settings - [Backup]
Get serial access:
[Router: Open] [Internet: No] [Wireless: No] [Fear: Some]
Copy & Paste the output of: Marvell>> printenv
To continue booting: Marvell>> run standalone
[Router: OK] [Internet: OK] [Wireless: OK] [Fear: None]
Pick your image download:
openvpn: includes openvpn
extra: includes qos-scripts, ntpclient, bandwidthd, miniupnpd, updatedd
Flash image via http://192.168.1.1/UPG_upgrade.htm
[Router: Bricked] [Internet: No] [Wireless: No] [Fear: Full]
Wait until there is a timeout error, and wait a bit more. Wanna check for something in the fridge?
Is about 4 minutes also a 404 Not Found The requested URL was not found is a good indication.
[Router: ON] [Internet: No] [Wireless: Lost] [Fear: Some]
Gain access to http://192.168.1.1 you should be at a change password prompt.
Now use root and password from previous prompt to enter Webif.
Configure Network - WAN - Apply - Apply changes.
If you need account(s) password(S) there are in plain text on netgear.cfg file you backup before, also MAC address(es) to replace the ugly ones.
MAC address is also in a sticker in your router.
CAUTION. Changing LAN MAC address require arp -d 192.168.1.1 on your PC to access your router again. Even this don't work for me and need to access via serial console to revert:

ifconfig br-lan hw ether 00:00:00:00:51:81

[Router: OK] [Internet: OK] [Wireless: Lost] [Fear: None]
Play around. That's all.

Now the ugly part:
No wireless support. Buy a supported Mini PCI wireless card. Use the salvaged card in your notebook. Buy a Mini PCI to PCI adapter and use the salvaged card in your PC.

Do something stupid and you get a bricked router. To recover from brick, you will need serial access and multiple tools, better download beforehand when you still have Internet:
wget, putty, puttygen, tftpsrv, WinSCP, serial to USB cable driver, original firmware.

Stale repository. Maybe tomorrow, files in the repository get overwritten with newer ones incompatible with your revision, and you don't really want to be in the bleeding edge flashing your router so often.
Then a local repository works even if no wan connectivity exist and will not stale.
Download and install Apache server noSSL, default installation is fine.
Make a working directory for you repository:

%programfiles%\Apache Software Foundation\Apache2.2\htdocs\xwrt\orion\r17427\

Download http://downloads.x-wrt.org/.../packages/Packages.gz to
Download or extract from above http://downloads.x-wrt.org/.../packages/Packages
Is a plain text file with individual package descriptions, 1792 files for r17427. All these should be downloaded.
Search in the file for the package base-files-orion, it will get you a clue of revision number.
If it's fine for you to do 1792 clicks, sort the repository by date and download the first 1792 files, note they are the same date.
So, a dumb robot may do it better, need a list of files, we have Packages file and dumb wget (be nice with the server):

wget -t 2 --waitretry=48 --wait=33 --random-wait --user-agent="" -e robots=off -o ./packages.log -P./packages -i ./packages.wget

Still need the packages.wget list... Fashion Window$ way, one download more: notepad++
Open Packages file with notepad++

Ctrl-F (Search)
Filename:\s.*\.ipk
[x]Bookmark line
Search mode: (x)Regular expression
[Search all]
1792 marked occurrences [Ok]
[Close]
Search menu - Copy bookmarked lines
File menu - new
Ctrl-V (Paste)
Ctrl-H (Search and replace)
Filename:\s
http://downloads.x-wrt.org/xwrt/kamikaze/snapshots/orion/packages/
Search mode: (x)Regular expression
[Replace all]
1792 occurrences were replaced [OK]
[Close]
Ctrl-S (Save) (that's all)
packages.wget [OK] (or whatever name you like)

The add/remove repository on Webif hang the router (try and power cycle)
So there is File Editor
Insert at top where XXX is your local PC connected to the router:

Remove or comment (with # at start) similar lines.
Apply changes

More fun to try:
ssh login without password

touch /etc/dropbear/authorized_keys
chmod 0600 /etc/dropbear/authorized_keys
echo ssh-rsa OneLinerLongRSAkey= rsa-key-20090825 >> /etc/dropbear/authorized_keys

Last line could also be done by Webif editor
Both approaches breaks forward secrecy if you care about it.
Access To Modem Configuration
Do:

ifconfig wan:1 192.168.0.5 netmask 255.255.255.0 broadcast 192.168.0.255
iptables -I forwarding_rule -d 192.168.0.2 -j ACCEPT
iptables -t nat -I POSTROUTING -d 192.168.0.2 -j MASQUERADE

Undo:

iptables -t nat -D POSTROUTING 1
iptables -D forwarding_rule 1
ifconfig wan:1 down

Still not crashed? No crash, no fun :-) So keep tunned to this guide, more updates to come.
TODO: Add all required tools links.

Netgear WNR854T (ARM Marvell Orion CPU 500MHz, Marvell 88W8361P mini-PCI STA only, 8/32MB) - trunk r17427 since 09/09/09 to 06-06-12 GLOD
TP-LINK TL-WR741ND v1.9 (Atheros AR7240 CPU 350MHz, Atheros AR9285 Chipset, 4/32MB) - trunk r23281 since 10/10/10
TP-LINK TL-MR3420 v1.1, TL-MR3220 v1.2 - trunk r25302 since 11/11/11
TP-LINK TL-WR842ND v1.0, TL-WR1043ND v1.8 - 12.09-rc1 since 12/12/12

402

Re: Support for Marvell 88F5xx81 based routers

I've just installed maddes's webupgrade image on 2.00.10 and it worked perfectly, thanks for all the work you've done. A few things I noticed: all the MAC addresses are set to 00:00:00:00:51:81, cfg80211's regulatory domain is US. The luci-admin-core error happened once, but went away when I installed luci-theme-base and luci-theme-openwrt.

Re: Support for Marvell 88F5xx81 based routers

Hi, I just wanted to also add that my experience was pretty much the same than with Watha, I was using linksys original firmware 2.0.0.19 and european v.2.1 wrt350n. One thing that makes me extremely happy is that the routing speed seems to be much faster than with the stock firmware, I have 100mb/100mb wan connection so it was pretty quickly obvious. My thanks go to the people that have made this possible.

404 (edited by DaBigMac 2009-08-30 12:40:37)

Re: Support for Marvell 88F5xx81 based routers

Any possibility of a step by step howto on flashing a firmware image from the marvell uboot console?

Let's assume the usage of one of maddes.b's firmware images as a reference image.

The serial howto is sufficient.

The firmware compilation howto is amazing!

However the recovery/upgrade docs are a little all over the place.

I know that there have been many attempts to offer a step-by-step method explaination of flashing via the marvell uboot prompt, but they all seem to assume that people know how to calculate the offset. I for one have no idea. What I would really like is for a cut and paste style solution using a fixed reference image with all known values. For example the ones hosted on maddes.b's webspace. A very simple solution with no guess work. Perhaps even assume a fixed set of IP's which users of the howto can conform to.

Even going so far as to provide links to the relevent tftp software, and configuration info for the tftp software also.

Kudos on the successful creation of a single reboot firmware maddes.b!

Who Da Man!!?? maddes.b is da man!

For certain that'll reduce bricking percentages..

Cheers,

DaBigMac

P.S. I would do this myself, as I think it's really worthwhile, but I don't know what I am doing.. hehe tongue The offset has me totally stumped...

Re: Support for Marvell 88F5xx81 based routers

@DaBigMac:
Manually flashing within U-Boot is already described in #341.
In Linux sysupgrade is recommended when available (see #376)

406 (edited by DaBigMac 2009-08-30 16:38:31)

Re: Support for Marvell 88F5xx81 based routers

maddes.b wrote:

@DaBigMac:
Manually flashing within U-Boot is already described in #341.
In Linux sysupgrade is recommended when available (see #376)

I'm back in action after 6 months of having a beautiful black paperweight!! I'm so happy I could sing!

Thanks so much for the info maddes.b, however I would like to suggest some improvements to the howto.

I know the posting is very thorough, but it leaves open some fundamental holes.. for example..

cp.b 0x400000 0xff800000 <transferred bytes in hex/0x>

What is the transferred bytes in hex value? Where is it obtained? I scratched my head for hours over that! I was wondering all sort of stupid scenarios...  Do I cut and paste the whole line as it is written?... conversely, is the <transferred bytes in hex/0x> simply explanation text that we omit when entering the command? Do I add the <>'s or not?

I know it's a very n00b example, but the whole process is so confusing, there are so many commands, it's hard to know what is a quote and what is a command....

My router has been bricked for 6 months, or more.. week by week I fought with it. Finally I've managed to get into the uboot console, after months of having no boot wait. (I solved that by using a non-usb serial cable), and after some lucky guesses I was able to figure out the MTD offset calculation method by reading a post (of yours) a few up from that one which described flashing in two parts. One for the uImage and a 2nd flash for the rootfs. I GUESSED at the 0xff900000 value, (0xff800000 + the 100000 hex value for the tftp'd file.) it's the offsets that make it so hard to calculate...

I really think it would be a good idea to host some files for which the MTD sizes would be KNOWN and n00bs like myself could be given cut n' paste command lines which have been pre calculated.

Never underestimate human stupidity!

Cheers,

DaBigMac

407

Re: Support for Marvell 88F5xx81 based routers

Hi,

OpenWrt is up and running on my WRT350n v2.1 !
THANK YOU maddes and all the others who made that possible!

Cheers

408

Re: Support for Marvell 88F5xx81 based routers

Hello,

How can i install OpenWRT in my WRT350n v2.1 ?
I am new in this forum so sorry for my noob question. tongue
Thanks.

Re: Support for Marvell 88F5xx81 based routers

Hi all,

Regards to the heroes of hardware.

A question: I don't have a WRT350n yet, but am drawn to it by its hardware specs. I want a energy efficient NAS that can do assorted other odd jobs on the side, and the WRT350n looks killer for the job. However, there has been some muttering about USB stability/speed on (much) earlier pages of this thread. Can anyone confirm that USB storage will work well on this beastie, and even better, post some idea of NFS/CIFS throughput from USB? Also, any idea how many watts this might suck at idle?

Than in advance.

410 (edited by Watha 2009-09-02 16:03:07)

Re: Support for Marvell 88F5xx81 based routers

falso, domadm: ftp://ftp.maddes.net/openwrt/kamikaze/orion/build_17456/squashfs has the webupgrade file to use as a firmware upgrade in the Linksys web interface. Note that this image doesn't have luci or webif (x-wrt), you'll need to telnet in as root, set a password, ssh in as root, "opkg update", "opkg install luci-admin-full luci-theme-openwrt" or "opkg install webif". The wireless interface is disabled by default, you'll need to configure it.

However, to quote post 386:

maddes.b wrote:

WARNING!!! The images on the ftp space do not include any web interfaces, pure console only!!! Use at your own risk!!!
This is ALL BETA!!! Newbies should wait for a stable release by the OpenWrt team!!!

Read the complete thread (I mean it) to know the problems and issues.
Inform yourself how to setup OpenWrt before you flash.
Linux experience is mandatory.
And have a fallback router available, or access to your neighbor's wlan, or know how to access the internet with your pc directly.

And wireless may or may not work on v2.1 yet.

Re: Support for Marvell 88F5xx81 based routers

Watha wrote:

And there's no wireless support for v2.1 yet.

Ah. Thanks for the warning. Is there any indication what the problem is, or if it might be fixable?
Ta.

Re: Support for Marvell 88F5xx81 based routers

Watha wrote:

falso, domadm: ftp://ftp.maddes.net/openwrt/kamikaze/o … l_ipv6.img is the file to use as a firmware upgrade in the Linksys web interface. Note that this image doesn't have luci or webif (x-wrt), you'll need to telnet in as root, set a password, ssh in as root, "opkg update", "opkg install luci-admin-full luci-theme-openwrt" or "opkg install webif".

MANY THANKS!!

413 (edited by maddes.b 2009-08-31 21:26:54)

Re: Support for Marvell 88F5xx81 based routers

@v2.1 owners:
Please always state the version of your stock firmware, the first 3 chars of your serial number (e.g. on my v2.0 it's SNQ) and the region you bought it (continent or country like US, EU, AUS, etc.).

@flounder:
Read the last two pages for the WLAN problem with newer v2.1 devices.

414 (edited by falso 2009-08-31 13:47:24)

Re: Support for Marvell 88F5xx81 based routers

Weeeeeeeeeeeeeeeeeeeeeeeeeeeeee...
OpenWrt is up and running on my WRT350n v2.1 !
Thank you maddes, You're the one! smile Thank you for all the others who made this possible! \o/

Linksys Stock fw: 2.00.19
Linksys WRT350n V2.1 EU / mfr date 03.2008

415 (edited by domadm 2009-08-31 16:07:35)

Re: Support for Marvell 88F5xx81 based routers

Ugh, I've realized that I have HW v2.1 instead of 2.0 sad sad sad

Is it possible to revert to Linksys's firmware after checking how OpenWrt works?

My WRT 350n is v2.1  from 02/2008, soft 2.00.17

falso: is your wifi working?

416 (edited by Watha 2009-08-31 18:45:13)

Re: Support for Marvell 88F5xx81 based routers

domadm: see post 376 and post 378. The usual disclaimers apply. Before you do flash it, can you paste the contents of /proc/bus/pci/devices, which will help identify the wireless chipset.

417 (edited by Watha 2009-08-31 16:30:47)

Re: Support for Marvell 88F5xx81 based routers

Meanwhile, I removed some packages I'd added and somehow fucked luci something chronic:

root@darien:/tmp# lua
Lua 5.1.4  Copyright (C) 1994-2008 Lua.org, PUC-Rio (double int32)
> local nixio = require "nixio"
error loading module 'nixio' from file '/usr/lib/lua/nixio.so':
    File not found
stack traceback:
    [C]: ?
    [C]: in function 'require'
    stdin:1: in main chunk
    [C]: ?
>

I'm trying a sysupgrade to see if that fixes things. Edit: Yeah, that fixed things, although I had to reinstall luci and other packages.

418 (edited by domadm 2009-08-31 17:34:30)

Re: Support for Marvell 88F5xx81 based routers

Gentelman, thank you for your great work & support smile

My WRT350N v2.1 works well with OpenWRT Kamikaze r17427, wifi works (unfortunately 54g only), luci works (but sometimes slown down my Firefox for a minute or two), even Midnight Commander works smile

Can I try webif instead of luci? Are there any significant differences regarding router features?

419 (edited by maddes.b 2009-08-31 18:30:46)

Re: Support for Marvell 88F5xx81 based routers

@domadm:
How did you get your WLAN running?
Compiled/Installed with different drivers? (If not, then I only see 17409 as an relevant change between 17399 and 17427)
Or did you just forget to configure it before?
Please provide some info, so that it may help others.

What is the first part of your serial number (3 chars)? (e.g. mine is v2.0 SNQ...)

Maddes

420

Re: Support for Marvell 88F5xx81 based routers

Hello again,
My serial number begins with SNQ..., v2.1, manufacturer date 03/2008, openWRT up and running and wireless is workin too.
Router leds doesnt blink but i got wireless. tongue

Re: Support for Marvell 88F5xx81 based routers

Anyone know of a way to upgrade the snapshot on a WNR854T. Ive searched threw many threads and havent been able to find anything about this. Any help would greatly be appreciated.

Thanks

422 (edited by maddes.b 2009-08-31 20:56:16)

Re: Support for Marvell 88F5xx81 based routers

@dragon36:
I assume you want to upgrade from within OpenWrt.
Currently there's no sysupgrade support for Orion in OpenWrt.

Ticket #5719 will add sysupgrade support for WRT350Nv2.
Have a look at the latest orion_sysupgrade_platform_sh.patch (currently orion_sysupgrade_platform_sh.2.patch).
Take this as a base for WNR854T support (skip the eRcOmM sanity check as it is for WRT350Nv2 only).
For testing put your platform.sh onto your router into /lib/upgrade.
If it is working well, please mail me, so I can add it to the ticket.

Main tasks are:
* get magic word (first two bytes) of valid flash image
* find mtd partition that allows to flash kernel and rootfs in one step, otherwise modify the mtd partititons to support this
* if it is a hdd-based system, then screw the above sentence and find an example in the OpenWrt source repository for another hdd-based system (target/<system>/base-files/lib/upgrade/platform.sh)

Re: Support for Marvell 88F5xx81 based routers

maddes.b wrote:

@domadm:
How did you get your WLAN running?
Compiled/Installed with different drivers? (If not, then I only see 17409 as an relevant change between 17399 and 17427)
Or did you just forget to configure it before?
Please provide some info, so that it may help others.

What is the first part of your serial number (3 chars)? (e.g. mine is v2.0 SNQ...)

Maddes

Mine v2.1 serial starts with SNQ also.

I am not so familiar with the command line, so following Watha's post I have installed LuCI then configured WLAN from there smile
Now I am trying to get USB working with my pendrive for storage sharing.

Plase take a look at the fragment of my dmesg regards WLAN card (it is Atheros, which is quite popular and supported I think):

ath: EEPROM regdomain: 0x0
ath: EEPROM indicates default country code should be used
ath: doing EEPROM country->regdmn map search
ath: country maps to regdmn code: 0x3a
ath: Country alpha2 being used: US
ath: Regpair used: 0x3a
phy0: Selected rate control algorithm 'ath9k_rate_control'
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=0xc2a40000, irq=36
cfg80211: Calling CRDA for country: US

Regards

Re: Support for Marvell 88F5xx81 based routers

So just a missed configuration. Thanks for the info.

The only person with remaining problems is andrewm1973 from Australia. Hopefully we will get him working soon too.

Re: Support for Marvell 88F5xx81 based routers

Hello all,

I own a Linksys WRT350N v2 and have issues using the linksys stock FW 2.00.19
Basically everything related to the USB storage is a pain.
Since I do not expect linksys to come with a new FW for this device I'm considering to try kamikaze.
But, I'm not familiar with linux and was wondering, will there ever be a webbased upgrade available including a graphical configuration interface?
So that I can easily configure the box?

Thanks for your reply.
Gino