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.

I'll try, don't have much spare time on my hands anymore smile

Hello,

I am trying to get my WNR854T to boot the kernel from tftp, then the root file system from NFS. It seems that the kernel is not honoring the bootargs. This line is printed early on in the kernel boot:
Kernel command line: root=/dev/mtdblock1 rootfstype=squashfs,jffs2 noinitrd console=ttyS0,115200

I would expect this line to be:
console=ttyS0,115200 root=/dev/nfs nfsroot=192.168.7.4:/mnt/ARM_FS/ ip=192.168.7.1:192.168.7.4:::DB88FXX81:eth0:none

I am running the latest trunk from svn. (r24701) How do I make the kernel see my bootargs? Do I need to change some configuration settings in the build process?

Any help would be greatly appreciated.

Here is a snippet of when I start jcboot:

Marvell>> run jcboot
Using egiga0 device
TFTP from server 192.168.7.4; our IP address is 192.168.7.1
Filename 'openwrt-wnr854t-uImage'.
Load address: 0x400000
Loading: #################################################################
         #################################################################
         ####################################################
done
Bytes transferred = 927672 (e27b8 hex)
## Booting image at 00400000 ...
   Image Name:   Linux-2.6.36.2
   Created:      2010-12-19   2:30:11 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    927608 Bytes = 905.9 kB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
OK

Starting kernel ...

Uncompressing Linux... done, booting the kernel.
Linux version 2.6.36.2 (stfu@wocs-m) (gcc version 4.3.3 (GCC) ) #18 Sat Dec 18 21:30:04 EST 2010
CPU: Feroceon [41069260] revision 0 (ARMv5TEJ), cr=a0053177
CPU: VIVT data cache, VIVT instruction cache
Machine: Netgear WNR854T
Clearing invalid memory bank 0KB@0xffffffff
Clearing invalid memory bank 0KB@0xffffffff
Clearing invalid memory bank 0KB@0xffffffff
Ignoring unrecognised tag 0x00000000
Ignoring unrecognised tag 0x00000000
Ignoring unrecognised tag 0x00000000
Ignoring unrecognised tag 0x54410009
Memory policy: ECC disabled, Data cache writeback
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 8128
Kernel command line: root=/dev/mtdblock1 rootfstype=squashfs,jffs2 noinitrd console=ttyS0,115200

U-Boot printenv

baudrate=115200
loads_echo=0
rootpath=/mnt/ARM_FS/
cpuName=926
CASset=min
MALLOC_len=4
ethprime=egiga0
bootargs_root=root=/dev/nfs rw
bootargs_end=:::DB88FXX81:eth0:none
image_name=uImage
ethaddr=00:00:00:00:51:81
usb0Mode=host
ethact=egiga0
jc=aerg1 arg2 arg3
ipaddr=192.168.7.1
bootargs=console=ttyS0,115200
filesize=e2804
serverip=192.168.7.4
jcboot=setenv bootargs $(bootargs) root=/dev/nfs nfsroot=192.168.7.4:$(rootpath) ip=192.168.7.1:192.168.7.4$(bootargs_end); tftpboot 0x400000 openwrt-wnr854t-uImage; bootm 0x400000;
stdin=serial
stdout=serial
stderr=serial
enaMonExt=no
enaFlashBuf=yes
enaCpuStream=no
bootargs2=$(bootargs)
standalone=fsload 0x400000 $(image_name);setenv bootargs $(bootargs) root=/dev/mtdblock1 rw ip=$(ipaddr):$(serverip)$(bootargs_end); bootm 0x400000;
bootcmd=fsload 0x400000 $(image_name);setenv bootargs $(bootargs) root=/dev/mtdblock1 rw ip=$(ipaddr):$(serverip)$(bootargs_end); bootm 0x400000;
bootnfs=fsload 0x400000 $(image_name);setenv bootargs $(bootargs) root=/dev/mtdblock1 rw ip=$(ipaddr):$(serverip)$(bootargs_end); bootm 0x400000;
bootdelay=3
disaMvPnp=no
overEthAddr=no
jcwoltz wrote:

Hello,

I am trying to get my WNR854T to boot the kernel from tftp, then the root file system from NFS. It seems that the kernel is not honoring the bootargs. This line is printed early on in the kernel boot:
Kernel command line: root=/dev/mtdblock1 rootfstype=squashfs,jffs2 noinitrd console=ttyS0,115200

I would expect this line to be:
console=ttyS0,115200 root=/dev/nfs nfsroot=192.168.7.4:/mnt/ARM_FS/ ip=192.168.7.1:192.168.7.4:::DB88FXX81:eth0:none

I am running the latest trunk from svn. (r24701) How do I make the kernel see my bootargs? Do I need to change some configuration settings in the build process?

Well, I am part way there. I do not know how to get the kernel to read the uboot bootargs. As a workaround, I had to edit target/linux/orion/config-default and change CONFIG_CMDLINE. The kernel messages now indicate root=/dev/nfs, but it does not appear that nfs support is being compiled into the kernel. I have enabled kmod-fs-nfs, but that does not seem to help.

Do I need to do something else to enable nfs support in the kernel?

VFS: Cannot open root device "nfs" or unknown-block(0,255)
Please append a correct "root=" boot option; here are the available partitions:
1f00            1024 mtdblock0 (driver?)
1f01            6528 mtdblock1 (driver?)
1f02             256 mtdblock2 (driver?)
1f03            7552 mtdblock3 (driver?)
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,255)

Complete Boot messages:

Marvell>> run jcboot
Using egiga0 device
TFTP from server 192.168.7.4; our IP address is 192.168.7.1
Filename 'openwrt-wnr854t-uImage'.
Load address: 0x400000
Loading: T T #################################################################
         #################################################################
         ###################################################
done
Bytes transferred = 926208 (e2200 hex)
## Booting image at 00400000 ...
   Image Name:   Linux-2.6.36.2
   Created:      2010-12-21  20:49:20 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    926144 Bytes = 904.4 kB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
OK

Starting kernel ...

Uncompressing Linux... done, booting the kernel.
Linux version 2.6.36.2 (stfu@wocs-m) (gcc version 4.3.3 (GCC) ) #3 Tue Dec 21 15:49:16 EST 2010
CPU: Feroceon [41069260] revision 0 (ARMv5TEJ), cr=a0053177
CPU: VIVT data cache, VIVT instruction cache
Machine: Netgear WNR854T
Clearing invalid memory bank 0KB@0xffffffff
Clearing invalid memory bank 0KB@0xffffffff
Clearing invalid memory bank 0KB@0xffffffff
Ignoring unrecognised tag 0x00000000
Ignoring unrecognised tag 0x00000000
Ignoring unrecognised tag 0x00000000
Ignoring unrecognised tag 0x54410009
Memory policy: ECC disabled, Data cache writeback
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 8128
Kernel command line: console=ttyS0,115200 root=/dev/nfs nfsroot=192.168.7.4:/mnt/ARM_FS/ ip=192.168.7.1:192.168.7.4:::DB88FXX81:eth0:none
PID hash table entries: 128 (order: -3, 512 bytes)
Dentry cache hash table entries: 4096 (order: 2, 16384 bytes)
Inode-cache hash table entries: 2048 (order: 1, 8192 bytes)
Memory: 32MB = 32MB total
Memory: 29908k/29908k available, 2860k reserved, 0K highmem
Virtual kernel memory layout:
    vector  : 0xffff0000 - 0xffff1000   (   4 kB)
    fixmap  : 0xfff00000 - 0xfffe0000   ( 896 kB)
    DMA     : 0xffc00000 - 0xffe00000   (   2 MB)
    vmalloc : 0xc2800000 - 0xfd800000   ( 944 MB)
    lowmem  : 0xc0000000 - 0xc2000000   (  32 MB)
    modules : 0xbf000000 - 0xc0000000   (  16 MB)
      .init : 0xc0008000 - 0xc0021000   ( 100 kB)
      .text : 0xc0021000 - 0xc0263000   (2312 kB)
      .data : 0xc0264000 - 0xc0275d40   (  72 kB)
NR_IRQS:64
Calibrating delay loop... 332.59 BogoMIPS (lpj=1662976)
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
NET: Registered protocol family 16
Orion ID: MV88F5181-Rev-B1. TCLK=166666667.
Applying Orion-1/Orion-NAS PCIe config read transaction workaround
PCI: bus0: Fast back to back transfers disabled
PCI: bus1: Fast back to back transfers enabled
pci 0000:01:07.0: BAR 0: assigned [mem 0xe8000000-0xe800ffff]
pci 0000:01:07.0: BAR 0: set to [mem 0xe8000000-0xe800ffff] (PCI address [0xe8000000-0xe800ffff]
pci 0000:01:07.0: BAR 1: assigned [mem 0xe8010000-0xe801ffff]
pci 0000:01:07.0: BAR 1: set to [mem 0xe8010000-0xe801ffff] (PCI address [0xe8010000-0xe801ffff]
bio: create slab <bio-0> at 0
Switching to clocksource orion_clocksource
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 1024 (order: 1, 8192 bytes)
TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
TCP: Hash tables configured (established 1024 bind 1024)
TCP reno registered
UDP hash table entries: 256 (order: 0, 4096 bytes)
UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
NET: Registered protocol family 1
squashfs: version 4.0 (2009/01/31) Phillip Lougher
Registering mini_fo version $Id$
JFFS2 version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
msgmni has been set to 58
io scheduler noop registered
io scheduler deadline registered (default)
Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
serial8250.0: ttyS0 at MMIO 0xf1012000 (irq = 3) is a 16550A
console [ttyS0] enabled
physmap platform flash device: 00800000 at f4000000
physmap-flash.0: Found 1 x16 devices at 0x0 in 16-bit bank. Manufacturer ID 0x000089 Chip ID 0x000017
Intel/Sharp Extended Query Table at 0x0031
Intel/Sharp Extended Query Table at 0x0031
Using buffer write method
cfi_cmdset_0001: Erase suspend on write enabled
cmdlinepart partition parsing not available
RedBoot partition parsing not available
Using physmap partition information
Creating 4 MTD partitions on "physmap-flash.0":
0x000000000000-0x000000100000 : "kernel"
0x000000100000-0x000000760000 : "rootfs"
mtd: partition "rootfs" set to be root filesystem
split_squashfs: no squashfs found in "physmap-flash.0"
0x000000760000-0x0000007a0000 : "uboot"
0x000000000000-0x000000760000 : "image"
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
i2c /dev entries driver
TCP westwood registered
NET: Registered protocol family 17
Distributed Switch Architecture driver version 0.1
eth0[0]: 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: Cannot open root device "nfs" or unknown-block(0,255)
Please append a correct "root=" boot option; here are the available partitions:
1f00            1024 mtdblock0 (driver?)
1f01            6528 mtdblock1 (driver?)
1f02             256 mtdblock2 (driver?)
1f03            7552 mtdblock3 (driver?)
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,255)
Backtrace:
Function entered at [<c00253f8>] from [<c021812c>]
 r7:00008000 r6:c1863000 r5:00000000 r4:c1815f50
Function entered at [<c0218114>] from [<c0218194>]
Function entered at [<c0218130>] from [<c0008e88>]
 r3:c19310dc r2:00000000 r1:c1815f50 r0:c022e0a4
Function entered at [<c0008c98>] from [<c0008fb4>]
Function entered at [<c0008f60>] from [<c0009100>]
 r5:c001fa14 r4:c0275e28
Function entered at [<c0008fcc>] from [<c00084ec>]
 r6:c003448c r5:c001e448 r4:c001e448
Function entered at [<c00083d4>] from [<c003448c>]
 r5:c00083d4 r4:00000000

(Last edited by jcwoltz on 21 Dec 2010, 22:00)

@jcwoltz

Don't edit config-default directly.
use "make kernel_menuconfig" and change the settings there.

(Last edited by mrk on 23 Dec 2010, 23:40)

mrk wrote:

@jcwoltz

Don't edit config-default directly.
use "make kernel_menuconfig" and change the settings there.

Thank you mrk! Under boot options, I am able to change the cmdline. I am also able to uncheck "Always use the default kernel command string" which will hopefully solve my u-boot issues.

Hopefully, this will also let me compile in nfs support.

mrk wrote:
erik___ wrote:

The RTC still seems be broken.

drivers/rtc/hctosys.c: unable to open rtc device (rtc0)

I searched around and tried to find some information concerning RTC for the our Marvel SoC.
Well, I didn't found anything helpfull.
There is no internal rtc, like in kirkwood and the driver in stock firmware belongs to a DS1339, which I can not find on the wrt350nv2-board and even cannot be announced in kernel.

I used:

+static struct i2c_board_info __initdata wrt350n_v2_i2c_rtc = {
+    I2C_BOARD_INFO("ds1339", 0x68),
+};

in wrt350nv2-setup.c. Maybe, the wrong dev-addr 0x68?

From my point of view, we can disable the config for rtc in make kernel_menuconfig.
Then the quoted error message will disappear.

Has anyone tried soldering on a DS1339 RTC just for giggles?

same problem on wnr854t (2.6.36.2)

drivers/rtc/hctosys.c: unable to open rtc device (rtc0)
VFS: Mounted root (squashfs filesystem) readonly on device 31:1.

(Last edited by Tanguy on 26 Jan 2011, 04:40)

@maddes.b: See #8781 is like your dynamic mtd approach.

That's quite interesting. Now for the nvram and ercomm, u-boot rewrite anyone? wink

I have a WNR854T with 10.03.1-rc4 and have no Wifi -- all else works OK.
Wifi does not show in the interfaces. Got the same result with 10.03.

Loading pciutils and commanding 'lspci' I see 3 returns, 2 memory managers and one ethernet device "Top dog" "802.11n".

Commanding 'wifi detect' returns nothing. No wireless interfaces are shown by ifconfig or iwlist.

Any thoughts on what I can try next to activate wifi? I was hoping to use openwrt as a routed client for a remote wired network.


I have also tried to revert to stock Netgear 1.4.38 without success.

I tried the scheme in #905 of this thread but got an error message  - "Image check 'platform_check_image' failed"

I have loaded the stock Netgear image at the Uboot tftp loader as #9 in https://forum.openwrt.org/viewtopic.php?id=21496 . This passes all checks and is loaded into flash but then fails on reboot with a 'Bad magic number' message dropping me back to the uboot prompt.  A couple of posts suggest that this can be fixed by loading an older version of openwrt in a jffs image before loading the stock Netgear image.
Is there such an jffs image available as all the links appear to be broken?

Checking the first two bytes of FLASH returns the same data as in #902 of this thread.

Is there an updated method of reverting to Netgear firmware for the WNR854T?


Help would be much appreciated as I have just about run out of ideas.

there is the module mwl8k for topdog wifi card, else you need to change minipci wifi card to a AR5416 to use default configuration

Apart from mwl8k you need to upload a barely legal firmware in order to get a semi-working stock wifi card. See #846 again.

Thanks Tanguy and Nilfred for the info. I loaded the mwl8k kernel module but there was no firmware for the card so it still didn't work. I also found TRAC #8325 which supports a comment somewhere in this forum on the routing performance not being as good as expected. So, I have decided the 854T won't currently do what I need and will look at other options.

I have successfully reverted to Netgear 1.4.38 using the method here: https://forum.openwrt.org/viewtopic.php … 167#p94167. The trick appears to be to load a jffs2 version of Openwrt before then loading the Negear firmware as daggerNC reported here: https://forum.openwrt.org/viewtopic.php … 80#p104780.
I found a jffs2 firmware here: http://ftp.arklinux.org/pub/nslu2/feeds … /unstable/

jcwoltz : i've implemented uboot command line (and irq button reset)

see https://dev.openwrt.org/attachment/tick … -setup.3.c

In fact uboot command line is a normal kernel tag, but ignored by CONFIG_CMDLINE_FORCE

(Last edited by Tanguy on 22 Feb 2011, 14:08)

@WNR854T
From Tanguy ticket #8729:
-Makefile: Fiddling with default profile, [s]there is another ticket where profiles where created[/s].

find ~/openwrt/ -name Makefile | grep /orion/
~/openwrt/trunk/target/linux/orion/Makefile
~/openwrt/trunk/target/linux/orion/image/Makefile
cat ~/openwrt/trunk/target/linux/orion/image/Makefile
diff -urN ~/openwrt/trunk/target/linux/orion/Makefile Makefile

-Hardware.2-MAC address: This code should output the MAC, but is not even closer:

dd if=/dev/mtdblock$(sed -n '/u-*boot/ s/[a-z]*\([0-9]*\):.*/\1/p' /proc/mtd) bs=1 skip=262048 count=6 2>/dev/null | hexdump -e '1/1 "%02x"' ; echo

Test it.
I didn't find anything useful there, but if someone feels lucky, here you are:

dd if=/dev/mtdblock$(sed -n '/u-*boot/ s/[a-z]*\([0-9]*\):.*/\1/p' /proc/mtd) of=/tmp/uboot bs=128k count=2
ln -s /tmp/uboot /www/uboot
# In Ubuntu:
wget http://192.168.1.1/uboot
bless uboot

-Hardware.2-LEDs: Looks a bit mangled:

set system.wan_led.sysfs='wnr854t:green:power'
set system.wifi_led.sysfs='wnr854t:green:wan'

find ~/openwrt/ -name hardware | grep /uci-defaults/ wrote:

= ~/openwrt/trunk/staging_dir/target-arm_v5t_uClibc-0.9.32_eabi/root-orion/etc/uci-defaults/hardware
= ~/openwrt/trunk/build_dir/target-arm_v5t_uClibc-0.9.32_eabi/root-orion/etc/uci-defaults/hardware
= ~/openwrt/trunk/build_dir/linux-orion_generic/base-files/ipkg-orion/base-files/etc/uci-defaults/hardware
= ~/openwrt/trunk/target/linux/orion/generic/base-files/etc/uci-defaults/hardware

-wnr854t-setup.3.c: Looks promising. The patch shuld be against the 101 patched file to avoid the bad format error.

find ~/openwrt/ -name wnr854t-setup.c wrote:

= ~/openwrt/trunk/build_dir/toolchain-arm_v5t_gcc-4.3.3+cs_uClibc-0.9.32_eabi/linux-2.6.37/arch/arm/mach-orion5x/wnr854t-setup.c
= ~/openwrt/trunk/build_dir/toolchain-arm_v5t_gcc-4.3.3+cs_uClibc-0.9.32_eabi/linux-2.6.37.1/arch/arm/mach-orion5x/wnr854t-setup.c
101 Patched ~/openwrt/trunk/build_dir/linux-orion_generic/linux-2.6.37.1/arch/arm/mach-orion5x/wnr854t-setup.c
= ~/openwrt/trunk/build_dir/linux-orion_generic/linux-2.6.37.1/.pc/platform/101-wnr854t_partition_map.patch/arch/arm/mach-orion5x/wnr854t-setup.c

For a complete custom build, add these unapproved patches:
Ticket #8160 wnr854t does not have LEDs nor input support. diag.sh
Ticket #8183 (closed enhancement: wontfix) allow flexible kernel mtd sizes for Orion
Ticket #8271 [wrt350nv2] keytype for gpio-keys in kernel
Better 8361p patch
Still no profile stuff. Something else I miss to add to the list?
It's now safe to change LAN MAC address[s]?[/s]: Checked on r25661.

(Last edited by Nilfred on 25 Feb 2011, 00:22)

For the macaddr, the dd from mtdblock doesnt seems to work on 854t

but there is no need... You have just to set the mac addresses in UBoot Env (via Serial, type enter on boot)

default is ethaddr=00:00:00:00:51:81


yea, made a mistake in set system leds patch

You can find my full current orion source tree here :
http://tanguy.wdscript.fr/?q=wnr854t

And the compiled image and packages here :

http://tanguy.wdscript.fr/wnr854t/openwrt_r25723/

(Last edited by Tanguy on 26 Feb 2011, 07:33)

Tanguy wrote:

For the macaddr, the dd from mtdblock doesnt seems to work on 854t

but there is no need... You have just to set the mac addresses in UBoot Env (via Serial, type enter on boot)

default is ethaddr=00:00:00:00:51:81

There is no success reports of saveenv after that. Have to JTAG debrick after saveenv.
I could not find 5181 also on downloaded uboot. Compressed, scrambled? If I found it could dd it instead of serial hack.
Did you succeeded on saveenv?

Nilfred wrote:

Did you succeeded on saveenv?

yes sure... with setenv ethaddr

dont touch other settings

i will do it again on my second wnr854t, but it is not connected via serial now

if you dont write to the uboot partition code, i dont think you can brick the router, in serial you will have the menu again to change env if something is wrong

(Last edited by Tanguy on 28 Feb 2011, 05:08)

mrk wrote:

Well, my work concerning the download mode is finished by now.
In the last days, I extended the upslug2 sources.

The new features are:
* network identity of wrt350nv2
* only "--image" option is allowed with wrt350nv2 (this prevents You of my first mistake at #951)
* security check of recovery image (linux hardware id, squashfs id and the holy eRcOmM)

If You want to try, use this patchfile 120-wrt350nv2-netid.patch.
Maybe we can give it into trunk.

It works for me (tm). Saved my WRT350N V2.0 smile

Hello everyone,

I have the router: WRT350N v2. I brick my router when I was trying to install openwrt firmware. I can not access the router in any way.

My router is like inside:

http://img192.imageshack.us/img192/8046/wrt350nv2inside.th.jpg

Uploaded with ImageShack.us

I wonder what is the cable or any other hardware do I need to fix my router. I also wondered what was the necessary software.

Thanks!!

Hello,
Some of these works to unbrick the WRT350N v2?


1 - http://cgi.ebay.co.uk/PC-USB-RS232-Modu … 829wt_1139

2 - http://cgi.ebay.co.uk/Sparkfun-USB-TTL- … 623wt_1139

3 - http://cgi.ebay.co.uk/Arduino-Compatibl … 684wt_1139

4 - http://cgi.ebay.co.uk/FTDI-USB-serial-U … 450wt_1139


If yes, what is the best option?

If not, what else can I buy?

I would try the download mode with my extensions for upslug2!
In most cases You don't need a serial cable to recover the firmware

Watch the WIKI for more information.

(Last edited by mrk on 12 Mar 2011, 12:19)