Topic: rb450g (rb4xx) support status

Hi all!

I spent half the day reading the forums, but i am yet to find a clear answer about the status of the Mikrotik RouterBOARD 450G.

Does anyone know what is working and what isn't? Have the latest Mikrotik patches been applied to trunk, or have they already been accepted to the kernel?

I wouldn't mind improving the support for the 450G, but currently I don't know how well its supported.

So far i found the following links:
https://dev.openwrt.org/changeset/16754

Dunno how directly this is related to the 450G, but...
https://forum.openwrt.org/viewtopic.php?pid=97150#p97150

Anyway, any input would be greatly appreciated. My 450G should arrive soon, and i am interested in ordering many more if i can get it to work.

Re: rb450g (rb4xx) support status

Hi.

I have get my br450g just yesterday :-). I also had a lot of time reading this forum and google about this router. Today I have loaded  openwrt on this cruel device smile, just netboot not NAND yet. I'm afraid to touch NAND.

I applied patch for network adapter https://forum.openwrt.org/viewtopic.php?pid=95865#p95865 and patch for NAND from that thread of phorum (but I have not tried to use NAND yet). I get first port (eth0) working ... I have pings, vlans and so on. Eth1 is connected to the switch wich does not work yet in openwrt sad. I did not find any patches to get switch to work some how. I suspect that eth1 is working but switch is not configured and it blocks all packets from/to eth1.

So I think status of support rb450g by openwrt is very partial -- only eth0 can work and no other ports.

Also I'm looking for some HOWTO about restoring NAND from openwrt back to RouterOS. I don't know how to make backup of routerOS and get it back to NAND. Does anyone know the link on some HOWTO ?

Re: rb450g (rb4xx) support status

To restore RouterOS, you can use the serial console of RouterBOOT.
Start NetInstall (http://www.mikrotik.com/download/netinstall-4.3.zip) on your windows PC and connect your Routerboard using the ethernet cable and the serial null-modem cable.
Now power on the Routeborad, and press "S" in serial console to enter setup. Set boot device to network, save & reboot.
Once the Routerboard have booted from the PC running NetInstall, on your PC chose the device from the target list, chose the NPK file to write (http://www.mikrotik.com/download.html) and click the "Install" button to write RouterOS to NAND.
Reboot the Routerboard, enter RouterBOOT setup and set NAND as boot device. Save & reboot.

wink

Re: rb450g (rb4xx) support status

AraKs wrote:

To restore RouterOS, you can use the serial console of RouterBOOT.
Start NetInstall (http://www.mikrotik.com/download/netinstall-4.3.zip) on your windows PC and connect your Routerboard using the ethernet cable and the serial null-modem cable.
Now power on the Routeborad, and press "S" in serial console to enter setup. Set boot device to network, save & reboot.
Once the Routerboard have booted from the PC running NetInstall, on your PC chose the device from the target list, chose the NPK file to write (http://www.mikrotik.com/download.html) and click the "Install" button to write RouterOS to NAND.
Reboot the Routerboard, enter RouterBOOT setup and set NAND as boot device. Save & reboot.

wink

I think that the router must be netbooted with special soft and this soft should format NAND and place RouterOS on it, am I right ?

netinstall-4.3.zip contains "exe" file for windows is there any way to use linux for recovery ? I have no windows smile.

I am new in RouterOS and I don't know how activate license key on it. What should I do after recovering RouterOS ? Is it described in RouterOS docs ?

In any case thank You AraKs ! smile

Re: rb450g (rb4xx) support status

If i remember right, Mikrotik NetInstall is windows-only... =/
Anyway, the license should be stored into the RouterBOOT, so once you re-install RouterOS the old license is recovered!

Bye
Mattia

Re: rb450g (rb4xx) support status

@Warm: Were you using trunk or 8.09.1?

I'm gonna try to build the latest trunk today, and see what kind of information i can provide.

Re: rb450g (rb4xx) support status

russo. wrote:

@Warm: Were you using trunk or 8.09.1?

I'm gonna try to build the latest trunk today, and see what kind of information i can provide.

I used trunk:

KAMIKAZE (bleeding edge, r18617)

Re: rb450g (rb4xx) support status

I got a reply today from mikrotik, they sent me a patch for the 2.6.27.39 kernel. Now its a question of howto update that patch against the 2.6 that openwrt runs.

Although I've applied many kernel patches before, i have never tried applying a patch to a different kernel version than the one the patch is for. I can host the patch if anyone wants to have it as well. Does anyone have any recommendations on how to do this? I will only have time to experiment on the weekend, unfortunately.

On another note, @mikrotik_com on twitter sent me this very nice link explaining the switches of some RouteBoards, including the rb450g.

Here's the link: http://wiki.mikrotik.com/wiki/Switch_Chip_Features

Re: rb450g (rb4xx) support status

post patch somewhere to get it

Re: rb450g (rb4xx) support status

zulus wrote:

post patch somewhere to get it

I think this patch is like this one:

http://www.nexlab.it/index.php/2009/04/14/routerboard-450g-and-linux-part-2/

It is a kernel patch no tool for configuring the switch. I did not tried to apply this patch.

11 (edited by russo. 2009-12-07 22:46:12)

Re: rb450g (rb4xx) support status

warm wrote:

It is a kernel patch no tool for configuring the switch. I did not tried to apply this patch.

I'm not entirely sure how the switch works, but i'm pretty sure the switch configuration via swconfig (i.e. like it was on the rb450) isn't entirely possible in this case because the switch uses an atheros switch and not an IPC one.

Anyway here is the patch and the mips.config they sent me (I'm not really sure why i need the .config)

http://nedos.net/stuff/linux-2.6.27.39.patch.gz
http://nedos.net/stuff/mips.config

Edit: rephrase/typo

Re: rb450g (rb4xx) support status

This is just kernel patch .. no module for 8316 switch
But this is the first patch that i see  from microtik with support for RB750/750G

Re: rb450g (rb4xx) support status

Eeeehhhh ... not usable cruel device yet with one interface only. Need switch with vlan support + this "one-eyed" router to make several interfaces working by vlans sad.

Is any way to make build-in switch to work some how ? Just like unmanaged switch -- only path though packets ... no vlan just only frorward all frames like usual unmanaged switch does ...

For example dlink dir-615 C1 has some switch. Openwrt dos not support vlans or other managment off this switch as I know but it works! Usually devices of this class have switches with vlan support.

Re: rb450g (rb4xx) support status

I took a deeper look at the problem. The problem is in fact the switch configuration, and so it is infact an swconfig problem. Someone needs to write the ar8316 swconfig driver, my guess is that it is very similar to the ar8216, which openwrt already supports. I wrote Atheros today, so we'll see what happens. Hopefully they'll send me some useful information on how to implement the switch.

Re: rb450g (rb4xx) support status

i finally got around to seting up a tftp daemon and compiling trunk for the routerboard (r18765). I [bold]couldn't[/bold] get any sort of network up. Could someone explain the configuration they did? I have a bunch of vlan switches so i could get away with just setting up a lot of vlans on the one interface that works smile however it doesn't work for me now.

Anyway i tried removing the bridge over eth0 with brctl and then bringing up eth0 and trying to ping some hosts connected through a switch, but it didn't work.

I really wouldn't mind working on the support, i'm still waiting for some info about how the ar8316 is configured though and about how different it is from the 8216.

Re: rb450g (rb4xx) support status

Russo, look at:
https://forum.openwrt.org/viewtopic.php?pid=97665
We have success: eth0 work in giga.
The next step to work: config the ar8316 switch.

Re: rb450g (rb4xx) support status

mtadeu, thanks smile i for some reason thought that that patch was already in trunk... I'll try it tomorrow smile

Re: rb450g (rb4xx) support status

So i got trunk running now, with the one gige patch my first ethernet is also working. Unfortunately i'm getting some MTD errors, does anyone have any idea on what i can do to fix them?

root@OpenWrt:/# mount /dev/mtdblock1 /tmp/1
end_request: I/O error, dev mtdblock1, sector 0
SQUASHFS error: squashfs_read_data failed to read block 0x0
SQUASHFS error: unable to read squashfs_super_block
yaffs: dev is 32505857 name is "mtdblock1"
yaffs: passed flags ""
yaffs: Attempting MTD mount on 31.1, "mtdblock1"
yaffs: auto selecting yaffs2
block 1 is bad
block 2 is bad
block 3 is bad
block 4 is bad
block 5 is bad
block 6 is bad
block 7 is bad
block 8 is bad
block 9 is bad
block 10 is bad
block 11 is bad
block 12 is bad
yaffs_read_super: isCheckpointed 0

Re: rb450g (rb4xx) support status

And also dmesg shows this:

Bad eraseblock 0 at 0x000000000000
Bad eraseblock 1 at 0x000000040000
Bad eraseblock 2 at 0x000000080000
Bad eraseblock 3 at 0x0000000c0000
Bad eraseblock 4 at 0x000000100000
Bad eraseblock 5 at 0x000000140000
Bad eraseblock 6 at 0x000000180000
Bad eraseblock 7 at 0x0000001c0000
Bad eraseblock 8 at 0x000000200000
Bad eraseblock 9 at 0x000000240000
...

20 (edited by russo. 2009-12-13 21:49:44)

Re: rb450g (rb4xx) support status

Okay status update. After reading a bit longer, i figured out i should format my nand to get rid of the eraseblock errors. I had to apply to patches to get everything working, they're essentially from this thread https://forum.openwrt.org/viewtopic.php?id=19714

But here are the patches to save anyone here time:

This one patches the size of the mtd partitions, so that you can more or less be sure that your kenrel fits:

diff --git a/linux-2.6.30.10/drivers/mtd/nand/rb4xx_nand.c b/linux-2.6.30.10/drivers/mtd/nand/rb4xx_nand.c
index 5087794..950ca15 100644
--- a/linux-2.6.30.10/drivers/mtd/nand/rb4xx_nand.c
+++ b/linux-2.6.30.10/drivers/mtd/nand/rb4xx_nand.c
@@ -92,7 +92,7 @@ static struct mtd_partition rb4xx_nand_partitions[] = {
        {
                .name   = "kernel",
                .offset = (256 * 1024),
-               .size   = (4 * 1024 * 1024) - (256 * 1024),
+               .size   = (10 * 1024 * 1024) - (256 * 1024),
        },
        {
                .name   = "rootfs",

this one patches the gigabit and afterwards eth0 will work (while booting from tftp, described below):

diff --git a/linux-2.6.30.10/arch/mips/ar71xx/mach-rb-4xx.c b/linux-2.6.30.10/arch/mips/ar71xx/mach-rb-4xx.c
index a8e97c3..f7a9969 100644
--- a/linux-2.6.30.10/arch/mips/ar71xx/mach-rb-4xx.c
+++ b/linux-2.6.30.10/arch/mips/ar71xx/mach-rb-4xx.c
@@ -238,12 +238,12 @@ static void __init rb450_generic_setup(int gige)
 
        ar71xx_add_device_mdio(0xffffffe0);
 
-       ar71xx_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_MII;
+       ar71xx_eth0_data.phy_if_mode = (gige) ? PHY_INTERFACE_MODE_RGMII : PHY_INTERFACE_MODE_MII;
        ar71xx_eth0_data.phy_mask = 0x0000000f;
        ar71xx_eth0_data.speed = (gige) ? SPEED_1000 : SPEED_100;
        ar71xx_eth0_data.duplex = DUPLEX_FULL;
 
-       ar71xx_eth1_data.phy_if_mode = PHY_INTERFACE_MODE_RMII;
+       ar71xx_eth1_data.phy_if_mode = (gige) ? PHY_INTERFACE_MODE_RGMII : PHY_INTERFACE_MODE_RMII;
        ar71xx_eth1_data.phy_mask = 0x00000010;
 
        ar71xx_add_device_eth(1);

CAVEAT: one really big caveat is that at the moment eth0 WILL ONLY work when you tftpboot the image. I'm not sure why, but i'm writing mikrotik's support right now.

Hope this helps someone.

EDIT: oh and one more thing, to install to flash, format the nand in bios, then create a tgz image and put openwrt-ar71xx-rootfs.tgz and openwrt-ar71xx-vmlinux.elf onto a web/ftp server. Then simply install with wget2nand http://yourserver/path/to/files

21 (edited by mtadeu 2009-12-14 03:23:50)

Re: rb450g (rb4xx) support status

Russo: great. you are fast!
See that board:
http://www.unex.com.tw/product/rnra-83
The rnra-83 use the ar8316 and run Linux
Maybe the Unex guys can help us.

Re: rb450g (rb4xx) support status

okay, i now also wrote the unex guys. I'm currently waiting for a reply from unex, ubiquiti, mikrotik and of course atheros...

23 (edited by yadmin 2009-12-14 17:54:59)

Re: rb450g (rb4xx) support status

root@OpenWrt:/# cat /proc/mtd
dev:    size   erasesize  name
mtd0: 00040000 00040000 "booter"
mtd1: 003c0000 00040000 "kernel"
mtd2: 1fc00000 00040000 "rootfs"
root@OpenWrt:/# mount -t yaffs2 -o ro /dev/mtdblock1 /mnt
yaffs: dev is 32505857 name is "mtdblock1"
yaffs: passed flags ""
yaffs: Attempting MTD mount on 31.1, "mtdblock1"
block 1 is bad
block 2 is bad
block 3 is bad
block 4 is bad
block 5 is bad
block 6 is bad
block 7 is bad
block 8 is bad
block 9 is bad
block 10 is bad
block 11 is bad
block 12 is bad
yaffs_read_super: isCheckpointed 0
root@OpenWrt:/#
root@OpenWrt:/# uname -a
Linux OpenWrt 2.6.28.10 #1 Mon Dec 14 07:43:26 CST 2009 mips unknown
root@OpenWrt:/# ------------[ cut here ]------------
WARNING: at net/sched/sch_generic.c:226 ()
NETDEV WATCHDOG: eth1 (ag71xx): transmit timed out
Modules linked in: gpio_buttons nf_nat_tftp nf_conntrack_tftp nf_nat_irc nf_conntrack_irc nf_nat_ftp nf_conntrack_ftp ipt_MASQUERADE iptable_nat nf_nat xt_NOTRACK iptable_raw xt_state nf_conntrack_ipv4 nf_defrag_ipv4 nf_conntrack ipt_REJECT xt_TCPMSS ipt_LOG xt_multiport xt_mac xt_limit iptable_mangle iptable_filter ip_tables xt_tcpudp x_tables ppp_async ppp_generic slhc input_polldev crc_ccitt input_core
Call Trace:[<8007b270>] 0x8007b270
[<8006ea50>] 0x8006ea50
[<8006ea50>] 0x8006ea50
[<8007a38c>] 0x8007a38c
[<8009ffa0>] 0x8009ffa0
[<80095644>] 0x80095644
[<8008f034>] 0x8008f034
[<800a1754>] 0x800a1754
[<8015687c>] 0x8015687c
[<80092a74>] 0x80092a74
[<80092adc>] 0x80092adc
[<8009962c>] 0x8009962c
[<80075b54>] 0x80075b54
[<801b1348>] 0x801b1348
[<801c4374>] 0x801c4374
[<80218890>] 0x80218890
[<80217408>] 0x80217408
[<802188b8>] 0x802188b8
[<801c4210>] 0x801c4210
[<800840b8>] 0x800840b8
[<8009ffa0>] 0x8009ffa0
[<800a30b8>] 0x800a30b8
[<8007f43c>] 0x8007f43c
[<800a1754>] 0x800a1754
[<8006b47c>] 0x8006b47c
[<8007f528>] 0x8007f528
[<8006082c>] 0x8006082c
[<8008eb9c>] 0x8008eb9c
[<80060a00>] 0x80060a00
[<8006b600>] 0x8006b600
[<80060a20>] 0x80060a20

---[ end trace 4168ef53734910dc ]---
eth1: link down
eth1: link up (1000Mbps/Full duplex)

Re: rb450g (rb4xx) support status

yadmin, applying the network patch got rid of the netdev error for me. The bad blocks can be fixed by formating your nand from bios.

Re: rb450g (rb4xx) support status

did someone find way how to install openwrt on nand  with networking working ?