OpenWrt Forum Archive

Topic: RB450 - using Five Ethernet Ports

The content of this topic has been archived between 6 Feb 2018 and 6 May 2018. Unfortunately there are posts – most likely complete pages – missing.

This thread seems to go from A to Z with all kinds of patches and lots of talk of conflicting patches.

Is there a how-to guide to get OpenWRT on an RB450? Or should I start from the beginning of this thread and just apply all the patches and things people speak of throughout this thread?

Thanks!

Look at the first post of this thread for info on the RB450.  By following those directions you will end up with a router that has all 5 ports combined.

The rest of the thread is about the IP175C switch (i.e. separating the 5 ports to not be part of the same network). If you are going to try to follow it, you can look at the third page.
My webpage at http://inst.eecs.berkeley.edu/~pathorn/ip175c/ describes how to patch openwrt 8.09 RC1 to support the switch driver.  Try to follow them and if you get stuck, post in the forum.

Would also be nice to get this info up on the wiki so users don't have to hunt through the forum (although Google does a pretty good job at searching the openwrt forum)

@robrob, I haven't updated the patches yet for 2.6.27 or later.  I'll try and put those up once I upgrade my router (have been busy lately). Sadly, I do not know how to get them formally into openwrt, aside from pestering the main developers... and considering how quickly the supposedly 2008 release has been going, they are probably overworked.

edison-nts wrote:

First, I like to collaborate, posting information , step by step , how to make a RB450 ready to use w/ kamikaze.
----
1) chose a Binary distribuiton, or compile your image.
1a ) http://downloads.openwrt.org/snapshots/ar71xx/
( ready to use kernel , from openwrt.org )

On that page there are several binaries. How do I know which one is the right one for the rb450?

openwrt-ar71xx-dir-615c1-squashfs.bin   
openwrt-ar71xx-tew-632brp-squashfs.bin   
openwrt-ar71xx-tew-652brp-squashfs.bin 
openwrt-ar71xx-uImage-gzip.bin 
openwrt-ar71xx-uImage-lzma.bin
openwrt-ar71xx-ubnt-rs-squashfs.bin 
openwrt-ar71xx-vmlinux.bin               

Is there a page that describes what each of these are so I could assess which is the right one for me to use?

Thanks!

hello guys .... i applied the patch, got it compiled .... but i really couldnt understand the config of /etc/config/network.

on the posted config from some users, i have ports from 0 to 5 ... which would give 6 ports

uci set network.0.vlan1="0 1 2 3 5*t"
uci set network.0.vlan2="4 5t"

config 'switch' '0'
        option 'vlan2' '3 4t 5t'
        option 'vlan3' '2 4t 5t'
        option 'vlan4' '1 4t 5t'
        option 'vlan5' '0 4t 5t'

RB450, thus, have only 5 ethernets. So i think the 0 or the 5 should be some special thing ...... but i really couldnt get the logic behind that config.

well ....... i would like to have 2 interfaces, one being attached to 2 ports and the other interface attached to 3 ports. Bridging can be used to acchieve that, no problem at all. Can someone help me with this simple config ?

(Last edited by leonardogyn on 26 Jan 2009, 22:36)

The "0" referring to the switch is a reference to the name of the MDIO bus. In the Linux kernel, for some reason beyond my understanding, the "name" of a MDIO bus is a number starting at 0 and increasing.
You can look at "/sys/class/mdio_bus" to see which available buses there are.

Port 5 always refers to the CPU port (A switch built into a router is actually a separate 6-port switch with one of the 6 ports hardwired into the NIC (or CPU). This is the reason that you natively only see one NIC, and why you need to specially communicate with the switch driver about which ports to use.

Note that the UCI commands and editing the config file are separate things and redundant (if you add config 'switch' 'eth0' into /etc/config/network, you do not want to type the "uci set" commands. And vice versa. The only difference with uci is that your changes will be reverted if you do not commit them afterwards.

I will post both the uci versions and the config file versions.

In your case, since you want 2 ports in one and 3 ports in the other, this is how you set it up:

config 'switch' '0'
        option 'vlan1' '3 4 5t'
        option 'vlan2' '0 1 2 5t'

config 'interface' 'wan'
        option 'proto' 'static'
        option 'ipaddr' '10.2.1.1'
        option 'netmask' '255.255.255.0'
        option 'ifname' 'eth0.1'

config 'interface' 'lan'
        option 'proto' 'static'
        option 'ipaddr' '192.168.1.1'
        option 'netmask' '255.255.255.0'
        option 'ifname' 'eth0.2'

Note that depending on how you set it up, network port 4 may actually be physically disconnected from the switch and instead will show up as "eth1" (while the switch is eth0) or show up as eth0 (while switched ports are at eth1). I do not have a RB450 so I don't know which it is.

So you may need to replace all eth0.1 with eth1.1, or you may need to divide up the switch ports differently (or combine them in a software bridge) if one of the ports is physically disconnected from the others.

The UCI commands are:

uci set network.0=switch
uci set network.0.vlan1='3 4 5t'
uci set network.0.vlan2='0 1 2 5t'

uci set network.wan=interface
uci set network.wan.proto=static
uci set network.wan.ipaddr=10.2.1.1
uci set network.wan.netmask=255.255.255.0
uci set network.wan.ifname=eth0.1

uci set network.lan=interface
uci set network.lan.proto=static
uci set network.lan.ipaddr=192.168.1.1
uci set network.lan.netmask=255.255.255.0
uci set network.lan.ifname=eth0.2

Either way, to test you can do "/etc/init.d/network restart" and if you use UCI commands, once the configuration works, you should do "uci commit" which will write the changes into the /etc/config/network file.

The way I have this configuration set up, the ports 0,1,2,cpu and 3,4,cpu are bridged by hardware--that is, firewall rules will not be run if #0 sends a packet directly to #2.

However, if you would like to bridge them (which takes more CPU), you can do as the example above:

config 'switch' '0'
        option 'vlan1' '4 5t'
        option 'vlan2' '3 5t'
        option 'vlan3' '2 5t'
        option 'vlan4' '1 5t'
        option 'vlan5' '0 5t'

And then for any of the networks you want bridged, use "config type bridge" and use 'ifnames' instead of 'ifname', like this:

config 'interface' 'wan'
        option 'type' 'bridge'
        option 'proto' 'static'
        option 'ipaddr' '10.2.1.1'
        option 'netmask' '255.255.255.0'
        option 'ifname' 'eth0.4 eth0.5'

config 'interface' 'lan'
        option 'type' 'bridge'
        option 'proto' 'static'
        option 'ipaddr' '192.168.1.1'
        option 'netmask' '255.255.255.0'
        option 'ifname' 'eth0.1 eth0.2 eth0.3'

Do not be confused by the numbering vlan1-vlan5 and eth0.1-eth0.5. The IP175C spec says that you cannot use VLAN 0 for anything other than QOS tagging, so I use 1-5 instead of 0-4. If it makes things easier, you can add 10, and use vlans 10,11,12,13,14 to represent ports 0-4.

Hope this helps clarify

EDIT: fixed to use ifname (II figured the plural was if you have more than one based on some post I read)

(Last edited by phorn on 28 Jan 2009, 09:07)

Patrick, thanks again for all the great info.

(bump) Seems like my question got passed over so I'll reiterate:

edison-nts wrote:

First, I like to collaborate, posting information , step by step , how to make a RB450 ready to use w/ kamikaze.
----
1) chose a Binary distribuiton, or compile your image.
1a ) http://downloads.openwrt.org/snapshots/ar71xx/
( ready to use kernel , from openwrt.org )

On that page there are several binaries. How do I know which one is the right one for the rb450?

openwrt-ar71xx-dir-615c1-squashfs.bin   
openwrt-ar71xx-tew-632brp-squashfs.bin   
openwrt-ar71xx-tew-652brp-squashfs.bin 
openwrt-ar71xx-uImage-gzip.bin 
openwrt-ar71xx-uImage-lzma.bin
openwrt-ar71xx-ubnt-rs-squashfs.bin 
openwrt-ar71xx-vmlinux.bin               

Is there a page that describes what each of these are so I could assess which is the right one to use?

Thanks!

On that page there are several binaries. How do I know which one is the right one for the rb450?

for RB450 you'll basically need only these 2 files:

openwrt-ar71xx-vmlinux.elf
openwrt-ar71xx-rootfs.tgz


the .elf is the one that you'll do the netboot, so this is the one you'll put in your TFTP server and configure your DHCP/BOOTP server for throwing it to RB450.

the two files will also be needed on some HTTP/FTP tree, so when the RB450 is netbooted, you can use the wget2nand script to install OpenWRT on RB450 NAND (flash) memory.

the other files are for other AR71xx based equipments, you can securely ignore them.

phorn wrote:

Hope this helps clarify

hope this helps ?!?!?! Are you kidding ??? I'm feeling like a RB450 switch master configurator right now smile This was basically the best explanation ever i could have had on the subject smile

thank you very much for the amazing explanation on the subject.

phorn wrote:

And then for any of the networks you want bridged, use "config type bridge" and use 'ifnames' instead of 'ifname', like this:

Patrick, i couldnt get the configuration working with ifnameS .... instead, it worked just fine with ifname (without S)

My config is:

config 'switch' '0'
        option 'vlan1' '4 5t'
        option 'vlan2' '3 5t'
        option 'vlan3' '2 5t'
        option 'vlan4' '1 5t'
        option 'vlan5' '0 5t'

config 'interface' 'wan'
        option 'type' 'bridge'
        option 'proto' 'static'
        option 'ipaddr' '172.16.0.15'
        option 'netmask' '255.255.255.0'
        option 'ifname' 'eth0 eth1.2'

config 'interface' 'lan'
        option 'type' 'bridge'
        option 'proto' 'static'
        option 'ipaddr' '192.168.1.1'
        option 'netmask' '255.255.255.0'
        option 'ifname' 'eth1.3 eth1.4 eth1.5'

which results in: (some lines cropped)

root@OpenWrt:/etc/config# ifconfig

br-lan    Link encap:Ethernet  HWaddr 00:0C:42:2E:D9:79  
          inet addr:192.168.1.1  Bcast:192.168.1.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

br-wan    Link encap:Ethernet  HWaddr 00:0C:42:2E:D9:78  
          inet addr:172.16.0.15  Bcast:172.16.0.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

eth0      Link encap:Ethernet  HWaddr 00:0C:42:2E:D9:78  
          UP BROADCAST MULTICAST  MTU:1500  Metric:1

eth1      Link encap:Ethernet  HWaddr 00:0C:42:2E:D9:79  
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

eth1.2    Link encap:Ethernet  HWaddr 00:0C:42:2E:D9:79  
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

eth1.3    Link encap:Ethernet  HWaddr 00:0C:42:2E:D9:79  
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

eth1.4    Link encap:Ethernet  HWaddr 00:0C:42:2E:D9:79  
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

eth1.5    Link encap:Ethernet  HWaddr 00:0C:42:2E:D9:79  
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

and

root@OpenWrt:/etc/config# brctl show
bridge name     bridge id               STP enabled     interfaces
br-lan          8000.000c422ed979       no              eth1.3
                                                        eth1.4
                                                        eth1.5
br-wan          8000.000c422ed978       no              eth0
                                                        eth1.2
root@OpenWrt:/etc/config#

anyway, it works just fine with this detail of using ifname instead of ifnameS.


Thank you very much again for your idiot-proof explanation on the subject smile

(Last edited by leonardogyn on 27 Jan 2009, 14:38)

Cool to see you have it working.
Any reason you chose to do the bridging in software rather than hardware?  I suppose it does give you more flexability

I am asking because my cheap atheros chip can hardly handle 25Mbit/s in software before maxing out the cpu. Though I figure ar71xx is a lot faster.

phorn ....... these RB450s are going to be used as SOHO routers on DSL lines with 2-4Mbit downstream max, so there's absolutely no chance i'll hit CPU problems with that.

anyway, i'll try to do some testings on RB450 throughput with and without bridged interface and will post it here.

about the bridge ....... it's simply because i'm used to work with bridged interfaces, so i prefeer to keep that smile

leonardogyn wrote:

for RB450 you'll basically need only these 2 files:

openwrt-ar71xx-vmlinux.elf
openwrt-ar71xx-rootfs.tgz

Awesome, many thanks!

Patrick,

I've done some RouterBoard reconfiguring and now have a an 802.11n card in my RB493AH. My problem is if I use the 2.6.26 kernel for your ipc175 patch I can't use ath9k. I would like to try to port your patch to 2.6.28. Could you outline the basics of what needs to be done? Earlier you wrote that a couple of other patches would have to be moved up to 2.6.28 too. Is that still true with the 2.6.28.3?

Again, thanks for all the help,

Rob

Hi all,

I was just wondering if there is a plan to support the 450G? It's basically a faster version of the 450 with gigabit ethernet instead of 10/100. I purchased one recently and I am using the built-in RouterOS, but I don't mind helping out with adding support for it to OpenWRT.

Thanks.

Support for the 450G will come down to which gig switch it has. Unless Mikrotik used a common gig switch chip it probably won't get supported. I can't use OpenWRT on my RB493 because the IPC178 switch chip isn't supported.

Hi all again!

I´ve been successfully using patch v3 over SVN 13191 for a while on a RB450.

Lately, we had some porblems, with the router hanging really hard... after some inspection, we discovered it is related with really high softirq usage. At approx 6Mbps of traffic (involving 4 ports in the swith, each on a different vlan), the router becomes unresponsive, with 100% proc used by softirqs.

Any advise on how this could be solved??

TIA!

edison-nts wrote:

----
Configure a DHCP / TFTP server to send this
image to router board
-- dhcp.conf --
....
next-server 192.168.200.2;
filename "openwrt-ar71xx-vmlinux.elf";
....

I've done this, and I'm able to start the netboot process but it fails to completely boot. Here's the output:


RouterBOOT booter 2.14



RouterBoard 450



CPU frequency: 300 MHz

  Memory size:  32 MB



Press any key within 2 seconds to enter setup..

trying bootp protocol... OK

Got IP address: 192.168.24.81

resolved mac address 00:0C:29:D9:DF:8D

Gateway: 192.168.24.1

transfer started ................. transfer ok, time=2.21s

setting up elf image... OK

jumping to kernel code

Linux version 2.6.26.5 (nbd@baustelle) (gcc version 4.1.2) #22 Sat Feb 14 22:40:51 CET 2009

console [early0] enabled

CPU revision is: 00019374 (MIPS 24K)

Determined physical RAM map:

 memory: 02000000 @ 00000000 (usable)

Initrd not found or empty - disabling initrd

Zone PFN ranges:

  Normal          0 ->     8192

Movable zone start PFN for each node

early_node_map[1] active PFN ranges

    0:        0 ->     8192

Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 8128

Kernel command line: root=/dev/mtdblock2 rootfstype=squashfs,yaffs,jffs2 noinitrd console=ttyS0,115200 init=/etc/preinit

Primary instruction cache 64kB, VIPT, 4-way, linesize 32 bytes.

Primary data cache 32kB, 4-way, VIPT, cache aliases, linesize 32 bytes

Writing ErrCtl register=0007fff0

Readback ErrCtl register=0007fff0

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: 29740k/32768k available (1814k kernel code, 3028k reserved, 316k data, 124k 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: 644 bytes

NET: Registered protocol family 16

MIPS: machine is MikroTik RouterBOARD 450

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

NET: Registered protocol family 1

squashfs: version 3.0 (2006/03/15) Phillip Lougher

Registering mini_fo version $Id$

JFFS2 version 2.2. (NAND) (SUMMARY)  © 2001-2006 Red Hat, Inc.

yaffs Jan  4 2009 21:38:31 Installing. 

msgmni has been set to 58

io scheduler noop registered

io scheduler deadline registered (default)

Serial: 8250/16550 driver $Revision: 1.90 $ 1 ports, IRQ sharing disabled

serial8250.0: ttyS0 at MMIO 0x18020000 (irq = 11) is a 16550A

console handover: boot [early0] -> real [ttyS0]

ag71xx_mdio: probed

eth0: Atheros AG71xx at 0xba000000, irq 5

eth1: Atheros AG71xx at 0xb9000000, irq 4

NAND flash driver for RouterBoard 4xx series version 0.1.10

NAND SPI clock 25000 kHz (AHB 150000 kHz / 6)

FLASH SPI clock 25000 kHz (AHB 150000 kHz / 6)

NAND device: Manufacturer ID: 0xad, Chip ID: 0x76 (Hynix NAND 64MiB 3,3V 8-bit)

Scanning device for bad blocks

Creating 3 MTD partitions on "NAND 64MiB 3,3V 8-bit":

0x00000000-0x00040000 : "booter"

0x00040000-0x00400000 : "kernel"

0x00400000-0x04000000 : "rootfs"

mtd: partition "rootfs" set to be root filesystem

split_squashfs: error occured while reading from "NAND 64MiB 3,3V 8-bit"

Atheros AR71xx SPI Controller driver version 0.2.2

Atheros AR71xx hardware watchdog driver version 0.1.0

Registered led device: rb4xx:yellow:user

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>

yaffs: dev is 32505858 name is "mtdblock2"

yaffs: passed flags ""

yaffs: Attempting MTD mount on 31.2, "mtdblock2"

VFS: Mounted root (yaffs filesystem) readonly.

Freeing unused kernel memory: 124k freed

Failed to execute /etc/preinit.  Attempting defaults...

init Algorithmics/MIPS FPU Emulator v1.5

started

Starting...

mount: Mounting /dev/mtdblock0 on /boot failed: Permission denied

modprobe: could not parse modules.dep



modprobe: could not parse modules.dep



modprobe: could not parse modules.dep



modprobe: could not parse modules.dep



/etc/rc.d/run.d/S02logring: 10: cannot create /dev/log241: No such device or address

/etc/rc.d/run.d/S02panic: 2: cannot create /dev/log241: No such device or address

Jan  1 00:00:08 localhost syslog.info syslogd started: BusyBox v1.00 (2008.03.20-10:28+0000)

Jan  1 00:00:08 localhost user.notice kernel: klogd started: BusyBox v1.00 (2008.03.20-10:28+0000)

Jan  1 00:00:08 localhost user.notice kernel: Linux version 2.6.26.5 (nbd@baustelle) (gcc version 4.1.2) #22 Sat Feb 14 22:40:51 CET 2009

Jan  1 00:00:08 localhost user.debug kernel: prom: fw_arg0=00000007, fw_arg1=a0861c00, fw_arg2=00000000, fw_arg3=00000000

Jan  1 00:00:08 localhost user.debug kernel: MyLoader: sysp=ffffffff, boardp=ffffffff, parts=ffffffff

Jan  1 00:00:08 localhost user.info kernel: console [early0] enabled

Jan  1 00:00:08 localhost user.info kernel: CPU revision is: 00019374 (MIPS 24K)

Jan  1 00:00:08 localhost user.warn kernel: Determined physical RAM map:

Jan  1 00:00:08 localhost user.warn kernel:  memory: 02000000 @ 00000000 (usable)

Jan  1 00:00:08 localhost user.debug kernel: Entering add_active_range(0, 0, 8192) 0 entries of 256 used

Jan  1 00:00:08 localhost user.info kernel: Initrd not found or empty - disabling initrd

Jan  1 00:00:08 localhost user.warn kernel: Zone PFN ranges:

Jan  1 00:00:08 localhost user.warn kernel:   Normal          0 ->     8192

Jan  1 00:00:08 localhost user.warn kernel: Movable zone start PFN for each node

Jan  1 00:00:08 localhost user.warn kernel: early_node_map[1] active PFN ranges

Jan  1 00:00:08 localhost user.warn kernel:     0:        0 ->     8192

Jan  1 00:00:08 localhost user.debug kernel: On node 0 totalpages: 8192

Jan  1 00:00:08 localhost user.debug kernel:   Normal zone: 64 pages used for memmap

Jan  1 00:00:08 localhost user.debug kernel:   Normal zone: 0 pages reserved

Jan  1 00:00:08 localhost user.debug kernel:   Normal zone: 8128 pages, LIFO batch:0

Jan  1 00:00:08 localhost user.debug kernel:   Movable zone: 0 pages used for memmap

Jan  1 00:00:08 localhost user.warn kernel: Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 8128

Jan  1 00:00:08 localhost user.notice kernel: Kernel command line: root=/dev/mtdblock2 rootfstype=squashfs,yaffs,jffs2 noinitrd console=ttyS0,115200 init=/etc/preinit

Jan  1 00:00:08 localhost user.warn kernel: Primary instruction cache 64kB, VIPT, 4-way, linesize 32 bytes.

Jan  1 00:00:08 localhost user.warn kernel: Primary data cache 32kB, 4-way, VIPT, cache aliases, linesize 32 bytes

Jan  1 00:00:08 localhost user.info kernel: Writing ErrCtl register=0007fff0

Jan  1 00:00:08 localhost user.info kernel: Readback ErrCtl register=0007fff0

Jan  1 00:00:08 localhost user.warn kernel: PID hash table entries: 128 (order: 7, 512 bytes)

Jan  1 00:00:08 localhost user.info kernel: Dentry cache hash table entries: 4096 (order: 2, 16384 bytes)

Jan  1 00:00:08 localhost user.info kernel: Inode-cache hash table entries: 2048 (order: 1, 8192 bytes)

Jan  1 00:00:08 localhost user.info kernel: Memory: 29740k/32768k available (1814k kernel code, 3028k reserved, 316k data, 124k init, 0k highmem)

Jan  1 00:00:08 localhost user.info kernel: SLUB: Genslabs=6, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1

Jan  1 00:00:08 localhost user.debug kernel: Calibrating delay loop... 199.88 BogoMIPS (lpj=999424)

Jan  1 00:00:08 localhost user.warn kernel: Mount-cache hash table entries: 512

Jan  1 00:00:08 localhost user.info kernel: net_namespace: 644 bytes

Jan  1 00:00:08 localhost user.info kernel: NET: Registered protocol family 16

Jan  1 00:00:08 localhost user.info kernel: MIPS: machine is MikroTik RouterBOARD 450

Jan  1 00:00:08 localhost user.info kernel: NET: Registered protocol family 2

Jan  1 00:00:08 localhost user.debug kernel: Switched to high resolution mode on CPU 0

Jan  1 00:00:08 localhost user.info kernel: IP route cache hash table entries: 1024 (order: 0, 4096 bytes)

Jan  1 00:00:08 localhost user.info kernel: TCP established hash table entries: 1024 (order: 1, 8192 bytes)

Jan  1 00:00:08 localhost user.info kernel: TCP bind hash table entries: 1024 (order: 0, 4096 bytes)

Jan  1 00:00:08 localhost user.info kernel: TCP: Hash tables configured (established 1024 bind 1024)

Jan  1 00:00:08 localhost user.info kernel: TCP reno registered

Jan  1 00:00:08 localhost user.info kernel: NET: Registered protocol family 1

Jan  1 00:00:08 localhost user.info kernel: squashfs: version 3.0 (2006/03/15) Phillip Lougher

Jan  1 00:00:08Jan  1 00:00:08 /etc/rc.d/run.d/S06mipsdog: 2: cannot create /dev/log241: No such device or address

Jan  1 00:00:08 localhost user.info kernel: Serial: 8250/16Jan  1 00:00:08 Jan  1 00:00:08 Jan  1 00:00:08 Jan  1 00:00:08 Jan  1 00:00:08 Jan  1 00:00:08 localhost user.debug kernel: ar71xx-wdt: timeoutJan  1 00:00:08 Jan  1 00:00:08 Jan  1 00:00:08 modprobe: could not parse modules.dep



modprobe: could not parse modules.dep



modprobe: could not parse modules.dep



modprobe: could not parse modules.dep



modprobe: could not parse modules.dep



modprobe: could not parse modules.dep



modprobe: could not parse modules.dep



/etc/rc.d/run.d/S08softdog: 3: cannot create /dev/log241: No such device or address

Starting services...

/etc/rc.d/run.d/S10nova: 22: cannot create /dev/log1: No such device or address



Fatal internal error occurred!

Please reinstall the router.



connect failed (errno=2)






Shutting down...


Stopping services...


connect failed (errno=2)

Jan  1 00:00:08 localhost syslog.info System log daemon exiting.

/etc/rc.d/run.d/C95panic: 2: cannot create /dev/log241: No such device or address

umount: /boot: Invalid argument

System halted.

Looking at the serial console output I see a few errors during bootup. I've trimmed out everything from my previous post to illustrate only the errors (listed below). I followed the steps on the first page to get OpenWRT booting on the rb450 using openwrt-ar71xx-vmlinux.elf (version 8.09 of kamikaze), so why would I be getting these errors? (See my previous post for the entire boot output)

Initrd not found or empty - disabling initrd

split_squashfs: error occured while reading from "NAND 64MiB 3,3V 8-bit"

Failed to execute /etc/preinit.  Attempting defaults...

mount: Mounting /dev/mtdblock0 on /boot failed: Permission denied

modprobe: could not parse modules.dep
modprobe: could not parse modules.dep
modprobe: could not parse modules.dep
modprobe: could not parse modules.dep

/etc/rc.d/run.d/S02logring: 10: cannot create /dev/log241: No such device or address
/etc/rc.d/run.d/S02panic: 2: cannot create /dev/log241: No such device or address

Jan  1 00:00:08 localhost user.info kernel: Initrd not found or empty - disabling initrd

Jan  1 00:00:08Jan  1 00:00:08 /etc/rc.d/run.d/S06mipsdog: 2: cannot create /dev/log241: No such device or address

Jan  1 00:00:08 localhost user.info kernel: Serial: 8250/16Jan  1 00:00:08 Jan  1 00:00:08 Jan  1 00:00:08 Jan  1 00:00:08 Jan  1 00:00:08 Jan  1 00:00:08 localhost user.debug kernel: ar71xx-wdt: timeoutJan  1 00:00:08 Jan  1 00:00:08 Jan  1 00:00:08 modprobe: could not parse modules.dep

modprobe: could not parse modules.dep
modprobe: could not parse modules.dep
modprobe: could not parse modules.dep
modprobe: could not parse modules.dep
modprobe: could not parse modules.dep
modprobe: could not parse modules.dep

/etc/rc.d/run.d/S08softdog: 3: cannot create /dev/log241: No such device or address
Starting services...
/etc/rc.d/run.d/S10nova: 22: cannot create /dev/log1: No such device or address

Fatal internal error occurred!
Please reinstall the router.

connect failed (errno=2)

Shutting down...
Stopping services...

connect failed (errno=2)

/etc/rc.d/run.d/C95panic: 2: cannot create /dev/log241: No such device or address

umount: /boot: Invalid argument

System halted.
l337ing disorder wrote:
edison-nts wrote:

----
Configure a DHCP / TFTP server to send this
image to router board
-- dhcp.conf --
....
next-server 192.168.200.2;
filename "openwrt-ar71xx-vmlinux.elf";
....

I've done this, and I'm able to start the netboot process but it fails to completely boot. Here's the output:

I didn't actually put in the "next-server 192.168.200.2" line, as we're not using the 192.168.200.0/24 subnet, in case that helps anyone figure out why I'm getting all these weird errors.

It appears that nbd has added the IC+ switch support to SVN trunk, and it is nicely integrated into phylib, meaning that it should work for every platform with one of these switches.  You should only have to enable "swconfig" in the kernel configuration under Base System.

Currently the switch is only enabled by default on atheros. If you do not use that architecture (not sure what the rb uses), then you will have to change your kernel configuration to include CONFIG_PHYLIB and CONFIG_PHY_IP175C:

To do this, go to target/linux/MYPLATFORM/config-2.6.28 and add these lines:

CONFIG_IP175C_PHY=y
CONFIG_PHYLIB=y

Hi, I'm trying an openwrt trunk on a mikrotik RB450 board which comes with a IP175C ethernet switch.
I followed your instructions at http://inst.eecs.berkeley.edu/~pathorn/ip175c/ and I added
the two options CONFIG_IP175C_PHY=y and CONFIG_PHYLIB=y to target/linux/ar71xx/config-2.6.28
but unfortunately the kernel doesn't detect the IP175C (reading from dmesg) and my vlan setup doesn't work.
Any hints?

Could you paste the exact line from dmesg? It should be near the top, around where it also mentions loading the NIC driver.

You may also need to look for CONFIG_ICPLUS_PHY and make sure it is disabled, since it might conflict with the new driver.

The only print statement in nbd's new driver says:
"ip175c: Found an unknown IC+ switch with model number %02Xh."
And then I would be interested in the model number it prints.

phorn wrote:

Could you paste the exact line from dmesg? It should be near the top, around where it also mentions loading the NIC driver.

You may also need to look for CONFIG_ICPLUS_PHY and make sure it is disabled, since it might conflict with the new driver.

The only print statement in nbd's new driver says:
"ip175c: Found an unknown IC+ switch with model number %02Xh."
And then I would be interested in the model number it prints.

There's no such line at all, this is my dmesg:

Linux version 2.6.28.9 (lorenzo@voyager) (gcc version 4.1.2) #6 Mon May 4 11:249
prom: fw_arg0=00000007, fw_arg1=a0861c00, fw_arg2=00000000, fw_arg3=00000000    
MyLoader: sysp=fefcfff0, boardp=77f8f9f3, parts=fafeb6f3                        
console [early0] enabled                                                        
CPU revision is: 00019374 (MIPS 24Kc)                                           
Atheros AR7130 rev 2 (id:0xa8), CPU:300.000 MHz, AHB:150.000 MHz, DDR:300.000 Mz
Determined physical RAM map:                                                    
 memory: 02000000 @ 00000000 (usable)                                           
Initrd not found or empty - disabling initrd                                    
Zone PFN ranges:                                                                
  Normal   0x00000000 -> 0x00002000                                             
Movable zone start PFN for each node                                            
early_node_map[1] active PFN ranges                                             
    0: 0x00000000 -> 0x00002000                                                 
On node 0 totalpages: 8192                                                      
free_area_init_node: node 0, pgdat 8027dc30, node_mem_map 81000000              
  Normal zone: 64 pages used for memmap                                         
  Normal zone: 0 pages reserved                                                 
  Normal zone: 8128 pages, LIFO batch:0                                         
  Movable zone: 0 pages used for memmap                                         
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 8128       
Kernel command line: rootfstype=squashfs,yaffs,jffs2 noinitrd console=ttyS0,115t
Primary instruction cache 64kB, VIPT, 4-way, linesize 32 bytes.                 
Primary data cache 32kB, 4-way, VIPT, cache aliases, linesize 32 bytes          
Writing ErrCtl register=0003e210                                                
Readback ErrCtl register=0003e210                                               
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: 29680k/32768k available (1841k kernel code, 3088k reserved, 333k data, )
SLUB: Genslabs=6, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1          
Calibrating delay loop... 199.88 BogoMIPS (lpj=999424)                          
Mount-cache hash table entries: 512                                             
net_namespace: 708 bytes                                                        
NET: Registered protocol family 16                                              
MIPS: machine is MikroTik RouterBOARD 450                                       
NET: Registered protocol family 2                                               
Switched to high resolution mode on CPU 0                                       
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                                                             
NET: Registered protocol family 1                                               
squashfs: version 3.0 (2006/03/15) Phillip Lougher                              
Registering mini_fo version $Id$                                                
JFFS2 version 2.2. (NAND) (SUMMARY)  ?© 2001-2006 Red Hat, Inc.                 
yaffs May  4 2009 10:22:54 Installing.                                          
msgmni has been set to 57                                                       
io scheduler noop registered                                                    
io scheduler deadline registered (default)                                      
Serial: 8250/16550 driver1 ports, IRQ sharing disabled                          
serial8250.0: ttyS0 at MMIO 0x18020000 (irq = 11) is a 16550A                   
console handover: boot [early0] -> real [ttyS0]                                 
ag71xx_mdio: probed                                                             
eth0: Atheros AG71xx at 0xba000000, irq 5                                       
eth0: connected to PHY at 0:04 [uid=02430d80, driver=Generic PHY]               
eth1: Atheros AG71xx at 0xb9000000, irq 4                                       
eth1: connected to 4 PHYs                                                       
NAND flash driver for RouterBoard 4xx series version 0.1.10                     
NAND SPI clock 25000 kHz (AHB 150000 kHz / 6)                                   
FLASH SPI clock 25000 kHz (AHB 150000 kHz / 6)                                  
NAND device: Manufacturer ID: 0xad, Chip ID: 0x76 (Hynix NAND 64MiB 3,3V 8-bit) 
Scanning device for bad blocks                                                  
Bad eraseblock 490 at 0x007a8000                                                
Bad eraseblock 2582 at 0x02858000                                               
Bad eraseblock 3355 at 0x0346c000                                               
Creating 3 MTD partitions on "NAND 64MiB 3,3V 8-bit":                           
0x00000000-0x00040000 : "booter"                                                
0x00040000-0x00400000 : "kernel"                                                
0x00400000-0x04000000 : "rootfs"                                                
mtd: partition "rootfs" set to be root filesystem                               
split_squashfs: no squashfs found in "NAND 64MiB 3,3V 8-bit"                    
Atheros AR71xx SPI Controller driver version 0.2.2                              
Atheros AR71xx hardware watchdog driver version 0.1.0                           
ar71xx-wdt: timeout=15 secs (max=28)                                            
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>                            
yaffs: dev is 32505858 name is "mtdblock2"                                      
yaffs: passed flags ""                                                          
yaffs: Attempting MTD mount on 31.2, "mtdblock2"                                
yaffs: block 234 is marked bad                                                  
block 235 is bad                                                                
yaffs: block 2326 is marked bad                                                 
block 2327 is bad                                                               
yaffs: block 3099 is marked bad                                                 
block 3100 is bad                                                               
yaffs_read_super: isCheckpointed 0                                              
VFS: Mounted root (yaffs filesystem) readonly.                                  
Freeing unused kernel memory: 136k freed                                        
Please be patient, while OpenWrt loads ...                                      
Algorithmics/MIPS FPU Emulator v1.5                                             
save exit: isCheckpointed 0                                                     
ar71xx: pll_reg 0xb8050010: 0x1099                                              
eth1: link up (100Mbps/Full duplex)                                             
NET: Registered protocol family 10                                              
lo: Disabled Privacy Extensions                                                 
ADDRCONF(NETDEV_UP): eth0: link is not ready                                    
tun: Universal TUN/TAP device driver, 1.6                                       
tun: (C) 1999-2004 Max Krasnyansky <maxk@qualcomm.com>                          
ip_tables: (C) 2000-2006 Netfilter Core Team                                    
ar71xx: pll_reg 0xb8050014: 0x1099                                              
eth0: link up (100Mbps/Full duplex)                                             
ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready                               
nf_conntrack version 0.5.0 (512 buckets, 2048 max)                              
CONFIG_NF_CT_ACCT is deprecated and will be removed soon. Please use            
nf_conntrack.acct=1 kernel paramater, acct=1 nf_conntrack module option or      
sysctl net.netfilter.nf_conntrack_acct=1 to enable it.                          
IMQ driver loaded successfully.                                                 
        Hooking IMQ before NAT on PREROUTING.                                   
        Hooking IMQ after NAT on POSTROUTING.                                   
u32 classifier                                                                  
    Performance counters on                                                     
    input device check on                                                       
    Actions configured

my kernel config has CONFIG_IP175C_PHY=y CONFIG_PHYLIB=y CONFIG_SWCONFIG=y and CONFIG_ICPLUS_PHY is disabled

I don't have the /proc/switch subdir, is it normal?
Do I have to compile package/switch for my architecture (ar71xx) to get the switch_core module?
How do I set my vlans?

Thank you,