I’ve spent some time trying to port OpenWrt to my Netgear FVS338 FW/router (Intel Xscale based), and by now it actually boots OpenWrt! smile
But I'm having trouble getting the wan-port and the lan-switch to work. (And there is not much use in a fw/router without working Ethernet is there?)

For the WAN-port I get the following error:
eth1: PHY[0] unresponsive
eth1: link down

I think the reason is because I don’t know the correct phy_id to use to communicate with the Altima AC101LKQ 10/100 PTY.
Does anyone know how I can find out what phy_id to use?
Or do I need to add some code for the AC101 pty to get it to work?

For the LAN-switch I can actually connect to the network using the first port, but the switch in itself is not working.
Any hints on how to get the 8-port Broadcom BCM5337M switch working?


Using base address 0x01600000 and length 0x000de888
Uncompressing Linux.............................................................. done, booting the kernel.
Linux version 2.6.21.6 (magnus@helan.home.se) (gcc version 4.1.2) #3 Thu Dec 13 17:11:51 CET 2007
CPU: XScale-IXP42x Family [690541f1] revision 1 (ARMv5TE), cr=000039ff
Machine: Netgear FVS338
Memory policy: ECC disabled, Data cache writeback
CPU0: D VIVT undefined 5 cache
CPU0: I cache: 32768 bytes, associativity 32, 32 byte lines, 32 sets
CPU0: D cache: 32768 bytes, associativity 32, 32 byte lines, 32 sets
Built 1 zonelists.  Total pages: 8128
Kernel command line: root=/dev/mtdblock2 rootfstype=squashfs,jffs2 noinitrd console=ttyS0,115200 init=/etc/preinit
PID hash table entries: 128 (order: 7, 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: 30488KB available (1716K code, 167K data, 72K init)
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
NET: Registered protocol family 16
IXP4xx: Using 16MiB expansion bus window size
NET: Registered protocol family 2
Time: OSTS clocksource has been installed.
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
NetWinder Floating Point Emulator V0.97 (double precision)
squashfs: version 3.0 (2006/03/15) Phillip Lougher
Registering mini_fo version $Id$
JFFS2 version 2.2. (NAND) (SUMMARY)  (C) 2001-2006 Red Hat, Inc.
io scheduler noop registered
io scheduler deadline registered (default)
IXP4xx Watchdog Timer: heartbeat 60 sec
Serial: 8250/16550 driver $Revision: 1.90 $ 2 ports, IRQ sharing disabled
serial8250.0: ttyS0 at MMIO 0xc8001000 (irq = 13) is a XScale
IXP4XX Q Manager 0.2.1 initialized.
IXP4XX NPE driver Version 0.3.0 initialized
ixp4xx_crypto 0.0.1 registered successfully
IXP4XX-Flash.0: Found 1 x16 devices at 0x0 in 16-bit bank
 Intel/Sharp Extended Query Table at 0x0031
Using buffer write method
cfi_cmdset_0001: Erase suspend on write enabled
Searching for RedBoot partition table in IXP4XX-Flash.0 at offset 0xfe0000
9 RedBoot partitions found on MTD device IXP4XX-Flash.0
Creating 9 MTD partitions on "IXP4XX-Flash.0":
0x00000000-0x00040000 : "RedBoot"
0x00040000-0x00140000 : "kernel"
0x00140000-0x00480000 : "rootfs"
mtd: partition "rootfs" set to be root filesystem
mtd: partition "rootfs_data" created automatically, ofs=220000, len=260000 
0x00220000-0x00480000 : "rootfs_data"
0x00480000-0x007a0000 : "unallocated"
0x007a0000-0x007c0000 : "microcode"
npe: searching for firmware...
npe: found at 0x0, IXP425/NPE-B func: 00, rev: 2.1, size: 11964, id: 01000201
Image loaded to NPE-B Func:0, Rel: 2:1, Status: 80800000
npe: found at 0x2ebc, IXP425/NPE-C func: 00, rev: 2.1, size: 11964, id: 02000201
Image loaded to NPE-C Func:0, Rel: 2:1, Status: 80c00000
0x007c0000-0x00f40000 : "appimg2"
0x00f40000-0x00fc0000 : "igwpri"
0x00fc0000-0x00fc1000 : "RedBoot config"
0x00fe0000-0x01000000 : "FIS directory"
nf_conntrack version 0.5.0 (256 buckets, 2048 max)
ip_tables: (C) 2000-2006 Netfilter Core Team
TCP westwood registered
NET: Registered protocol family 1
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>
XScale DSP coprocessor detected.
ixp4xx_mac driver 0.3.1: eth0 on NPE-B with PHY[-1] initialized
ixp4xx_mac driver 0.3.1: eth1 on NPE-C with PHY[0] initialized
VFS: Mounted root (squashfs filesystem) readonly.
Freeing init memory: 72K
Warning: unable to open an initial console.
- preinit -
switching to jffs2
mini_fo: using base directory: /
mini_fo: using storage directory: /jffs
- init -

Please press Enter to activate this console. wlan: 0.8.4.2 (svn r2834)
ath_hal: module license 'Proprietary' taints kernel.
ath_hal: 0.9.30.13 (AR5210, AR5211, AR5212, AR5416, RF5111, RF5112, RF2413, RF5413, RF2133, REGOPS_FUNC)
ath_rate_minstrel: Minstrel automatic rate control algorithm 1.2 (svn r2834)
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_pci: 0.9.4.5 (svn r2834)



BusyBox v1.8.1 (2007-12-11 15:52:33 CET) 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, r9599) -------------------
  * 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:/# ifconfig -a
eth0      Link encap:Ethernet  HWaddr B2:85:97:C5:02:FF  
          inet addr:192.168.1.9  Bcast:192.168.1.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:8 errors:0 dropped:0 overruns:0 frame:0
          TX packets:2 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:100 
          RX bytes:1063 (1.0 KiB)  TX bytes:652 (652.0 B)

eth1      Link encap:Ethernet  HWaddr 12:63:59:08:B7:02  
          BROADCAST 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:100 
          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)

root@OpenWrt:/# ping 192.168.1.2
PING 192.168.1.2 (192.168.1.2): 56 data bytes
64 bytes from 192.168.1.2: seq=0 ttl=64 time=4.204 ms
64 bytes from 192.168.1.2: seq=1 ttl=64 time=0.505 ms

--- 192.168.1.2 ping statistics ---
2 packets transmitted, 2 packets received, 0% packet loss
round-trip min/avg/max = 0.505/2.354/4.204 ms
root@OpenWrt:/#

root@OpenWrt:/# ifconfig eth1 192.168.2.10 up
eth1: PHY[0] unresponsive
eth1: link down
root@OpenWrt:/# ping 192.168.2.1
PING 192.168.2.1 (192.168.2.1): 56 data bytes

--- 192.168.2.1 ping statistics ---
7 packets transmitted, 0 packets received, 100% packet loss
root@OpenWrt:/#

PS.
Never mind the MAC-addresses, I know they are completely bogus but that’s a later issue that I think I know how to solve. smile