OpenWrt Forum Archive

Topic: How to add another four LAN port for WR703N?

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

I'v got a board with five ethernet port, AR9331 as CPU.

but when I execute 'make menuconfig' ,it seems have no other board to choose which supports four LAN port.

such like WR740Nv5, it doese have five wired ports, but I can't find it in openwrt.(actually, it only have v1 and v3, no v5.)

how could I generate an firmware which support 4LAN+1WAN ?

any help or advice will be appreciated..thanks alot!!

(Last edited by 9crk on 10 Feb 2014, 15:50)

had I described myself clear? I'm not quiet good at English....

anyone know how to figure this out?

AR9331 have only two real ports. One of them have integrated 4 port switch( +1 port for CPU).

neryba wrote:

AR9331 have only two real ports. One of them have integrated 4 port switch( +1 port for CPU).

How to use the switch ?

here is one example how dmesg indicate the switch.

eth0: Atheros AG71xx at 0xb9000000, irq 4, mode:MII
ag71xx ag71xx.0 eth0: connected to PHY at ag71xx-mdio.1:04 [uid=004dd041, driver=Generic PHY]
eth1: Atheros AG71xx at 0xba000000, irq 5, mode:GMII
eth1: Found an AR7240/AR9330 built-in switch

all 4 ports working like one eth1. if you plan use every port separately you need to create vlans and configure switch port to own vlan. By default all ports in VLAN0 (or VLAN1 depend on OpenWRT version). http://wiki.openwrt.org/doc/uci/network/switch

neryba wrote:

here is one example how dmesg indicate the switch.

eth0: Atheros AG71xx at 0xb9000000, irq 4, mode:MII
ag71xx ag71xx.0 eth0: connected to PHY at ag71xx-mdio.1:04 [uid=004dd041, driver=Generic PHY]
eth1: Atheros AG71xx at 0xba000000, irq 5, mode:GMII
eth1: Found an AR7240/AR9330 built-in switch

all 4 ports working like one eth1. if you plan use every port separately you need to create vlans and configure switch port to own vlan. By default all ports in VLAN0 (or VLAN1 depend on OpenWRT version). http://wiki.openwrt.org/doc/uci/network/switch


I can't find this information in mine

[ 0.000000] Linux version 3.3.8 (zhouhua@zlgmcu) (gcc version 4.6.3 20120201 (prerelease) (Linaro GCC 4.6-2012.02) ) #8 Tue Feb 11 16:42:30 CST 2014
[ 0.000000] bootconsole [early0] enabled
[ 0.000000] CPU revision is: 00019374 (MIPS 24Kc)
[ 0.000000] SoC: Atheros AR9330 rev 1
[ 0.000000] Clocks: CPU:400.000MHz, DDR:400.000MHz, AHB:200.000MHz, Ref:25.000MHz
[ 0.000000] Determined physical RAM map:
[ 0.000000] memory: 04000000 @ 00000000 (usable)
[ 0.000000] Initrd not found or empty - disabling initrd
[ 0.000000] Zone PFN ranges:
[ 0.000000] Normal 0x00000000 -> 0x00004000
[ 0.000000] Movable zone start PFN for each node
[ 0.000000] Early memory PFN ranges
[ 0.000000] 0: 0x00000000 -> 0x00004000
[ 0.000000] Built 1 zonelists in Zone order, mobility grouping on. Total pages: 16256
[ 0.000000] Kernel command line: board=TL-WR703N console=ttyATH0,115200 rootfstype=squashfs,jffs2 noinitrd
[ 0.000000] PID hash table entries: 256 (order: -2, 1024 bytes)
[ 0.000000] Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
[ 0.000000] Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
[ 0.000000] Primary instruction cache 64kB, VIPT, 4-way, linesize 32 bytes.
[ 0.000000] Primary data cache 32kB, 4-way, VIPT, cache aliases, linesize 32 bytes
[ 0.000000] Writing ErrCtl register=00000000
[ 0.000000] Readback ErrCtl register=00000000
[ 0.000000] Memory: 61620k/65536k available (2103k kernel code, 3916k reserved, 401k data, 208k init, 0k highmem)
[ 0.000000] SLUB: Genslabs=9, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[ 0.000000] NR_IRQS:51
[ 0.000000] Calibrating delay loop... 265.42 BogoMIPS (lpj=1327104)
[ 0.080000] pid_max: default: 32768 minimum: 301
[ 0.080000] Mount-cache hash table entries: 512
[ 0.090000] NET: Registered protocol family 16
[ 0.090000] gpiochip_add: registered GPIOs 0 to 29 on device: ath79
[ 0.100000] MIPS: machine is TP-LINK TL-WR703N v1
[ 0.350000] bio: create slab <bio-0> at 0
[ 0.360000] Switching to clocksource MIPS
[ 0.360000] NET: Registered protocol family 2
[ 0.370000] IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.370000] TCP established hash table entries: 2048 (order: 2, 16384 bytes)
[ 0.370000] TCP bind hash table entries: 2048 (order: 1, 8192 bytes)
[ 0.380000] TCP: Hash tables configured (established 2048 bind 2048)
[ 0.390000] TCP reno registered
[ 0.390000] UDP hash table entries: 256 (order: 0, 4096 bytes)
[ 0.400000] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[ 0.400000] NET: Registered protocol family 1
[ 0.430000] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[ 0.430000] JFFS2 version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[ 0.440000] msgmni has been set to 120
[ 0.440000] io scheduler noop registered
[ 0.450000] io scheduler deadline registered (default)
[ 0.450000] Serial: 8250/16550 driver, 1 ports, IRQ sharing disabled
[ 0.460000] ar933x-uart: ttyATH0 at MMIO 0x18020000 (irq = 11) is a AR933X UART
[ 0.470000] console [ttyATH0] enabled, bootconsole disabled
[ 0.470000] console [ttyATH0] enabled, bootconsole disabled
[ 0.480000] m25p80 spi0.0: found mx25l6405d, expected m25p80
[ 0.480000] m25p80 spi0.0: mx25l6405d (8192 Kbytes)
[ 0.490000] 5 tp-link partitions found on MTD device spi0.0
[ 0.500000] Creating 5 MTD partitions on "spi0.0":
[ 0.500000] 0x000000000000-0x000000020000 : "u-boot"
[ 0.510000] 0x000000020000-0x0000000fff20 : "kernel"
[ 0.510000] mtd: partition "kernel" must either start or end on erase block boundary or be smaller than an erase block -- forcing read-only
[ 0.520000] 0x0000000fff20-0x0000007f0000 : "rootfs"
[ 0.530000] mtd: partition "rootfs" must either start or end on erase block boundary or be smaller than an erase block -- forcing read-only
[ 0.540000] mtd: partition "rootfs" set to be root filesystem
[ 0.550000] mtd: partition "rootfs_data" created automatically, ofs=6A0000, len=150000
[ 0.560000] 0x0000006a0000-0x0000007f0000 : "rootfs_data"
[ 0.560000] 0x0000007f0000-0x000000800000 : "art"
[ 0.570000] 0x000000020000-0x0000007f0000 : "firmware"
[ 0.590000] ag71xx_mdio: probed
[ 0.600000] eth0: Atheros AG71xx at 0xb9000000, irq 4
[ 1.150000] ag71xx ag71xx.0: eth0: connected to PHY at ag71xx-mdio.1:04 [uid=004dd041, driver=Generic PHY]
[ 1.160000] TCP cubic registered
[ 1.160000] NET: Registered protocol family 17
[ 1.170000] 8021q: 802.1Q VLAN Support ~1.8
[ 1.170000] VFS: Mounted root (squashfs filesystem) readonly on device 31:2.
[ 1.180000] Freeing unused kernel memory: 208k freed
- preinit -
Press the [f] key and hit [enter] to enter failsafe mode
- regular preinit -
jffs2 not ready yet; using ramdisk
- init -
[ 9.110000] Compat-drivers backport release: compat-drivers-2012-09-04-2-gddac993
[ 9.110000] Backport based on wireless-testing.git master-2012-09-07
[ 9.120000] compat.git: wireless-testing.git
[ 9.320000] cfg80211: Calling CRDA to update world regulatory domain
[ 9.320000] cfg80211: World regulatory domain updated:
[ 9.330000] cfg80211: (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
[ 9.330000] cfg80211: (2402000 KHz - 2472000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[ 9.340000] cfg80211: (2457000 KHz - 2482000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)
[ 9.350000] cfg80211: (2474000 KHz - 2494000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)
[ 9.360000] cfg80211: (5170000 KHz - 5250000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[ 9.360000] cfg80211: (5735000 KHz - 5835000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[ 9.630000] NET: Registered protocol family 10
[ 10.310000] cfg80211: World regulatory domain updated:
[ 10.310000] cfg80211: (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
[ 10.320000] cfg80211: (2402000 KHz - 2472000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[ 10.330000] cfg80211: (2457000 KHz - 2482000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)
[ 10.340000] cfg80211: (2474000 KHz - 2494000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)
[ 10.340000] cfg80211: (5170000 KHz - 5250000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[ 10.350000] cfg80211: (5735000 KHz - 5835000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[ 10.490000] SCSI subsystem initialized
[ 10.670000] usbcore: registered new interface driver usbfs
[ 10.680000] usbcore: registered new interface driver hub
[ 10.680000] usbcore: registered new device driver usb
[ 11.370000] ieee80211 phy0: Atheros AR9330 Rev:1 mem=0xb8100000, irq=2
[ 11.370000] cfg80211: Calling CRDA for country: US
[ 11.380000] cfg80211: Regulatory domain changed to country: US
[ 11.380000] cfg80211: (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
[ 11.390000] cfg80211: (2402000 KHz - 2472000 KHz @ 40000 KHz), (300 mBi, 2700 mBm)
[ 11.400000] cfg80211: (5170000 KHz - 5250000 KHz @ 40000 KHz), (300 mBi, 1700 mBm)
[ 11.410000] cfg80211: (5250000 KHz - 5330000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[ 11.420000] cfg80211: (5490000 KHz - 5600000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[ 11.420000] cfg80211: (5650000 KHz - 5710000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[ 11.430000] cfg80211: (5735000 KHz - 5835000 KHz @ 40000 KHz), (300 mBi, 3000 mBm)
[ 11.450000] Button Hotplug driver version 0.4.1
[ 11.530000] tun: Universal TUN/TAP device driver, 1.6
[ 11.530000] tun: (C) 1999-2004 Max Krasnyansky <maxk@qualcomm.com>
Failed to set regulatory domain: -1
[ 11.680000] IPv6 over IPv4 tunneling driver
[ 12.020000] ip_tables: (C) 2000-2006 Netfilter Core Team
[ 12.410000] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[ 12.410000] ehci-platform ehci-platform: Generic Platform EHCI Controller
[ 12.420000] ehci-platform ehci-platform: new USB bus registered, assigned bus number 1
[ 12.450000] ehci-platform ehci-platform: irq 3, io mem 0x1b000000
[ 12.470000] ehci-platform ehci-platform: USB 2.0 started, EHCI 1.00
[ 12.470000] hub 1-0:1.0: USB hub found
[ 12.470000] hub 1-0:1.0: 1 port detected
[ 12.500000] nf_conntrack version 0.5.0 (966 buckets, 3864 max)
[ 13.070000] xt_time: kernel timezone is -0000
[ 13.290000] ip6_tables: (C) 2000-2006 Netfilter Core Team
[ 13.530000] NF_TPROXY: Transparent proxy support initialized, version 4.1.0
[ 13.530000] NF_TPROXY: Copyright (c) 2006-2007 BalaBit IT Ltd.
[ 13.870000] usbcore: registered new interface driver cdc_acm
[ 13.880000] cdc_acm: USB Abstract Control Model driver for USB modems and ISDN adapters
[ 13.990000] usbcore: registered new interface driver usbserial
[ 13.990000] USB Serial support registered for generic
[ 14.000000] usbcore: registered new interface driver usbserial_generic
[ 14.000000] usbserial: USB Serial Driver core
[ 14.140000] Initializing USB Mass Storage driver...
[ 14.140000] usbcore: registered new interface driver usb-storage
[ 14.150000] USB Mass Storage support registered.
[ 14.260000] Error: Driver 'gpio-keys-polled' is already registered, aborting...
[ 14.290000] USB Serial support registered for FTDI USB Serial Device
[ 14.300000] usbcore: registered new interface driver ftdi_sio
[ 14.300000] ftdi_sio: v1.6.0:USB FTDI Serial Converters Driver

Please press Enter to activate this console. [ 18.390000] ADDRCONF(NETDEV_UP): eth0: link is not ready
[ 19.840000] ADDRCONF(NETDEV_UP): eth0: link is not ready
[ 19.840000] device eth0 entered promiscuous mode
[ 19.850000] ADDRCONF(NETDEV_UP): br-lan: link is not ready
[ 46.580000] jffs2_scan_eraseblock(): End of filesystem marker found at 0x0
[ 46.600000] jffs2_build_filesystem(): unlocking the mtd device... done.
[ 46.600000] jffs2_build_filesystem(): erasing all blocks after the end marker... done.
[ 54.630000] JFFS2 notice: (1404) jffs2_build_xattr_subsystem: complete building xattr subsystem, 0 of xdatum (0 unchecked, 0 orphan) and 0 of xref (0 dead, 0 orphan) found.

I'v fix it! it's my fault...I didn't execute "make clean" after I modified the source code...
now it works ..thanks neryba..

The discussion might have continued from here.