OpenWrt Forum Archive

Topic: OpenWRT on Linksys WAG320N

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

HI
First of all, I'm not very experienced in developing software for embedded linux devices.

OpenWRT is running on the Linksys WAG160N and the WAG320N is also a Broadcom BCM6358 device.

So, what is missing to get OpenWRT running on the WAG320N?

After reading a little bit about OpenWRT on devices with ADSL-modem I found out that the main problem is the missing PPP/ADSL driver - Is this correct?

The WAG320N is a Linux powered device and due to a bug in the web interface of the default firmware it is possible to access the shell.

During boot the WAG320N loads several Broadcom drivers (Ethernet, WLAN), the USB interface driver, and the "PPP generic driver version 2.4.2"

Full dmesg output of WAG320N (Firmware 1.0.12 Annex A)

Linux version 2.6.21.5 (fredfu@sbu-ii-1-server) (gcc version 3.4.2) #1 Fri Mar 19 13:21:09 CST 2010
Parallel flash device: name AM29DL800B, id 0x22cb, size 8192KB
96358GWVG prom init
CPU revision is: 0002a010
Determined physical RAM map:
 memory: 01fa0000 @ 00000000 (usable)
On node 0 totalpages: 8096
  DMA zone: 32 pages used for memmap
  DMA zone: 0 pages reserved
  DMA zone: 4064 pages, LIFO batch:0
  Normal zone: 31 pages used for memmap
  Normal zone: 3969 pages, LIFO batch:0
Built 1 zonelists.  Total pages: 8033
Kernel command line: root=31:1 ro noinitrd console=ttyS0,115200
brcm mips: enabling icache and dcache...
Primary instruction cache 32kB, physically tagged, 2-way, linesize 16 bytes.
Primary data cache 16kB, 2-way, linesize 16 bytes.
Synthesized TLB refill handler (21 instructions).
Synthesized TLB load handler fastpath (33 instructions).
Synthesized TLB store handler fastpath (33 instructions).
Synthesized TLB modify handler fastpath (32 instructions).
PID hash table entries: 128 (order: 7, 512 bytes)
Using 150.000 MHz high precision timer.
Dentry cache hash table entries: 4096 (order: 2, 16384 bytes)
Inode-cache hash table entries: 2048 (order: 1, 8192 bytes)
Memory: 28960k/32384k available (2337k kernel code, 3424k reserved, 386k data, 112k init, 0k highmem)
Calibrating delay loop... 299.00 BogoMIPS (lpj=747520)
Mount-cache hash table entries: 512
NET: Registered protocol family 16
Total Flash size: 8192K with 135 sectors
File system address: 0xbe010100
registering PCI controller with io_map_base unset
SCSI subsystem initialized
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
BLOG v1.0 Initialized
NET: Registered protocol family 8
NET: Registered protocol family 20
Time: MIPS clocksource has been installed.
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
squashfs: version 3.2-r2 (2007/01/15) Phillip Lougher
squashfs: LZMA suppport for slax.org by jro
io scheduler noop registered (default)
loop: loaded (max 8 devices)
PPP generic driver version 2.4.2
NET: Registered protocol family 24
bcm963xx_mtd driver v1.0
bcm963xx_mtd  kernel_addr=be636100 rootfs_addr=be010100
brcm_physmap_map.map_priv_1=be000000
do_map_probe
Physically mapped flash: Found 1 x16 devices at 0x0 in 16-bit bank
 Amd/Fujitsu Extended Query Table at 0x0040
number of CFI chips: 1
cfi_cmdset_0002: Disabling erase-suspend-program due to code brokenness.
do_map_probe finish
mymtd = 81f6a480
Creating 4 MTD partitions on "Physically mapped flash":
0x00000000-0x00010000 : "bootloader"
0x00010100-0x00636100 : "fs"
mtd: partition "fs" doesn't start on an erase block boundary -- force read-only
0x00010000-0x007f0000 : "tag+fs+kernel"
0x007f0000-0x00800000 : "nvram"
PCI: Enabling device 0000:00:0a.0 (0000 -> 0002)
PCI: Setting latency timer of device 0000:00:0a.0 to 64
ehci_hcd 0000:00:0a.0: EHCI Host Controller
ehci_hcd 0000:00:0a.0: new USB bus registered, assigned bus number 1
ehci_hcd 0000:00:0a.0: irq 18, io mem 0xfffe1300
ehci_hcd 0000:00:0a.0: USB f.f started, EHCI 1.00, driver 10 Dec 2004
usb usb1: configuration #1 chosen from 1 choice
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 2 ports detected
ohci_hcd: 2006 August 04 USB 1.1 'Open' Host Controller (OHCI) Driver
hub 1-0:1.0: over-current change on port 2
PCI: Enabling device 0000:00:09.0 (0000 -> 0002)
PCI: Setting latency timer of device 0000:00:09.0 to 64
ohci_hcd 0000:00:09.0: OHCI Host Controller
ohci_hcd 0000:00:09.0: new USB bus registered, assigned bus number 2
ohci_hcd 0000:00:09.0: irq 13, io mem 0xfffe1400
usb usb2: configuration #1 chosen from 1 choice
hub 2-0:1.0: USB hub found
hub 2-0:1.0: 2 ports detected
USB Universal Host Controller Interface driver v3.0
Initializing USB Mass Storage driver...
usbcore: registered new interface driver usb-storage
USB Mass Storage support registered.
brcmboard: brcm_board_init entry
Serial: BCM63XX driver $Revision: 1.1.1.1 $
ttyS0 at MMIO 0xfffe0100 (irq = 10) is a BCM63XX
ttyS1 at MMIO 0xfffe0120 (irq = 11) is a BCM63XX
blaadd: blaa_detect entry
adsl: adsl_init entry
Broadcom BCMPROCFS v1.0 initialized
Mirror/redirect action on
u32 classifier
    input device check on 
    Actions configured 
Netfilter messages via NETLINK v0.30.
nf_conntrack version 0.5.0 (253 buckets, 2024 max)
nf_conntrack_rtsp v0.6.21 loading
nf_nat_rtsp v0.6.21 loading
ip_tables: (C) 2000-2006 Netfilter Core Team
TCP cubic registered
NET: Registered protocol family 1
NET: Registered protocol family 17
NET: Registered protocol family 15
Ebtables v2.0 registered
802.1Q VLAN Support v1.8 Ben Greear <greearb@candelatech.com>
All bugs added by David S. Miller <davem@redhat.com>
VFS: Mounted root (squashfs filesystem) readonly.
Freeing unused kernel memory: 112k freed
Algorithmics/MIPS FPU Emulator v1.5
ufsd: module license 'Commercial product' taints kernel.
ufsd: driver loaded at c0078000 built on Apr  1 2009 15:03:21
UFSD version 7.01 (Mar 24 2009, 12:22:54)
NTFS read/write support included
Big endian platform
$Id: ufsdvfs.c,v 1.192 2009/01/15 13:04:35 shura Exp $
Broadcom BCM6358A1 Ethernet Network Device v0.3 Mar 19 2010 13:19:03
pDevCtrl->EnetInfo.ucPhyType=3
pDevCtrl->EnetInfo.usConfigType=1
pDevCtrl->EnetInfo.numSwitchPorts=4
pDevCtrl->EnetInfo.usConfigType=1
Config Ethernet Switch Through MDIO Pseudo PHY Interface
dgasp: kerSysRegisterDyingGaspHandler: eth0 registered 
BCM53115S Switch
Clear 802.1Q VLAN Table.
Create 802.1Q VLAN Table.
eth0: MAC Address: 00:22:6B:FA:FC:65
Page 10h, MII Address 0x1c: 2821.
Page 11h, MII Address 0x1c: 2821.
Page 12h, MII Address 0x1c: 2821.
Page 13h, MII Address 0x1c: 2821.
PCI: Enabling device 0000:00:01.0 (0000 -> 0002)
PCI: Setting latency timer of device 0000:00:01.0 to 64
wl0: Broadcom BCM432b 802.11 Wireless Controller 5.10.85.0.cpe4.402.4
dgasp: kerSysRegisterDyingGaspHandler: wl0 registered 
Ioctl: SIOCGDISABLEVLAN
.BCM53115S Switch
Clear 802.1Q VLAN Table.
eth0 Link UP.
device eth0 entered promiscuous mode
BcmAdsl_Initialize=0x80172AD8, g_pFnNotifyCallback=0x802A9AB0
AnnexCParam=0x2AAF5140 AnnexAParam=0x00000980 adsl2=0x00000000
pSdramPHY=0xA1FFFFF8, 0xAA55AA55 0xAA55AA55
AdslCoreSharedMemInit: shareMemAvailable=13328
AdslCoreHwReset:  AdslOemDataAddr = 0xA1FFBB64
AnnexCParam=0x2AAF5140 AnnexAParam=0x00000980 adsl2=0x00000000
dgasp: kerSysRegisterDyingGaspHandler: dsl0 registered 
ATM proc init !!!
br0: port 1(eth0) entering learning state
br0: topology change detected, propagating
br0: port 1(eth0) entering forwarding state
fast bridge eth0=0x81DC0000 wl0=0x81E83400
device wl0 entered promiscuous mode
br0: port 2(wl0) entering learning state
br0: topology change detected, propagating
br0: port 2(wl0) entering forwarding state
xDSL G.994 training
ipt_LOG: not logging via system console since somebody else already registered for PF_INET
/proc/log created
netfilter PSD loaded - (c) astaro AG
ipt_random match loaded
ADSL G.992 started
ADSL G.992 channel analysis
ADSL G.992 message exchange
ADSL link up, fast, us=512, ds=6176
apps set the adsl with value 0
, the count is 2
the wan_ip_existing is 0
apps set the adsl with value 1
, the count is 2
the wan_ip_existing is 1
Ioctl: SIOCGDISABLEVLAN
.BCM53115S Switch
Clear 802.1Q VLAN Table.

Would it be possible to install OpenWRT on the WAG320N or are there other problem which I haven't thought of?

the forum search shows that there might be some troubles: https://forum.openwrt.org/viewtopic.php?pid=102924
Another attempt is to read a bit through the wiki on how to get new devices supported and then diff the sources of the wag160n (for example this one) against the wag320n sources (you probably have to ask linksys to publish them) to find the differences between those two devices.

The discussion might have continued from here.