Re: Support for Marvell 88F5xx81 based routers

Ok, according to post #340, I just have to do after having built wrt350nv2-uImage & root.squashfs :
dd if=wrt350nv2-uImage of=wrt350nv2-uImage.padded bs=1024k conv=sync
cat wrt350nv2-uImage.padded root.squashfs >wrt350nv2.img

And then sysupgrade -n wrt350nv2.img

I'll try tomorrow !

852 (edited by maddes.b 2010-04-20 23:00:05)

Re: Support for Marvell 88F5xx81 based routers

@baxter:
Why do you do all that stuff? Did you also read #375 as recommended?

Just transfer your "openwrt-wrt350nv2-squashfs.img" to /tmp, then call:

sysupgrade -n /tmp/openwrt-wrt350nv2-squashfs.img

If you want to flash the official Backfire release, then downloading can be done by sysupgrade itself:

sysupgrade -n http://downloads.openwrt.org/backfire/10.03/orion/openwrt-wrt350nv2-squashfs.img

Looks similar to #375, doesn't it?

Re: Support for Marvell 88F5xx81 based routers

I didn't see that openwrt-wrt350nv2-squashfs.img was in the bin/orion directory. I only searched in build_dir directory.

Sorry for that, and thank's for your patience.

854 (edited by maddes.b 2010-04-22 12:19:43)

Re: Support for Marvell 88F5xx81 based routers

@baxter:
Glad you managed.

maddes.b in #300 wrote:

After compilation the build can be found in the bin folder.

I know it's a lot of stuff when you start from scratch, but especially that's the case where you have to read thoroughly and multiple times.
Every sentence contains valuable information and is prerequisite for the following sentences.

855 (edited by maddes.b 2010-04-22 12:20:45)

Re: Support for Marvell 88F5xx81 based routers

Erik's patch for the mwl8k driver from ticket #7209 was committed to trunk with r21077.
This allows to add the mwl8k driver to the build. Let's hope that the firmware will be add to the Linux kernel tree soon, so WNR854T with stock hardware will work too.

856 (edited by Nilfred 2010-05-01 05:24:05)

Re: Support for Marvell 88F5xx81 based routers

X-Wrt is back with Backfire support (r20742) if you miss web interface:
http://downloads.x-wrt.org/xwrt/backfire/10.03/orion/generic/
BTW there is not OpenVPN build.

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

857 (edited by maddes.b 2010-05-01 10:19:44)

Re: Support for Marvell 88F5xx81 based routers

As there is a kmod-tun package in the X-Wrt repository, I assume that they compiled with tun/VPN support.
Try installing package "openvpn", this will also install kmod-tun.
If it doesn't panic on start (check with dmesg and ps) then VPN connections should work too.

Unfortunately there's no copy of the .config from the X-Wrt builds, otherwise we could just check if "CONFIG_PACKAGE_kmod-tun" was set to "y" or "m" for the builds (again the available kmod-tun package indicates at least "m").

Re: Support for Marvell 88F5xx81 based routers

Erik's (rectified) patch for the mwl8k driver from ticket #7209 was committed to trunk with r21167.
Hunting season for AP firmware is now officially open.

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

Re: Support for Marvell 88F5xx81 based routers

I've installed backfire without any problems, but then apparently screwed up vlanning my wrt350n. Now, I cannot reach it anymore and also tftp is not working. I cannot ping the device on 192.168.1.1 during boot or after booting with the reset pressed such that the power led turns orange and starts blinking. I've basically nmapped the 192,168.*.* domain in this state, only returning my laptop.
Is there any way to reach this device via the net? Or do I need to use a serial console? If that's the case, I have found the white J5-connector, but am completely ignorant on which cables to buy where. Thank you for any help.

Re: Support for Marvell 88F5xx81 based routers

hi sjoerd, look for 'download mode' in this topic, DaBicMac wrote a beautiful guide for you to follow, you won't need serial to recover, but you will loose all of your settings.

Re: Support for Marvell 88F5xx81 based routers

Hello2
some time been tormented with the update wrt350n v2.1 firmware to 2.00.20, this topic has helped restore my router to version 2.00.17 (previously laid out bin file), but wanted patched the latest version.
Again using instructions I created the bin-file, updated, but there were some problems:
Web interface was a gray-blue (this happens when I have a web pack is 2.00.19 or 2.00.20 format img) - tried to reset to default settings, but this action sent the router into hibernation (solid light yellow light power).
I wrongly converted the firmware? or what could be the problem?
thank you in advance for the help and sorry for my English.

Re: Support for Marvell 88F5xx81 based routers

Thank you Dirk for your information, I will give it a try. The bad news is that I then won't teach how to get a serial console...

863 (edited by maddes.b 2010-05-09 22:50:21)

Re: Support for Marvell 88F5xx81 based routers

@sjoerd: Read post #300 completely, there are links to the relevant posts for serial access and download mode.
Download mode should be #524 and #436.

Re: Support for Marvell 88F5xx81 based routers

@maddes: thanks for the links. The download mode with the utility was easy enough. Probably a good remark for somebody else with problems: the upgrade utility should be run with admin privileges, else it cannot get the proper access to your ethernet card. Now I still need to figure how to run the utility under wine...

Re: Support for Marvell 88F5xx81 based routers

Does anyone know if the WNR854T has a temperature sensor on it?  And if so, any packages that could make it accessible.

Re: Support for Marvell 88F5xx81 based routers

Thank you to everyone who has help get OpenWRT to this point. I am trying to compile trunk revision 21480 for orion. I am able to compile backfire just fine.

make[3]: Entering directory `/media/500g/stfu/src/openwrt/target/linux'
make[4]: Entering directory `/media/500g/stfu/src/openwrt/target/linux/orion'
if [ -s "/media/500g/stfu/src/openwrt/build_dir/linux-orion_generic/linux-2.6.32.12/patches/series" ]; then (cd "/media/500g/stfu/src/openwrt/build_dir/linux-orion_generic/linux-2.6.32.12"; if quilt --quiltrc=- next >/dev/null 2>&1; then quilt --quiltrc=- push -a; else quilt --quiltrc=- top >/dev/null 2>&1; fi ); fi
Applying patch platform/050-wrt350nv2_cfi_workaround.patch
patching file drivers/mtd/chips/cfi_cmdset_0002.c
Hunk #1 FAILED at 374.
1 out of 1 hunk FAILED -- rejects in file drivers/mtd/chips/cfi_cmdset_0002.c
Patch platform/050-wrt350nv2_cfi_workaround.patch does not apply (enforce with -f)
make[4]: *** [/media/500g/stfu/src/openwrt/build_dir/linux-orion_generic/linux-2.6.32.12/.quilt_checked] Error 1
make[4]: Leaving directory `/media/500g/stfu/src/openwrt/target/linux/orion'

Is there a way to just build for the WNR854T and skip the srt350nv2?

Thank you

867 (edited by maddes.b 2010-05-17 19:19:45)

Re: Support for Marvell 88F5xx81 based routers

@jcwoltz:
OpenWrt build system is platform-based and not device-based. Same for the patches.
I last compiled r21156 with kernel 2.6.32.12 for Orion without any problems, and there wasn't any relevant change since then (as far as I can remember).

If you have changed something, please backup your changes, revert them, clean up and try again.

Update:
Could access my system via VPN and Backfire r21485 (kernel 2.6.32) just compiled fine without any issues.
Must be on your side, please issue a "make distclean".

Update #2:
[s]With a closer look I assume you want to compile with a 2.6.34 kernel.[/s] There's 2.6.32.12 in the excerpt.

868 (edited by jcwoltz 2010-05-19 05:33:16)

Re: Support for Marvell 88F5xx81 based routers

@maddes.b
Thank you for your reply. I have no problem building backfire from svn, its trunk that will not compile for me. I tried this again, but now at revision 21486.

rm -rf openwrt
svn co svn://svn.openwrt.org/openwrt/trunk/ openwrt
cd openwrt
make menuconfig
make V=99

The only thing I changed at this point is the target system to Marvell Orion.
Failed with output:

Applying patch platform/010-ignore_atag_cmdline.patch
patching file arch/arm/kernel/setup.c

Applying patch platform/050-wrt350nv2_cfi_workaround.patch
patching file drivers/mtd/chips/cfi_cmdset_0002.c
Hunk #1 FAILED at 374.
1 out of 1 hunk FAILED -- rejects in file drivers/mtd/chips/cfi_cmdset_0002.c
Patch platform/050-wrt350nv2_cfi_workaround.patch does not apply (enforce with -f)
make[4]: *** [/media/500g/stfu/src/openwrt/build_dir/linux-orion_generic/linux-2.6.32.12/.quilt_checked] Error 1
make[4]: Leaving directory `/media/500g/stfu/src/openwrt/target/linux/orion'
make[3]: *** [compile] Error 2
make[3]: Leaving directory `/media/500g/stfu/src/openwrt/target/linux'
make[2]: *** [target/linux/compile] Error 2
make[2]: Leaving directory `/media/500g/stfu/src/openwrt'
make[1]: *** [/media/500g/stfu/src/openwrt/staging_dir/target-arm_v5t_uClibc-0.9.30.1_eabi/stamp/.target_compile] Error 2
make[1]: Leaving directory `/media/500g/stfu/src/openwrt'
make: *** [world] Error 2

Edit 1 2010-05-19-1230: Thank you for maddes.b for seeing the problem and entering a ticket.

869 (edited by maddes.b 2010-05-18 00:03:37)

Re: Support for Marvell 88F5xx81 based routers

Got it reproduced. Will update this post accordingly.

Reason:
target/linux/generic-2.6/patches-2.6.32/089-mtd-samsung-flash.patch
collides with
target/linux/orion/patches/050-wrt350nv2_cfi_workaround.patch


Update:
Created ticket #7348 for it.

Update #2:
Updated the ticket with my analysis.

Currently I would suggest to delete the Orion patch target/linux/orion/patches/050-wrt350nv2_cfi_workaround.patch:

svn delete target/linux/orion/patches/050-wrt350nv2_cfi_workaround.patch

Otherwise update the Orion patch target/linux/orion/patches/050-wrt350nv2_cfi_workaround.patch to:

--- a/drivers/mtd/chips/cfi_cmdset_0002.c
+++ b/drivers/mtd/chips/cfi_cmdset_0002.c
@@ -374,8 +374,9 @@ struct mtd_info *cfi_cmdset_0002(struct 
 
         cfi_fixup_major_minor(cfi, extp);
 
-        if (extp->MajorVersion < '0' || extp->MajorVersion > '3' ||
-            (extp->MinorVersion < '0' || extp->MinorVersion > '4')) {
+        if ((extp->MajorVersion != '0' && extp->MinorVersion != '0') &&
+            (extp->MajorVersion < '0' || extp->MajorVersion > '3' ||
+             (extp->MinorVersion < '0' || extp->MinorVersion > '4'))) {
                 if (cfi->mfr == MANUFACTURER_SAMSUNG &&
                 (extp->MajorVersion == '3' && extp->MinorVersion == '3')) {
                 printk(KERN_NOTICE "  Newer Samsung flash detected, "

Warning! Not tested yet!

870 (edited by baxter104 2010-05-18 00:21:56)

Re: Support for Marvell 88F5xx81 based routers

The WRT350N v2 includes 2 buttons : one reset button on the rear and one button for WPS in the front.
I've seen that in the patch for led support, the button support is also implemented:

++/*
++ * Buttons attached to GPIO
++ */
++static struct gpio_keys_button wrt350n_v2_buttons[] = {
++        {
++                .code           = KEY_RESTART,
++                .gpio           = 3,
++                .desc           = "Reset Button",
++                .active_low     = 1,
++        }, {
++                .code           = KEY_WLAN,
++                .gpio           = 2,
++                .desc           = "WPS Button",
++                .active_low     = 1,
++        },
++};
++
++static struct gpio_keys_platform_data wrt350n_v2_button_data = {
++        .buttons        = wrt350n_v2_buttons,
++        .nbuttons       = ARRAY_SIZE(wrt350n_v2_buttons),
++};
++
++static struct platform_device wrt350n_v2_button_device = {
++        .name           = "gpio-keys",
++        .id             = -1,
++        .num_resources  = 0,
++        .dev            = {
++                .platform_data  = &wrt350n_v2_button_data,
++        },

But after having added support for gpio buttons and keys, I see nothing in the /sys/devices/platform/gpio-keys directory.

Does anyone have tried to use those 2 keys ?

871 (edited by maddes.b 2010-05-19 17:17:30)

Re: Support for Marvell 88F5xx81 based routers

@Baxter:
DirkNL or StrikerNL mentioned in this thread that you can already see the interrupts of the buttons somewhere. Just check the last ~10 pages for "button" (#664, #724).
Also these two wanted to work on some useful functions for these buttons. Maybe just try to contact them, they are nice guys from the Netherlands.

Re: Support for Marvell 88F5xx81 based routers

hi baxter, buttons are working, take a look at /proc/interrupts for instance.

The problem for us is spare time, we simply don't have any more time on our hands. If you'd like to fiddle around with the userspace part for the buttons be my guest. Unfortunately we don't have any leads to go on so you'll have to look somewhere on howto get these interrupts in userspace processes.

The ideas we had for the buttons:
Reset button: when pressed during OpenWRT boot, the jffs2 overlay will NOT be mounted, so you could use this state as a sort of recovery without having to reflash the entire unit
WPS button: when pressed toggle the wifi's security, this could be useful for people who'd like to give guests access to their wifi.

873

Re: Support for Marvell 88F5xx81 based routers

All I gotta say is => O M G!!!

I've tried to follow the last 800 posts and i'm just one mess... Especially with the actual Backfire release (i think you guys were testing with RC1?)
It's confusing as most previous posts relate to rebuilding stuff and i'm completely lost at the moment.

I've got a WRT350N v2

Stock firmware is super crappy so I want to try OpenWRT.
Can someone point me in the right direction?
- Where do I start?

874 (edited by maddes.b 2010-05-23 22:47:18)

Re: Support for Marvell 88F5xx81 based routers

I started with the wiki page for the WRT350N v2 at http://wiki.openwrt.org/toh/linksys/wrt350nv2.
It's currently just a start.
To be added are descriptions/links of recovery methods, serial pin layout, technical details, etc.
Everybody is welcome to join and bring this wiki page to a RTFM-state (will reduce forum noise).

Does anyone remember the opkg package that allows to change the U-Boot variables?

@EuGG:
This will answer some of your questions.
By the way tests were done always with the latest release candidate or the final release.
Currently I test on the latest Backfire branch and with Bleeding Edge (trunk).

875 (edited by maddes.b 2010-05-24 00:34:44)

Re: Support for Marvell 88F5xx81 based routers

Orion is compilable in trunk again (r21551).
Also kernel 2.6.33.4 is now compilable too (r21552).

@jcwoltz: Ready, set, go.


Update:
Kernel 2.6.34 is now also possible in trunk (ticket #7377)