OpenWrt Forum Archive

Topic: rb450g (rb4xx) support status

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

I boot successfully from net and flash nand, but when I boot from nand it says:

load kernel from nand... OK
setting up elf image...

and stays there forever. So there must be some driver in my kernel that is causing issues.  I guess I have to start at nothing and add one module at a time until I figure out what it is.

Arrrrgggh ;-)

After I flash now it says "jumping to kernel code" and locks up.  Geez.

Looks like mtdblock1 is only about 1.5MB and my build kernel is about 2.6MB. There isn't any way to resize the MTD partitions with the bootloader (like you can with RedBoot utilities).

So I have to figure out a way.

Check this out:

Creating 3 MTD partitions on "NAND 1GiB 3,3V 8-bit":                                                                                   
0x000000000000-0x000000040000 : "booter"                                           
0x000000040000-0x000000400000 : "kernel"                                         
0x000000400000-0x000040000000 : "rootfs"

So OpenWrt thinks that it is a 1GB flash.  "kernel" is actually about 4MB.  And it says that "rootfs" is the rest of the 1GB.

Does anybody else see this on their board?

This was built with yesterday's trunk.

Ok the NAND patch is not yet in the trunk.  My entire project is flashed and loaded.  I'm probably missing other patches as well.

A learning experience.  If wget2nand doesn't have enough room to copy the kernel, it just stops without an error.  I didn't discover the problem until I went to copy manually.

The NAND I have on RB450G reports as NAND device: Manufacturer ID: 0xad, Chip ID: 0xd3 (Hynix NAND 1GiB 3,3V 8-bit).
The partitioning is not read from the device nor the bootloader, it is specified in the kernel driver, under drivers/mtd/nand/rb4xx_nand.c
My partition table is
0x000000000000-0x000000040000 : "booter"                                       
0x000000040000-0x000000a00000 : "kernel"                                       
0x000000a00000-0x000040000000 : "rootfs" 
Thus, the kernel has 10MB and rootfs has 128MB, the rest of the flash is not used. (I don't need the space yet, as I use the NFS as rootfs)

However, I also do have problems with loading kernels larger than about 3.5 MB, not sure why ... but I am building & trimming the ELF image with a custom script, so there might be a problem in there.

I also went thru the setup code for the Ubiquity RS Pro and Dlink 825 which seem to use the same PHY (AR8316), but haven't found anything special (I believe that each manufacturer connects the switch at whichever processor interface port he likes).

KanjiMonster posted a wiring of the ports at AR8316 that I am assuming is correct:
* Port 5 directly wired to WAN on eth0.
* Ports 2-4 are LAN3-1 (i.e., LAN1 is Port 4, LAN2 is 3 and LAN1 is 2).
* Port 1 isn't connected anywhere
* Port 0 is the CPU port and connected with eth1.

According to this information, I don't understand the behavior of my RB450G:
the eth0 interface (the software name in kernel) goes up first and has the AR8316 attached & detected ...  but it is also this interface that is used for the hardware port that is labeled Eth1/PoE and it gets an address from my DHCP!

On the other hand, eth1 interface (the software name in kernel) goes up second and does not communicate at all, and is not swconfig configurable.

Does anyone (KanjiMonster, russo) experience the same thing?

I am really missing the datasheets or other documentation for both the processor and switch chip ...

I see I got the port map from KanjiMonster wrong - it relates to a routerstation device only, so I did some probes myself and found that on RB450G the ports are:

AR8316 Port Name        RB450G Port Name
PORT0                    ->  Internally connected to the processor MAC
PORT1                    ->  Eth2
PORT2                    ->  Eth5
PORT3                    ->  Eth4
PORT4                    ->  Eth3
PORT5                    ->  Eth1

I got stuck in the driver setup/configuration code of the switch, the port0 does not want to come up under any circumstances ... I did set the port speed to gigabit, turned off auto-negotiation and set it to be up ... but still nothing ... I suspect there are other registers that need to be adjusted, or that the MAC of the processor needs to be set up first, but from the source code I haven't come upon any ideas ... so any suggestions? :)  .... I'll give it at try this afternoon.

Try this for the kernel issue:

--- a/drivers/mtd/nand/rb4xx_nand.c    2010-01-21 07:09:26.000000000 -0500
+++ b/drivers/mtd/nand/rb4xx_nand.c    2010-01-26 18:52:16.000000000 -0500
@@ -92,7 +92,7 @@
    {
        .name    = "kernel",
        .offset    = (256 * 1024),
-        .size    = (4 * 1024 * 1024) - (256 * 1024),
+        .size    = (10 * 1024 * 1024) - (256 * 1024),
    },
    {
        .name    = "rootfs",

Venome,

One other thing, although I suppose that you know this.  The RS Pro's AR8316 is initialized by RedBoot, not by OpenWrt, so there won't be any code there to help.

And the RB450G's is initialized in RouterOS, which we don't have the source for.

So I don't think that we're going to find any code anywhere that helps us.

For anyone not following the ar8316 thread, I posted some patches - please test and provide feedback.

KM

rabinnh wrote:

Ok the NAND patch is not yet in the trunk.  My entire project is flashed and loaded.  I'm probably missing other patches as well.

A learning experience.  If wget2nand doesn't have enough room to copy the kernel, it just stops without an error.  I didn't discover the problem until I went to copy manually.

How exactly did you manage to flash the vmlinux file correctly. I'm not sure I followed everything...
--- Later that day
Thank you all for the help, I've managed to flash the image ; check https://forum.openwrt.org/viewtopic.php … 58#p104558 for progress

(Last edited by flaxrt on 12 Mar 2010, 19:50)

I used patches from here https://forum.openwrt.org/viewtopic.php … 37&p=3 and seems flashed to nand ok, network seems to work ok too. I will do more tests after weeend. Thanks to KM very mutch :-).

Now the question is: how to upgrade openwrt on rb450g nand ?

Usualy I used sysupgrade utility but now I don't know how to upgrade.

warm wrote:

I used patches from here https://forum.openwrt.org/viewtopic.php … 37&p=3 and seems flashed to nand ok, network seems to work ok too. I will do more tests after weeend. Thanks to KM very mutch :-).

Now the question is: how to upgrade openwrt on rb450g nand ?

Usualy I used sysupgrade utility but now I don't know how to upgrade.

Try this: wget2nand ftp://ip/

bradyzhu wrote:
warm wrote:

I used patches from here https://forum.openwrt.org/viewtopic.php … 37&p=3 and seems flashed to nand ok, network seems to work ok too. I will do more tests after weeend. Thanks to KM very mutch :-).

Now the question is: how to upgrade openwrt on rb450g nand ?

Usualy I used sysupgrade utility but now I don't know how to upgrade.

Try this: wget2nand ftp://ip/

I flashed router by wget2nand. wget2nand does not save any configuration (/etc/config/*). Also at start it breaks network configuration and runs "/sbin/udhcpc -i br-lan". So standart script wget2nand can not be used fo remote upgrade. I can modify wget2nand to work for my needs (take some code from sysupgrade to save configuration and some code from wget2nand to reflash). I'm looking for right openwrt way to upgrade.

Seems like  the switch is working now, even just experimental. Well, i can't try at the moment, coz i borrowed my board to a friend. Hope I will get it soon back.

The network seems runing now. But, did anyone was able to access the micro sd card successfully via openwrt? And when so how to achieve that?

Any updates on 450g switch/microSD support? Anyone interested in sharing a pre built image for the 450g?

I will be not so optimistic about stable MicroSD support:

First will be interesting to know if MicroSD connection in RB450G is done by SPI same way as some others Microtik boards:

"MicroSD slot on the RB-493AH is not yet supported under OpenWrt. The slot shares the AR71xx's SPI bus with the NAND and with the NOR flash, and the linux mmc_spi driver does not work with a shared SPI bus currently." ???

On Microtik forum is several messages about unstable MicroSD behaviour, for RB450G looks also a newer SDHC cards are better supported.

There is a list of User Tested MicroSD cards for RB450G and:

http://wiki.mikrotik.com/wiki/Supported … mory_cards

Note: Pushing the "Kingston SDHC 8GB card" all the way into the socket caused the card not to work properly! It had to be pulled out ~1mm for it to work!

===============================

I have a RB450G board and brand new Kingston 2GB MicroSD (SD-C02G Taiwan SDC/2G 81) Very small number under MicroSd said 0947RB0651H (Similar card from Jappan is reported to do not work on Mikrotik :-)

I can test a devel image with MicroSD support, preferable is one with integrated root for simple netboot test (I have a serial cable connection no need for working network support)

===============================

Here are notes from related microtik forum threads:

RB450G+microSD=errors - help
http://forum.mikrotik.com/viewtopic.php?f=3&t=31325

RB450G microSD card issue
http://forum.mikrotik.com/viewtopic.php … mp;start=0

450G + MicroSD
http://forum.mikrotik.com/viewtopic.php?f=3&t=39390

(Last edited by natiku on 5 May 2010, 21:10)

rabinnh just start a new thread with whole set of RG450G needed patches.

https://forum.openwrt.org/viewtopic.php?id=23362

So I will try them, looks like microSD is on SPI.

There is too much information for now, so I create a RB450G page to hold all information on one place (There was an empty link on ) so RB450G users can more easily help us:

http://wiki.openwrt.org/toh/mikrotik/rb450g

(Last edited by natiku on 5 May 2010, 20:06)

And what about **internal reset** jumper and **beeper** support ?

rabinnh wrote:

Try this for the kernel issue:

--- a/drivers/mtd/nand/rb4xx_nand.c    2010-01-21 07:09:26.000000000 -0500
+++ b/drivers/mtd/nand/rb4xx_nand.c    2010-01-26 18:52:16.000000000 -0500
@@ -92,7 +92,7 @@
    {
        .name    = "kernel",
        .offset    = (256 * 1024),
-        .size    = (4 * 1024 * 1024) - (256 * 1024),
+        .size    = (10 * 1024 * 1024) - (256 * 1024),
    },
    {
        .name    = "rootfs",

Latest wget2nand now fail if kernel was not copied correctly , see more in change set 21444

https://dev.openwrt.org/changeset/21444/trunk

as i've posted in some other post/thread, changing from 4 to 6 is enough, no need to go for 10.

that wont make too much difference on RB450G which has plenty of disk space .... but i was building a single image for installing on RB450 and RB450G, and on RB450 those 4Mb makes some difference.

if you're using only RB450Gs, dont worry, you can go with 10 with no problem. But if, just like me, you're dealing with RB450s and RB450Gs and trying to build a single image for them, 6 is a better choice.

Hey all, I am currently trying to get debian to work on the rb450g, and I have been using the proposed kernel patches from the openwrt project to do so. While doing that, I encountered a problem:

It seems that the RB450g bootloader is unable to boot a kernel larger than approximately 6M. I used the proposed patch to increase the portion of the nand flash which is supposed to store the kernel, but if I put a 6M kernel there and try to boot it, the bootloader will tell me "kernel not found". If I put a smaller image there (~4M), all is fine. This means, for example, that it's impossible to boot an openwrt with initramfs from flash, or to boot a fully equipped kernel. sad

Does anyone know what this apparent limitation is caused by? Can I prevent it?

Cheers,
--
Rien

Does anybody know if MikroTik provides their kernel patches? They seem to put some (binary?) stuff for download and advertise the use of linux-2.6.35: http://forum.mikrotik.com/viewtopic.php … p;p=227902
I'm interested in a reliable microsd support on this device. And it is mentioned in some places that memory cards may be problematic. Does anybody know what is the current rb450g status?

RB450G is supported and i have several of them running OpenWRT. I have not used VLAN configurations and, as far as i know, microsd support do NOT exist for routerboard that have memory card slots, including RB450G.

Thanks for your reply. It is good to know that RB450G is at least usable with normal linux.

leonardogyn wrote:

as far as i know, microsd support do NOT exist for routerboard that have memory card slots, including RB450G.

The code for mmc support seems to be available in openwrt trunk (and commented out in backfire branch). I just wonder if anybody had any success with it already.

The discussion might have continued from here.