OpenWrt Forum Archive

Topic: Nand flash driver for bcm47xx wnr3500lv2.

The content of this topic has been archived on 29 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Hi,

I'm trying to have a version working for netgear wnr3500 lv2. As you may know there exists Openwrt images for this device but they do not work at all, the device getting bricked after flash.

I've found ways to build images that I can flash, and where the kernel boots (openwrt kernel or hand built kernel). But I can't get the flash/nand device to work so I cannot mount any root fs. I've tried to add many drivers in my hand built kernel but it does not change anything for now:

Starting program at 0x80001000
[    0.000000] Linux version 4.4.89 (pparent@pierre-laptop) (gcc version 5.4.0 (LEDE GCC 5.4.0 r4970-a37655b) ) #0 Tue Oct 3 09:07:26 2017
[    0.000000] bootconsole [early0] enabled
[    0.000000] CPU0 revision is: 00019749 (MIPS 74Kc)
[    0.000000] bcm47xx: Using bcma bus
-->[    0.000000] bcma: bus0: Found chip with id 0x5357, rev 0x02 and package 0x0A[/b]
[    0.000000] Determined physical RAM map:
[    0.000000]  memory: 07fff000 @ 00000000 (usable)
[    0.000000] Initrd not found or empty - disabling initrd
[    0.000000] Zone ranges:
[    0.000000]   Normal   [mem 0x0000000000000000-0x0000000007ffefff]
[    0.000000]   HighMem  empty
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000000000000-0x0000000007ffefff]
[    0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x0000000007ffefff]
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 32511
[    0.000000] Kernel command line: console=ttyS0,115200  noinitrd init=/bin/sh
[    0.000000] PID hash table entries: 512 (order: -1, 2048 bytes)
[    0.000000] Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
[    0.000000] Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
[    0.000000] Writing ErrCtl register=00000000
[    0.000000] Readback ErrCtl register=00000000
[    0.000000] Memory: 124368K/131068K available (3840K kernel code, 164K rwdata, 944K rodata, 224K init, 300K bss, 6700K reserved, 0K cma-reserved, 0K highmem)
[    0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] NR_IRQS:128
[    0.000000] bcma: bus0: Core 0 found: ChipCommon (manuf 0x4BF, id 0x800, rev 0x26, class 0x0)
[    0.000000] bcma: bus0: Core 1 found: IEEE 802.11 (manuf 0x4BF, id 0x812, rev 0x1C, class 0x0)
[    0.000000] bcma: bus0: Core 2 found: GBit MAC (manuf 0x4BF, id 0x82D, rev 0x03, class 0x0)
[    0.000000] bcma: bus0: Core 3 found: MIPS 74K (manuf 0x4A7, id 0x82C, rev 0x04, class 0x0)
[    0.000000] bcma: bus0: Core 4 found: USB 2.0 Host (manuf 0x4BF, id 0x819, rev 0x05, class 0x0)
[    0.000000] bcma: bus0: Core 5 found: DDR1/DDR2 Memory Controller (manuf 0x4BF, id 0x82E, rev 0x02, class 0x0)
[    0.000000] bcma: bus0: Core 6 found: I2S (manuf 0x4BF, id 0x834, rev 0x02, class 0x0)
[    0.000000] bcma: bus0: Core 7 found: Internal Memory (manuf 0x4BF, id 0x80E, rev 0x0B, class 0x0)
-->[    0.000000] bcma: bus0: Unsupported ST serial flash (id: 0x0, id2: 0x0)[/b]
[    0.000000] bcma: bus0: Early bus registered
[    0.000000] MIPS: machine is Unknown Board
[    0.000000] bcm47xx: Setting up vectored interrupts
[    0.000000] clocksource: MIPS: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7963585194 ns
[    0.000014] sched_clock: 32 bits at 240MHz, resolution 4ns, wraps every 8947848189ns
[    0.008695] Calibrating delay loop... 239.61 BogoMIPS (lpj=1198080)
[    0.081647] pid_max: default: 32768 minimum: 301
[    0.087017] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.094367] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.106985] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.117978] futex hash table entries: 256 (order: -1, 3072 bytes)
[    0.125885] NET: Registered protocol family 16
[    0.170089] SCSI subsystem initialized
[    0.177138] clocksource: Switched to clocksource MIPS
[    0.185749] NET: Registered protocol family 2
[    0.191967] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[    0.199790] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[    0.206806] TCP: Hash tables configured (established 1024 bind 1024)
[    0.214070] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.220613] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.228078] NET: Registered protocol family 1
[    0.250633] can not parse nvram name sb/1/boardnum(null) with value 3500L got -22
[    0.275717] bcma: bus0: Bus registered
[    0.316038] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.322586] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    0.349553] io scheduler noop registered
[    0.353859] io scheduler deadline registered (default)
[    0.360069] Serial: 8250/16550 driver, 2 ports, IRQ sharing enabled
[    0.392520] serial8250.0: ttyS0 at MMIO 0xb8000300 (irq = 2, base_baud = 1250000) is a U6_16550A
[    0.402326] console [ttyS0] enabled
[    0.402326] console [ttyS0] enabled
[    0.409719] bootconsole [early0] disabled
[    0.409719] bootconsole [early0] disabled
[    0.419666] st: Version 20101219, fixed bufsize 32768, s/g segs 256
[    0.426334] osst :I: Tape driver with OnStream support version 0.99.4
[    0.426334] osst :I: $Id: osst.c,v 1.73 2005/01/01 21:13:34 wriede Exp $
[    0.440843] SCSI Media Changer driver v0.25 
-->][    0.448216] bcm47xxnflash: Device not supported
[    0.452820] bcm47xxnflash: Initialization failed: -524[/b]
[    0.458167] bcma_nflash: probe of bcma_nflash.0 failed with error -524
[    0.479737] libphy: Fixed MDIO Bus: probed
[    0.484247] bgmac_bcma bcma0:2: Found PHY addr: 30 (NOREGS)
[    0.492863] libphy: bcma_mdio mii bus: probed
[    0.497400] bgmac_bcma bcma0:2: Support for Roboswitch not implemented
[    0.655077] b53_common: found switch: BCM53115, rev 8
[    0.661702] bgmac_bcma: Broadcom 47xx GBit MAC driver loaded
[    0.668393] bcm47xx-wdt bcm47xx-wdt.0: BCM47xx Watchdog Timer enabled (30 seconds)
[    0.676575] Synopsys Designware Multimedia Card Interface Driver
[    0.685547] NET: Registered protocol family 10
[    0.698019] NET: Registered protocol family 17
[    0.702706] bridge: automatic filtering via arp/ip/ip6tables has been deprecated. Update your scripts to load br_netfilter if you need this.
[    0.715633] 8021q: 802.1Q VLAN Support v1.8
[    0.726297] Key type encrypted registered
[    0.732566] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
[    0.744226] Rebooting in 10 seconds..

As a comparaison there is a dd-wrt version compiled by kong which works on wnr3500-lv2 and which outputs the following:

Starting program at 0x80001000
Linux version 3.10.84 (bluebat@opensuse) (gcc version 5.1.0 (OpenWrt GCC 5.1.0 r45933) ) #67 Fri Jul 17 08:06:51 CEST 2015
CPU revision is: 00019749 (MIPS 74Kc)
->Found a AMD NAND flash with 2048B pages or 128KB blocks; total size 128MB
Determined physical RAM map:
 memory: 07fff000 @ 00000000 (usable)
Zone ranges:
  Normal   [mem 0x00000000-0x07ffefff]
  HighMem  empty
Movable zone start for each node
Early memory node ranges
  node   0: [mem 0x00000000-0x07ffefff]
Primary instruction cache 32kB, 4-way, VIPT, I-cache aliases, linesize 32 bytes.
Primary data cache 32kB, 4-way, VIPT, cache aliases, linesize 32 bytes
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 32511
Kernel command line: console=ttyS0,115200 root=1f05 rootfstype=squashfs noinitrd init=/bin/sh
PID hash table entries: 512 (order: -1, 2048 bytes)
Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
Writing ErrCtl register=00000000
Readback ErrCtl register=00000000
Memory: 125144k/131068k available (3180k kernel code, 5924k reserved, 547k data, 300k init, 0k highmem)
NR_IRQS:128
CPU: BCM5357 rev 2 at 480 MHz
bcm947xx_clockevent_set_mode: 1
bcm947xx_clockevent_set_mode: 3
console [ttyS0] enabled
Calibrating delay loop... 239.61 BogoMIPS (lpj=1198080)
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 512
NET: Registered protocol family 16
bio: create slab <bio-0> at 0
PCI: no core
PCI: no core
PCI: scanning bus 0
PCI host bridge to bus 0000:00
pci_bus 0000:00: root bus resource [io  0x0000-0xffff]
pci_bus 0000:00: root bus resource [mem 0x00000000-0xffffffff]
pci_bus 0000:00: root bus resource [bus 00-ff]
PCI: Fixing up bus 0
Switching to clocksource MIPS
NET: Registered protocol family 2
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
WNR3500L V2 GPIO Init
squashfs: version 3.0 (2006/03/15) Phillip Lougher
msgmni has been set to 244
io scheduler noop registered (default)
HDLC line discipline maxframe=4096
N_HDLC line discipline registered.
Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled
serial8250: ttyS0 at MMIO 0x0 (irq = 8) is a U6_16550A
brd: module loaded
pflash: found no supported devices
Found an ST compatible serial flash with 0 64KB blocks; total size 0MB
bcmsflash: found no supported devices
-->Creating 2 MTD partitions on "brcmnand":
-->0x000000500000-0x000002000000 : "linux"
-->0x000004000000-0x000007f00000 : "ddwrt"
-->Boot partition size = 524288(0x80000)
-->lookup_nflash_rootfs_offset: offset = 0x500000
-->found trx at 500000, len =15257600
-->scan filesys at 678000
-->nflash: squash filesystem with lzma found at offset 500000
-->Creating 4 MTD partitions on "nflash":
-->0x000000000000-0x000000080000 : "cfe"
-->0x000000080000-0x000000200000 : "nvram"
-->0x000000500000-0x000002000000 : "nandimage"
-->0x000000678000-0x000002000000 : "rootfs"
-->mtd: partition "rootfs" set to be root filesystem
add netgear boarddata for pflash if exists
add netgear boarddata for sflash if exists
tun: Universal TUN/TAP device driver, 1.6
tun: (C) 1999-2004 Max Krasnyansky <maxk@qualcomm.com>
PPP generic driver version 2.4.2
PPP BSD Compression module registered
PPP Deflate Compression module registered
PPP MPPE Compression module registered
NET: Registered protocol family 24
Broadcom Watchdog Timer: 0.07 initialized.
GACT probability NOT on
Mirror/redirect action on
Failed to load ipt action
Simple TC action Loaded
netem: version 1.3
u32 classifier
    Performance counters on
    input device check on
    Actions configured
Netfilter messages via NETLINK v0.30.
nf_conntrack version 0.5.0 (1955 buckets, 7820 max)
nf_conntrack_rtsp v0.6.21 loading
xt_time: kernel timezone is -0000
ip_set: protocol 6
gre: GRE over IPv4 demultiplexor driver
nf_nat_rtsp v0.6.21 loading
ip_tables: (C) 2000-2006 Netfilter Core Team
TCP: bic registered
TCP: cubic registered
TCP: westwood registered
TCP: highspeed registered
TCP: hybla registered
TCP: htcp registered
TCP: vegas registered
TCP: veno registered
TCP: scalable registered
TCP: lp registered
TCP: yeah registered
TCP: illinois registered
NET: Registered protocol family 17
Bridge firewalling registered
8021q: 802.1Q VLAN Support v1.8
startup nvram driver
found nvram
VFS: Mounted root (squashfs filesystem) readonly on device 31:5.
Freeing unused kernel memory: 300K (803a5000 - 803f0000)
start service
starting Architecture code for broadcom

Pretty much the same with tomato. Obviously it fails because I don't get "Found a AMD NAND flash", in openwrt or lede. I don't understand what more can be included in dd-wrt kernel, that is not openwrt or lede or my hand-built kernel. Any help would be much welcome!

Pierre.

(Last edited by pparent on 4 Oct 2017, 11:50)

Hello Pierre

Actually I use dd-wrt r33140 and it works with a wnr3500LV2. It would be nice that OpenWRT carries this router so that it can work with OpenWRT. How can we help the community? I can give logs because my router works with dd-wrt.

Hi,

See this post:

https://forum.lede-project.org/t/nand-f … 00lv2/7116

Unfortunately the more I keep working on it, the harder it seems. A the beginning I thought it was only an image formating problem. Now it's a NAND driver problem, and the NAND driver seems not trivial at all to compile.

I would use help from developers more experienced than I am!

(Last edited by pparent on 11 Oct 2017, 13:47)

Ps: If a developer wants to help me with this I can send free wnr3500lv2

a.limousin wrote:

Actually I use dd-wrt r33140 and it works with a wnr3500LV2.

I can not find a DD-WRT r33140 release. Could you please provide a link? According to dd-wrt.com/phpBB2/viewtopic.php?t=150789 newer builds are not working.

I use a long time without problem

Linux & Tomato
Tomato Firmware v1.28.9055 MIPSR2-beta-git-20110414 K26 USB Ext
USB support integration and GUI, IPv6 support,
Linux kernel 2.6.22.19 and Broadcom Wireless Driver 5.10.147.0 updates,
support for additional router models, dual-band and Wireless-N mode.
Copyright (C) 2008-2011 Fedor Kozhevnikov, Ray Van Tassle, Wes Campaigne
http://www.tomatousb.org
Based on Tomato Firmware v1.28
Copyright (C) 2006-2010 Jonathan Zarate
http://www.polarcloud.com/tomato/

The Openwrt community plans to make the wnr3500lv2 compatible?

What must be done to make it compatible? Who should we ask?

I go back on this subject. Someone to news of the progress of wnr3500lv2 in openwrt?

The discussion might have continued from here.