OpenWrt Forum Archive

Topic: WGT624V3 - Flash upgrade and Redboot bootloader - A little help

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

Dear all,

   I have just replaced my WGT624 V3 flash from 2 MB(25P16) to 4MB (25P32) for I was trying to get rid of the VXWorks Bootloader without jtaging it (due to the lack of information). After building a flash programmer, I was able  to back up my router's firmware.  The next step was copying my backed up firmware to a new 25P32 and booting the WGT624 in order to see if everything went right. The WGT624 recognized the extra space but it complained about the cheksum.

AR2316A SOC :
   http://i219.photobucket.com/albums/cc120/amsjbr/100_2805.jpg
   http://i219.photobucket.com/albums/cc120/amsjbr/100_2779.jpg
   http://i219.photobucket.com/albums/cc120/amsjbr/100_2780.jpg
   http://i219.photobucket.com/albums/cc120/amsjbr/100_2769.jpg

Flash amount check after IC replacement
   http://i219.photobucket.com/albums/cc120/amsjbr/FlashMemCheck.jpg

   Then using the source of the Redboot cobra from DD-WRT, I could compile a fresh Bootloader and I could give a try on it. It worked properly even though I couldn't set my MAC address properly.

First Redboot trial
   http://i219.photobucket.com/albums/cc120/amsjbr/Redboot_bootloader.jpg

  Now, I am trying to build a good kernel to get my WGT624 back to life and free from VXWorks. However, up to now, I haven't succed.  I have tried different OpenWRT flavors. I couldn't boot a Meraki's kernel on it so I tried the litestation 2, which I suppose is based on the ar2316 SOC, from Ubiquity.  The router boots properly but the madwifi terminates on error. I tried to compile newer madwifi versions but I'm not as keen in linux programming as with hardware modifications.
   The latest test I tried was using the fonera's port tailored to the WGT624 hardware, based on the kernel 2.4.36.  Once again, It boots up properly (I even have access to the "fon's" console) but when the madwifi's modules are loaded the system crashes.

Foneras kernel on WGT624

Couldn't find valid MAC address for enet0. Using default!
Ethernet eth0: MAC address 00:14:6c:10:f0:45
IP: 192.168.1.20/255.255.255.0, Gateway: 192.168.1.1
Default server: 192.168.1.250

RedBoot(tm) bootstrap and debug environment [ROMRAM]
Non-certified release, version UNKNOWN - built 10:01:23, Nov  9 2007

Copyright (C) 2000, 2001, 2002, 2003, 2004 Red Hat, Inc.
Copyright (C) 2007 14BIZ Brazil (ATHEROS FLAVOR)

Board: WGT624V3
RAM: 0x80000000-0x81000000, [0x8003fd80-0x80fe1000] available
FLASH: 0xa8000000 - 0xa83f0000, 64 blocks of 0x00010000 bytes each.
== Executing boot script in 2.000 seconds - enter ^C to abort
^C
RedBoot> ^C
RedBoot> ^C
RedBoot> fis list
Name              FLASH addr  Mem addr    Length      Entry point
RedBoot           0xA8000000  0xA8000000  0x00030000  0x00000000
vmlinux.bin.l7    0xA8030000  0x80040000  0x00080000  0x80040000
rootfs            0xA80B0000  0x80040000  0x00330000  0x80040000
FIS directory     0xA83E0000  0xA83E0000  0x0000F000  0x00000000
RedBoot config    0xA83EF000  0xA83EF000  0x00001000  0x00000000
RedBoot> load openwrt-ar531x-2.4-vmlinux.elf
Using default protocol (TFTP)
Entry point: 0x80190040, address range: 0x80041000-0x801ba000
RedBoot> exec
Now booting linux kernel:
 Base address 0x80030000 Entry 0x80190040
 Cmdline :
CPU revision is: 00019064
Primary instruction cache 16kB, physically tagged, 4-way, linesize 16 bytes.
Primary data cache 16kB, 4-way, linesize 16 bytes.
Linux version 2.4.32 (root@14biz) (gcc version 3.4.6 (OpenWrt-2.0)) #3 Sáb Nov 17 14:27:35 BRST 2007
Determined physical RAM map:
 memory: 01000000 @ 00000000 (usable)
On node 0 totalpages: 4096
zone(0): 4096 pages.
zone(1): 0 pages.
zone(2): 0 pages.
Kernel command line: console=ttyS0,115200 rootfstype=squashfs,jffs2
Using 92.000 MHz high precision timer.
Calibrating delay loop... 183.50 BogoMIPS
Memory: 14188k/16384k available (1327k kernel code, 2196k reserved, 92k data, 68k init, 0k highmem)
Dentry cache hash table entries: 2048 (order: 2, 16384 bytes)
Inode cache hash table entries: 1024 (order: 1, 8192 bytes)
Mount cache hash table entries: 512 (order: 0, 4096 bytes)
Buffer cache hash table entries: 1024 (order: 0, 4096 bytes)
Page-cache hash table entries: 4096 (order: 2, 16384 bytes)
Checking for 'wait' instruction...  available.
POSIX conformance testing by UNIFIX
Linux NET4.0 for Linux 2.4
Based upon Swansea University Computer Society NET3.039
Initializing RT netlink socket
Starting kswapd
devfs: v1.12c (20020818) Richard Gooch (rgooch@atnf.csiro.au)
devfs: boot_options: 0x1
JFFS2 version 2.1. (C) 2001 Red Hat, Inc., designed by Axis Communications AB.
squashfs: version 3.0 (2006/03/15) Phillip Lougher
pty: 256 Unix98 ptys configured
Serial driver version 5.05c (2001-07-08) with no serial options enabled
ttyS00 at 0xb1100003 (irq = 37) is a 16550A
get_board_config: no board config found
no valid mac found, using defaultseth0: Dropping NETIF_F_SG since no checksum feature.
eth0: Atheros AR2313: 00:aa:bb:cc:dd:ee, irq 4
MTD driver for SPI flash.
spiflash: Probing for Serial flash ...
spiflash: Found SPI serial Flash.
4194304: size
Creating 8 MTD partitions on "spiflash":
0x00000000-0x00030000 : "RedBoot"
0x00030000-0x000b0000 : "vmlinux.bin.l7"
0x000b0000-0x003d0000 : "rootfs"
0x00230000-0x003d0000 : "rootfs1"
0x003d0000-0x003e0000 : "config"
0x003e0000-0x003ef000 : "FIS directory"
mtd: partition "FIS directory" doesn't end on an erase block -- force read-only
0x003ef000-0x003f0000 : "RedBoot config"
mtd: partition "RedBoot config" doesn't start on an erase block boundary -- force read-only
0x003f0000-0x00400000 : "board_config"
Initializing Cryptographic API
NET4: Linux TCP/IP 1.0 for NET4.0
IP Protocols: ICMP, UDP, TCP, IGMP
IP: routing cache hash table of 512 buckets, 4Kbytes
TCP: Hash tables configured (established 1024 bind 2048)
ip_conntrack version 2.1 (5953 buckets, 5953 max) - 328 bytes per conntrack
ip_tables: (C) 2000-2002 Netfilter core team
NET4: Unix domain sockets 1.0/SMP for Linux NET4.0.
NET4: Ethernet Bridge 008 for NET4.0
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.
Mounted devfs on /dev
Freeing unused kernel memory: 68k freed
init started:  BusyBox v1.1.3 (2007.11.17-00:49+0000) multi-call binary
Algorithmics/MIPS FPU Emulator v1.5

Please press Enter to activate this console.


BusyBox v1.1.3 (2007.11.17-00:49+0000) Built-in shell (ash)
Enter 'help' for a list of built-in commands.

 _______  _______  _______
|   ____||       ||   _   |
|   ____||   -   ||  | |  |
|   |    |_______||__| |__|
|___|

 Fonera Firmware (Version 0.7.0 rev 5) -------------
  *
  * Based on OpenWrt - http://openwrt.org
  * Powered by FON - http://www.fon.com
 ---------------------------------------------------
root@(none):/# Registering mini_fo version $Id$
mini_fo: using base directory: /
mini_fo: using storage directory: /jffs
jffs2.bbc: SIZE compression mode activated.
wlan: 0.8.4.2 (0.9.0)
ath_hal: 0.9.17.1 (AR5212, AR5312, RF5112, RF2316, RF2317, TX_DESC_SWAP)
Unhandled kernel unaligned access in unaligned.c::emulate_load_store_insn, line 481:
$0 : 00000000 10009500 22bc3cf1 68616c5f 22bc3cf1 c012b420 00000004 10009501
$8 : 00000000 00000001 00000003 61746800 801c0000 801c0000 801c0000 801c0000
$16: 22bc3ca1 00000003 22bc3cf1 0000416d 00000002 80060000 80ba7000 1010f3d8
$24: 00000001 ba2e8ba3                   80d5e000 80d5fd88 00000007 800a2068
Hi : 00000000
Lo : 207c0480
epc   : 800a2068    Tainted: P
Status: 10009503
Cause : 10800014
PrId  : 00019064
Process insmod (pid: 89, stackpage=80d5e000)
Stack:    8005e6c4 8009f4b0 80d01480 80239a40 c012b420 80d012a0 0000416d
 c012be54 0000416d 00000003 8027c1c0 800a20fc 801c0000 ffffffff 00000002
 ffffffff 00000000 c012be54 8005fae0 ffffffb4 80059d24 80060000 8027c1c0
 80059924 8027c1c0 c012bdfc 0000416d 00000003 8023ae20 8005fb2c 00000d91
 80059c24 801c0000 10009501 80d26720 00000001 c012bdfc c012b404 80059d24
 8005fbe0 ...

I would like some help to compile the madwifi port or perhaps the new ath5k in order to replace them into the rootfs to bring back to a new life this nice piece of equipment

Regards.

(Last edited by amsjow on 19 Nov 2007, 18:53)

I have openwrt working on a wgt624 v3 booting from ftp with the vxworks bootloader, all configuration prebuilt in the image file. very little change required (there's an unhandled irq that spams the console infinitely after startup, had to disable it). using trunk 11573 as of now. can you post instructions on getting redboot working?

How did this thing evolve?
Any luck?

I had a post how to build madwifi from the latest port to openwrt to 7.09.

(Last edited by yoonix on 11 Jul 2008, 00:13)

I could make Openwrt 8.09 working in my WGT624V3 after striping everything I could from the kernel yet it shows some unstability. It seems it lacks of enough memory (only 8 M) because it only worked after shrinking the kernel as much as I could.
   

Ethernet eth0: MAC address 00:14:6c:3d:49:d9
IP: 192.168.1.10/255.255.255.0, Gateway: 192.168.1.1
Default server: 192.168.1.250

RedBoot(tm) bootstrap and debug environment [ROMRAM]
Non-certified release, version UNKNOWN - built 10:19:37, Nov  9 2007

Copyright (C) 2000, 2001, 2002, 2003, 2004 Red Hat, Inc.
Copyright (C) 2007 14BIZ Brazil (ATHEROS FLAVOR)

Board: WGT624-ap51 
RAM: 0x80000000-0x81000000, [0x80040960-0x80fe1000] available
FLASH: 0xa8000000 - 0xa83f0000, 64 blocks of 0x00010000 bytes each.
== Executing boot script in 2.000 seconds - enter ^C to abort
RedBoot> fis load -l linux
Image loaded from 0x80041000-0x80248085
RedBoot> exec
Now booting linux kernel:
 Base address 0x80030000 Entry 0x80041000
 Cmdline : 
Linux version 2.6.26.7 (root@14biz) (gcc version 4.1.2) #23 Thu Nov 27 21:10:01 BRST 2008
Device ID in hex is 00000087
Mach Atheros AR2316
CPU revision is: 00019064 (MIPS 4KEc)
Determined physical RAM map:
 memory: 00800000 @ 00000000 (usable)
Initrd not found or empty - disabling initrd
Zone PFN ranges:
  Normal          0 ->     2048
Movable zone start PFN for each node
early_node_map[1] active PFN ranges
    0:        0 ->     2048
Built 1 zonelists in Zone order, mobility grouping off.  Total pages: 2032
Kernel command line: console=ttyS0,115200 rootfstype=squashfs,jffs2 init=/etc/preinit
Primary instruction cache 16kB, VIPT, 4-way, linesize 16 bytes.
Primary data cache 16kB, 4-way, VIPT, no aliases, linesize 16 bytes
PID hash table entries: 32 (order: 5, 128 bytes)
console [ttyS0] enabled
Dentry cache hash table entries: 1024 (order: 0, 4096 bytes)
Inode-cache hash table entries: 1024 (order: 0, 4096 bytes)
Memory: 5676k/8192k available (1685k kernel code, 2516k reserved, 273k data, 120k init, 0k highmem)
SLUB: Genslabs=6, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
Mount-cache hash table entries: 512
net_namespace: 484 bytes
NET: Registered protocol family 16
Radio config found at offset 0xf8(0x1f8)
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 512 (order: 0, 4096 bytes)
TCP bind hash table entries: 512 (order: -1, 2048 bytes)
TCP: Hash tables configured (established 512 bind 512)
TCP reno registered
NET: Registered protocol family 1
ar531x: Registering GPIODEV device
squashfs: version 3.0 (2006/03/15) Phillip Lougher
Registering mini_fo version $Id$
msgmni has been set to 16
io scheduler noop registered
io scheduler deadline registered (default)
gpiodev: gpio device registered with major 254
gpiodev: gpio platform device registered with access mask FFFFFFFF
Serial: 8250/16550 driver $Revision: 1.90 $ 1 ports, IRQ sharing disabled
serial8250: ttyS0 at MMIO 0xb1100003 (irq = 37) is a 16550A
eth0: Atheros AR231x: 00:14:6c:3d:49:d9, irq 4
ar2313_eth_mii: probed
eth0: Marvell 88E6060 PHY driver attached.
eth0: attached PHY driver [Marvell 88E6060] (mii_bus:phy_addr=0:1f)
cmdlinepart partition parsing not available
Searching for RedBoot partition table in spiflash at offset 0x3d0000
Searching for RedBoot partition table in spiflash at offset 0x3e0000
7 RedBoot partitions found on MTD device spiflash
Creating 7 MTD partitions on "spiflash":
0x00000000-0x00030000 : "RedBoot"
0x00030000-0x000e0000 : "linux"
0x000e0000-0x003c0000 : "rootfs"
mtd: partition "rootfs" set to be root filesystem
mtd: partition "rootfs_data" created automatically, ofs=1F0000, len=1D0000 
0x001f0000-0x003c0000 : "rootfs_data"
0x003c0000-0x003e0000 : "EEPROM"
0x003e0000-0x003ef000 : "FIS directory"
0x003ef000-0x003f0000 : "RedBoot config"
0x003f0000-0x00400000 : "boardconfig"
Registered led device: gpio1
Registered led device: gpio2
Registered led device: gpio3
Registered led device: gpio4
Registered led device: wlan
TCP vegas registered
NET: Registered protocol family 17
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: 120k freed
Please be patient, while OpenWrt loads ...
Algorithmics/MIPS FPU Emulator v1.5
- preinit -
Press CTRL-C for failsafe
switching to jffs2
jffs2 not ready yet; using ramdisk
mini_fo: using base directory: /
mini_fo: using storage directory: /tmp/root
- init -

Please press Enter to activate this console. ip_tables: (C) 2000-2006 Netfilter Core Team
device eth0.0 entered promiscuous mode
device eth0 entered promiscuous mode
br-lan: port 1(eth0.0) entering learning state
br-lan: topology change detected, propagating
br-lan: port 1(eth0.0) entering forwarding state
nf_conntrack version 0.5.0 (1024 buckets, 4096 max)
wlan: trunk
ath_hal: module license 'Proprietary' taints kernel.
ath_hal: 2008-10-02 (AR5212, AR5312, RF5111, RF5112, RF2316, RF2317, REGOPS_FUNC, TX_DESC_SWAP, DFS, XR)
ath_rate_minstrel: Minstrel automatic rate control algorithm 1.2 (trunk)
ath_rate_minstrel: look around rate set to 10%
ath_rate_minstrel: EWMA rolloff level set to 75%
ath_rate_minstrel: max segment size in the mrr set to 6000 us
wlan: mac acl policy registered
ath_ahb: trunk
Atheros HAL provided by OpenWrt, DD-WRT and MakSat Technologies
wifi0: 11b rates: 1Mbps 2Mbps 5.5Mbps 11Mbps
wifi0: 11g rates: 1Mbps 2Mbps 5.5Mbps 11Mbps 6Mbps 9Mbps 12Mbps 18Mbps 24Mbps 36Mbps 48Mbps 54Mbps
wifi0: turboG rates: 6Mbps 12Mbps 18Mbps 24Mbps 36Mbps 48Mbps 54Mbps
wifi0: H/W encryption support: WEP AES AES_CCM TKIP
ath_ahb: wifi0: Atheros 2315 WiSoC: mem=0xb0000000, irq=3
device ath0 entered promiscuous mode
br-lan: port 2(ath0) entering learning state
br-lan: topology change detected, propagating
br-lan: port 2(ath0) entering forwarding state



BusyBox v1.11.2 (2008-11-05 19:28:24 BRT) built-in shell (ash)
Enter 'help' for a list of built-in commands.

  _______                     ________        __
 |       |.-----.-----.-----.|  |  |  |.----.|  |_
 |   -   ||  _  |  -__|     ||  |  |  ||   _||   _|
 |_______||   __|_____|__|__||________||__|  |____|
          |__| W I R E L E S S   F R E E D O M
 KAMIKAZE (bleeding edge, r13122) -------------------
  * 10 oz Vodka       Shake well with ice and strain
  * 10 oz Triple sec  mixture into 10 shot glasses.
  * 10 oz lime juice  Salute!
 ---------------------------------------------------
root@OpenWrt:/# ps -ef
  PID USER       VSZ STAT COMMAND
    1 root      1884 S    init       
    2 root         0 SW<  [kthreadd]
    3 root         0 SW<  [ksoftirqd/0]
    4 root         0 SW<  [events/0]
    5 root         0 SW<  [khelper]
   24 root         0 SW<  [kblockd/0]
   45 root         0 SW   [pdflush]
   46 root         0 SW   [pdflush]
   47 root         0 SW<  [kswapd0]
   48 root         0 SW<  [aio/0]
  126 root         0 SW<  [mtdblockd]
  356 root      1884 S    /bin/sh /etc/init.d/rcS S boot 
  358 root      1884 S    logger -s -p 6 -t  
  359 root      1888 S    /bin/ash --login 
  373 root      1896 S    syslogd -C16 
  375 root      1876 S    klogd 
  387 root      1132 S    /sbin/hotplug2 --override --persistent --max-children
  841 root      1916 S    /bin/sh /etc/rc.common /etc/rc.d/S50dropbear boot 
  842 root      1940 R    /usr/bin/dropbearkey -t rsa -f /tmp/dropbear/dropbear
  852 root      1880 S    /usr/sbin/httpd -p 80 -h /www -r OpenWrt 
  853 root      1916 S    /bin/sh /etc/rc.common /etc/rc.d/S50telnet boot 
  855 root      1876 R    telnetd -l /bin/login 
  856 root      1884 R    ps -ef 
root@OpenWrt:/# uname -a
Linux OpenWrt 2.6.26.7 #23 Thu Nov 27 21:10:01 BRST 2008 mips unknown
root@OpenWrt:/#

ifconfig
ath0      Link encap:Ethernet  HWaddr 00:14:6C:3D:49:D8  
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

br-lan    Link encap:Ethernet  HWaddr 00:14:6C:3D:49:D8  
          inet addr:192.168.1.1  Bcast:192.168.1.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

eth0      Link encap:Ethernet  HWaddr 00:14:6C:3D:49:D9  
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
          Interrupt:255 Base address:0x1000 

eth0.0    Link encap:Ethernet  HWaddr 00:14:6C:3D:49:D9  
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

eth0.1    Link encap:Ethernet  HWaddr 00:14:6C:3D:49:D9  
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

wifi0     Link encap:UNSPEC  HWaddr 00-14-6C-3D-49-D8-00-00-00-00-00-00-00-00-00-00  
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:8264 errors:0 dropped:0 overruns:0 frame:1388
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:195 
          RX bytes:951306 (929.0 KiB)  TX bytes:0 (0.0 B)
          Interrupt:3 Memory:b0000000-b00ffffc 


root@OpenWrt:/# iwconfig
lo        no wireless extensions.

eth0      no wireless extensions.

eth0.0    no wireless extensions.

eth0.1    no wireless extensions.

br-lan    no wireless extensions.

wifi0     no wireless extensions.

ath0      IEEE 802.11g  ESSID:"netgear"  Nickname:""
          Mode:Master  Frequency:2.417 GHz  Access Point: 00:14:6C:3D:49:D8   
          Bit Rate:0 kb/s   Tx-Power:19 dBm   Sensitivity=1/1  
          Retry:off   RTS thr:off   Fragment thr:off
          Encryption key:off
          Power Management:off
          Link Quality=0/70  Signal level=-96 dBm  Noise level=-96 dBm
          Rx invalid nwid:174  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:0   Missed beacon:0

root@OpenWrt:/#

iwpriv ath0
ath0      Available private ioctls :
          setoptie         (8BEE) : set 256 byte  & get   0      
          getoptie         (8BEF) : set   0       & get 256 byte 
          setkey           (8BF2) : set  64 byte  & get   0      
          delkey           (8BF4) : set   7 byte  & get   0      
          setmlme          (8BF0) : set  42 byte  & get   0      
          addmac           (8BF6) : set   1 addr  & get   0      
          delmac           (8BF8) : set   1 addr  & get   0      
          kickmac          (8BFE) : set   1 addr  & get   0      
          wds_add          (8BF9) : set   1 addr  & get   0      
          wds_set          (8BFA) : set   1 addr  & get   0      
          setchanlist      (8BE6) : set  32 byte  & get   0      
          getchanlist      (8BE7) : set   0       & get  32 byte 
          getchaninfo      (8BED) : set   0       & get 639 int  
          mode             (8BE2) : set   6 char  & get   0      
          get_mode         (8BE3) : set   0       & get   6 char 
          setwmmparams     (8BE4) : set   4 int   & get   0      
          getwmmparams     (8BE5) : set   3 int   & get   1 int  
          doth_radar       (8BF1) : set   0       & get   0      
          cwmin            (0001) : set   3 int   & get   0      
          get_cwmin        (0001) : set   2 int   & get   1 int  
          cwmax            (0002) : set   3 int   & get   0      
          get_cwmax        (0002) : set   2 int   & get   1 int  
          aifs             (0003) : set   3 int   & get   0      
          get_aifs         (0003) : set   2 int   & get   1 int  
          txoplimit        (0004) : set   3 int   & get   0      
          get_txoplimit    (0004) : set   2 int   & get   1 int  
          acm              (0005) : set   3 int   & get   0      
          get_acm          (0005) : set   2 int   & get   1 int  
          noackpolicy      (0006) : set   3 int   & get   0      
          get_noackpolicy  (0006) : set   2 int   & get   1 int  
          setparam         (8BE0) : set   2 int   & get   0      
          getparam         (8BE1) : set   1 int   & get   1 int  
          authmode         (0003) : set   1 int   & get   0      
          get_authmode     (0003) : set   0       & get   1 int  
          protmode         (0004) : set   1 int   & get   0      
          get_protmode     (0004) : set   0       & get   1 int  
          protrssi         (004D) : set   1 int   & get   0      
          get_protrssi     (004D) : set   0       & get   1 int  
          prottime         (004E) : set   1 int   & get   0      
          get_prottime     (004E) : set   0       & get   1 int  
          mcastcipher      (0005) : set   1 int   & get   0      
          get_mcastcipher  (0005) : set   0       & get   1 int  
          mcastkeylen      (0006) : set   1 int   & get   0      
          get_mcastkeylen  (0006) : set   0       & get   1 int  
          ucastciphers     (0007) : set   1 int   & get   0      
          get_uciphers     (0007) : set   0       & get   1 int  
          ucastcipher      (0008) : set   1 int   & get   0      
          get_ucastcipher  (0008) : set   0       & get   1 int  
          ucastkeylen      (0009) : set   1 int   & get   0      
          get_ucastkeylen  (0009) : set   0       & get   1 int  
          keymgtalgs       (0015) : set   1 int   & get   0      
          get_keymgtalgs   (0015) : set   0       & get   1 int  
          rsncaps          (0016) : set   1 int   & get   0      
          get_rsncaps      (0016) : set   0       & get   1 int  
          hostroaming      (000C) : set   1 int   & get   0      
          get_hostroaming  (000C) : set   0       & get   1 int  
          privacy          (000D) : set   1 int   & get   0      
          get_privacy      (000D) : set   0       & get   1 int  
          countermeasures  (000E) : set   1 int   & get   0      
          get_countermeas  (000E) : set   0       & get   1 int  
          dropunencrypted  (000F) : set   1 int   & get   0      
          get_dropunencry  (000F) : set   0       & get   1 int  
          wpa              (000A) : set   1 int   & get   0      
          get_wpa          (000A) : set   0       & get   1 int  
          driver_caps      (0010) : set   1 int   & get   0      
          get_driver_caps  (0010) : set   0       & get   1 int  
          maccmd           (0011) : set   1 int   & get   0      
          wmm              (0012) : set   1 int   & get   0      
          get_wmm          (0012) : set   0       & get   1 int  
          hide_ssid        (0013) : set   1 int   & get   0      
          get_hide_ssid    (0013) : set   0       & get   1 int  
          ap_bridge        (0014) : set   1 int   & get   0      
          get_ap_bridge    (0014) : set   0       & get   1 int  
          inact            (0017) : set   1 int   & get   0      
          get_inact        (0017) : set   0       & get   1 int  
          inact_auth       (0018) : set   1 int   & get   0      
          get_inact_auth   (0018) : set   0       & get   1 int  
          inact_init       (0019) : set   1 int   & get   0      
          get_inact_init   (0019) : set   0       & get   1 int  
          abolt            (001A) : set   1 int   & get   0      
          get_abolt        (001A) : set   0       & get   1 int  
          dtim_period      (001C) : set   1 int   & get   0      
          get_dtim_period  (001C) : set   0       & get   1 int  
          bintval          (001D) : set   1 int   & get   0      
          get_bintval      (001D) : set   0       & get   1 int  
          bmiss_ms         (004A) : set   1 int   & get   0      
          get_bmiss_ms     (004A) : set   0       & get   1 int  
          bmiss            (0049) : set   1 int   & get   0      
          get_bmiss        (0049) : set   0       & get   1 int  
          doth             (001E) : set   1 int   & get   0      
          get_doth         (001E) : set   0       & get   1 int  
          doth_pwrtgt      (001F) : set   1 int   & get   0      
          get_doth_pwrtgt  (001F) : set   0       & get   1 int  
          doth_reassoc     (0020) : set   1 int   & get   0      
          doth_algo        (003F) : set   1 int   & get   0      
          get_doth_algo    (003F) : set   0       & get   1 int  
          doth_mincom      (0040) : set   1 int   & get   0      
          get_doth_mincom  (0040) : set   0       & get   1 int  
          doth_slcg        (0041) : set   1 int   & get   0      
          get_doth_slcg    (0041) : set   0       & get   1 int  
          doth_sldg        (0042) : set   1 int   & get   0      
          get_doth_sldg    (0042) : set   0       & get   1 int  
          txcont           (0043) : set   1 int   & get   0      
          get_txcont       (0043) : set   0       & get   1 int  
          txcontrate       (0044) : set   1 int   & get   0      
          get_txcontrate   (0044) : set   0       & get   1 int  
          txcontpower      (0045) : set   1 int   & get   0      
          get_txcontpower  (0045) : set   0       & get   1 int  
          dfstestmode      (0046) : set   1 int   & get   0      
          get_dfstestmode  (0046) : set   0       & get   1 int  
          dfscactime       (0047) : set   1 int   & get   0      
          get_dfscactime   (0047) : set   0       & get   1 int  
          dfsexcltim       (0048) : set   1 int   & get   0      
          get_dfsexcltim   (0048) : set   0       & get   1 int  
          compression      (0021) : set   1 int   & get   0      
          get_compression  (0021) : set   0       & get   1 int  
          ff               (0022) : set   1 int   & get   0      
          get_ff           (0022) : set   0       & get   1 int  
          turbo            (0001) : set   1 int   & get   0      
          get_turbo        (0001) : set   0       & get   1 int  
          xr               (0023) : set   1 int   & get   0      
          get_xr           (0023) : set   0       & get   1 int  
          burst            (0024) : set   1 int   & get   0      
          get_burst        (0024) : set   0       & get   1 int  
          doth_chanswitch  (8BE8) : set   2 int   & get   0      
          pureg            (0025) : set   1 int   & get   0      
          get_pureg        (0025) : set   0       & get   1 int  
          ar               (0026) : set   1 int   & get   0      
          get_ar           (0026) : set   0       & get   1 int  
          wds              (0027) : set   1 int   & get   0      
          get_wds          (0027) : set   0       & get   1 int  
          bgscan           (0028) : set   1 int   & get   0      
          get_bgscan       (0028) : set   0       & get   1 int  
          bgscanidle       (0029) : set   1 int   & get   0      
          get_bgscanidle   (0029) : set   0       & get   1 int  
          bgscanintvl      (002A) : set   1 int   & get   0      
          get_bgscanintvl  (002A) : set   0       & get   1 int  
          bgscanthr        (004F) : set   1 int   & get   0      
          get_bgscanthr    (004F) : set   0       & get   1 int  
          mcast_rate       (002B) : set   1 int   & get   0      
          get_mcast_rate   (002B) : set   0       & get   1 int  
          coverageclass    (002C) : set   1 int   & get   0      
          get_coveragecls  (002C) : set   0       & get   1 int  
          countryie        (002D) : set   1 int   & get   0      
          get_countryie    (002D) : set   0       & get   1 int  
          scanvalid        (002E) : set   1 int   & get   0      
          get_scanvalid    (002E) : set   0       & get   1 int  
          regclass         (003B) : set   1 int   & get   0      
          get_regclass     (003B) : set   0       & get   1 int  
          dropunenceapol   (003C) : set   1 int   & get   0      
          get_dropunencea  (003C) : set   0       & get   1 int  
          shpreamble       (003D) : set   1 int   & get   0      
          get_shpreamble   (003D) : set   0       & get   1 int  
          rssi11a          (002F) : set   1 int   & get   0      
          get_rssi11a      (002F) : set   0       & get   1 int  
          rssi11b          (0030) : set   1 int   & get   0      
          get_rssi11b      (0030) : set   0       & get   1 int  
          rssi11g          (0031) : set   1 int   & get   0      
          get_rssi11g      (0031) : set   0       & get   1 int  
          rate11a          (0032) : set   1 int   & get   0      
          get_rate11a      (0032) : set   0       & get   1 int  
          rate11b          (0033) : set   1 int   & get   0      
          get_rate11b      (0033) : set   0       & get   1 int  
          rate11g          (0034) : set   1 int   & get   0

I could also compile the Fonera's buildroot to work on the WGT (kernel 2.4.32). However, I had to fix all routines related to board and radio config to find the correct possition in the flash memory but I couldn't make the Marvell switch 88E6060 to work properly  in order to get LAN, WAN and possibly Vlan.

  All in all, It works but I still have an unstable router so I may change the SDRAM to a 256 mbits part to get rid of the paging fault since I don't have enough skills to shrink the kernel to overcome this problem (as the micro version of DD-WRT that I have in my WRT54G V5).

(Last edited by amsjow on 18 Dec 2008, 04:09)

I've been working on trying to get the latest trunk version to work on a modded wgt624v3 but I'm pretty stuck. The thing is I *had* it working perfectly after patching mvswitch.c a little. But now I'm not able to get it to work again after reflashing.

I have changed to flash prom to a M25P64.

I initially had problem to get the 88E6060 marvell switch to register it self but after changing a couple of lines in mvswitch.c i got it to be detected.

The problem is I can't ping or telnet the router via wired ethernet, looking at ifconfig eth0 seem not transmitting anything at all. Telnetting over wlan is working perfectly.

Any Ideas what the problem is? I've a feeling I've forgotten something.

br-lan    Link encap:Ethernet  HWaddr 00:14:6C:4C:F8:0D 
          inet addr:192.168.1.13  Bcast:192.168.1.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:40 errors:0 dropped:0 overruns:0 frame:0
          TX packets:44 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:13622 (13.3 KiB)  TX bytes:2208 (2.1 KiB)

eth0      Link encap:Ethernet  HWaddr 00:14:6C:4C:F8:0D 
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:50 errors:0 dropped:1 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:15574 (15.2 KiB)  TX bytes:0 (0.0 B)
          Interrupt:4 Base address:0x1000

lo        Link encap:Local Loopback 
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:49 errors:0 dropped:0 overruns:0 frame:0
          TX packets:49 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:4212 (4.1 KiB)  TX bytes:4212 (4.1 KiB)

wlan0     Link encap:Ethernet  HWaddr 00:14:6C:4C:F8:0C 
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:84 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:32
          RX bytes:0 (0.0 B)  TX bytes:18062 (17.6 KiB)


/etc/config/network

config interface loopback
        option ifname   lo
        option proto    static
        option ipaddr   127.0.0.1
        option netmask  255.0.0.0

config interface lan
        option ifname   eth0
        option type     bridge
        option proto    static
        option ipaddr   192.168.1.13
        option netmask  255.255.255.0
        option gateway  192.168.1.1
        option dns      8.8.8.8
#
#config switch eth0
#       option enable_vlan      1
#
#config switch_vlan
#       option device   eth0
#       option vlan     1
#       option ports    "0 1 2 3 4"




Index: target/linux/generic/files/drivers/net/phy/mvswitch.c
===================================================================
--- target/linux/generic/files/drivers/net/phy/mvswitch.c    (revision 34066)
+++ target/linux/generic/files/drivers/net/phy/mvswitch.c    (working copy)
@@ -32,7 +32,7 @@
 
 /* Undefine this to use trailer mode instead.
  * I don't know if header mode works with all chips */
-#define HEADER_MODE    1
+//#define HEADER_MODE    1
 
 MODULE_DESCRIPTION("Marvell 88E6060 Switch driver");
 MODULE_AUTHOR("Felix Fietkau");
@@ -380,7 +380,10 @@
 {
     u16 reg;
 
-    if (dev->addr != 0x10)
+//    if (dev->addr != 0x10)
+//        return 0;
+
+    if (dev->addr != 0x00)
         return 0;
 
     reg = dev->bus->read(dev->bus, MV_PORTREG(IDENT, 0)) & MV_IDENT_MASK;
akre wrote:

I've been working on trying to get the latest trunk version to work on a modded wgt624v3 but I'm pretty stuck. The thing is I *had* it working perfectly after patching mvswitch.c a little. But now I'm not able to get it to work again after reflashing.
...
The problem is I can't ping or telnet the router via wired ethernet, looking at ifconfig eth0 seem not transmitting anything at all. Telnetting over wlan is working perfectly.

Any Ideas what the problem is? I've a feeling I've forgotten something.

I have been playing around with a WGT 624 v2 and I ran into an issue similar to yours with the MV88E6060 switch.  In my case, the PHY driver for the Marvell switch was not being selected by the AR531X Ethernet driver.  I filed a ticket and submitted an initial patch to fix this problem, if you want to try it, see Ticket 13413.  Consider using the second "robust" patch.  Best of luck.

I have been running into trouble installing redboot on my WGT-624 v2.  I can run it from ram, but if I fis init, the FIS directory block is written over my board config data (which contains MAC addresses and other info).  I am trying to modify a redboot to place the FIS block in a different location.  Additionally, it appears that the WGT-624 v2 has two blocks of configuration data at the end of the flash, the first, penultimate block is the normal board configuration data, the second and final block appears to have information about wireless regulatory information or something related to the wireless.  I wonder if it is possible to shrink or combine these to recover the use of one more eraseblock.

I have been able to get Barrier Breaker to load from TFTP using both ram based Redboot and the VXWorks boot loader, and boot from a ramdisk and run, but I need to have some storage on the flash to store config files and extra packages.  I wanted to put  a modified microredboot which would load OpenWRT from tftp and then have an overlay for JFFS from ~1.5 MB of the flash remaining after redboot, and all the config blocks have been taken into account.  Unfortunately, I have been unable to get redboot to properly initialize my hardware when running from flash.  I have been unsuccessful with both AP43 and AP48 based redboot ROM images.  Do you have any pointers, or could you share your .ecc file and any patches you needed to get redboot working on your device?  I understand this may or may not work for me due to the hardware differences between the board revisions.

Hello,

I have been trying to get the combination of ar2313 and 88e6060 switch to work in a dlink di624 rev. 3c wireless router.
The suggested patch to force the mvswitch phy driver to attach instead of the generic one from Ticket 13413 was
helpful.
I did some further research on this, and found in drivers/phy/phy_device.c the function get_phy_device(...) interesting.
The phy_id is checked against 0x1fffffff in that place, and in that case, NULL is returned.

What about doing a further check in that function against phy_id == 0 ?

The modifications of the ar231x.c, as suggested in Ticket 13413 are not necessary, if the mdiobus scan doesn't
populate the phy table with a bunch of phy's with a phy_id of 0. If the zero phy's are not in the table,
the first real phy_id found is in my case 0x01410c87 at mdio address 0x10, which is the one from the real
88e6060 device.

Perhaps anybody cound answer the question, if it is allowed for a real phy to have a phy_id of zero, respectively
if there exist real phy's, which have a zero phy_id ?

Kind Regards,
Gerald

(Last edited by oe5han on 16 Sep 2014, 09:58)

The discussion might have continued from here.