OpenWrt Forum Archive

Topic: OpenWRT Cavium and other questions

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

Sorry, I'm always shooting simple questions, that's because I'm a OpenWRT noobie and I have a LOT, I mean a LOT of questions because since I discovered OpenWRT I can't stop thinking in all possibilities to improve my shit, and by my "shit"  I mean all stuff I have here.
I Have one TP-Link ER6120 Dual Wan router and it was a big disappointment, it's fast and has a superb WAN/LAN throughput, but just like all TP-Link stuff it's dumb and right now it's playing the " $240 Bucks Paper Weight" role in my office and the reason is: I cannot do tagged WAN and since now I have a ISP with tagged PPPOE I cannot use it.
I  currently have one TL-WDR4300 as  a main router and the perfomance isn't so great and there's a problem: The ER6120 has a Cavium Processor, detailed specs on the link below:
http://www.tp-link.com/lk/products/deta … =TL-ER6120

My question is: There's a OpenWRT cavium image here: https://downloads.openwrt.org/snapshots/trunk/octeon.
Since the Cavium images doesn't have any indication what the devices can be flashed with it how you guys are doing?

The current cavium images will run on some development boards as well the ubnt edgerouter lite, there's no support for that tp-link unit, as we don't have one

Hi kaloz, thanks for your response.
Before start dreaming I think I need to know if the router it's compatible with OpenWRT, so I'll need at least the boot log is that it?
The router has a console port at the front (RJ45 to DB9 serial).My question is:
This port works to intercept the boot log since it was placed there by the manufacturer?

(Last edited by joaopaulo.mello on 4 Jan 2015, 02:07)

Since mostly likely the router is linux based you can try to the instructions here: http://wiki.openwrt.org/doc/devel/add.new.device
and get the info.

I think the best is to purchase another router and contribute it to the dev team.

I think before doing that, it's better to check openwrt compatibility and I think the boot log can help, please correct me if I'm wrong.
Today I ran into my old pile of junkie and prepared a old Core 2 Quad, it's not easy to get a serial port on a computer these days. I successfully talk with the router, but only through the TP-LINK "sucks" CLI, very bad and very limited. I really don't understand why these companies keeps trying to reinvent the wheel delivering a crap of software, making CLI´s, wrappers and facades that never really do the job well, but it's another history.

Where am I? I'm talking with router and I have a lot of questions, one of them is:
- How can you guys knows what to type at boot time to intercept the boot?
I tried to get the source code at TP-LINK GPL code center but no joy, isn't there...filled a complain with the support and they told me that the ER6120 isn't linux based, seriously? I asked on what it is based on and I get no answer until now.

I'm really determined to put OpenWRT in this router, that said I opened the case and all chips that matters has heatsinks glued on it, I just can't remove the heatsink to read the chips brands, models and revisions without forcing it and breaking it.

Anyone can help me with something please?

(Last edited by joaopaulo.mello on 14 Jan 2015, 21:07)

I cannot help, but usually posting serial bootlog is a good point to start.

Sure, that's what I'm trying to get...

Anyone?

- How can you guys knows what to type at boot time to intercept the boot?

Nothing. In most cases the bootlog is always send to the serial port.

I tried to get the source code at TP-LINK GPL code center but no joy, isn't there...filled a complain with the support and they told me that the ER6120 isn't linux based, seriously? I asked on what it is based on and I get no answer until now.

A simple 'strings' on the firmware binary shows

VxWorks
VxWorks 6.6
Jan 13 2014, 16:48:24

So I guess it's VxWorks smile

To know if the box can run OpenWRT you can open the box and look at the chips. If it has less than 16MiB ram you can forget OpenWRT. VxWorks needs less memory than Linux does.

Nothing. In most cases the bootlog is always send to the serial port.

In this case it's not, maybe because I'm using the the external serial port that comes with the router?

To know if the box can run OpenWRT you can open the box and look at the chips. If it has less than 16MiB ram you can forget OpenWRT. VxWorks needs less memory than Linux does.

I opened the case and the memory chips is the only that I can read, it has 128MB and accordingly with TP-Link specs, it has 8MB flash. It's a Small Business Router with less horse power than  several home routers, it's a shame.
I can build a OpenWRT image for the processor with the essential packages, but I need to know the flash layout and what switch it has in order to not brick losing the connectivity with router.

Do you have specifictions of the port? It can be RS232, or 5, 3.3 or 1.8V TTL. If you connect a 3.3V TTL port (most popular in routers) to a 'standard' PC RS232 port, you won't receive anything.
If you have an oscilloscope it can tell you the levels on the TX. (And also the baudrate) if there is any signal on that port.

Mijzelf wrote:

Do you have specifictions of the port? It can be RS232, or 5, 3.3 or 1.8V TTL. If you connect a 3.3V TTL port (most popular in routers) to a 'standard' PC RS232 port, you won't receive anything.
If you have an oscilloscope it can tell you the levels on the TX. (And also the baudrate) if there is any signal on that port.

Sorry for take so long to reply and thanks for your response Mijzelf.
I don't know the serial port specification but I think it's important to mention that it's a external serial port (RJ45) provided with the router, TP-Link packaged a RJ45 to DB9 cable with the router.
I can connect and use the TP-Link CLI without any issues using putty, but I can't see the boot log when the router is starting or resetted, maybe because it's a port provided by the manufacturer and have some limitations to avoid tweaks or there's no such thing?

(Last edited by joaopaulo.mello on 28 Jan 2015, 14:28)

Toke some pictures with cellphone, quality sucks but just to have an idea on which port I'm talking about, the one labeled "console"

https://drive.google.com/uc?export=download&id=0B4TlEVfFFrMjV1BVbG1zOTZhUDQ
https://drive.google.com/uc?export=download&id=0B4TlEVfFFrMjX1VyTXN5SWVqbG8

If you can access the CLI through that port, you are using the right type of port on your PC. I can think of several reasons why you don't see a bootlog:

  • The SoC has more than one serial port, and the bootlog is on another one.

  • The box boots silent, no output from bootloader and kernel.

  • The box changes baudrate after booting.

  • As the SoC probably has a 3.3V TTL serial port, a level convertor is needed. This convertor can be powered by a GPIO which is set when boot is done.

  • ...

You can search for another serial port on the mobo. In many cases 3 or 4 pins or solder islands, maybe labelled RX TX GND (Vcc).

Mijzelf wrote:

If you can access the CLI through that port, you are using the right type of port on your PC. I can think of several reasons why you don't see a bootlog:

  • The SoC has more than one serial port, and the bootlog is on another one.

  • The box boots silent, no output from bootloader and kernel.

  • The box changes baudrate after booting.

  • As the SoC probably has a 3.3V TTL serial port, a level convertor is needed. This convertor can be powered by a GPIO which is set when boot is done.

  • ...

You can search for another serial port on the mobo. In many cases 3 or 4 pins or solder islands, maybe labelled RX TX GND (Vcc).

Cannot find another serial port anywhere on the mobo, so, it seems that I got TP-Linked sad
What should I do to get a "bin" file out of Image Builder? The CLI has a update functionality that connects to a FTP server and download the file "Update.bin" to update the firmware. I'll build a very basic image with only the OpenWRT essentials to test, but it seems that cavium profile doesn't generate a "bin" file.
I know the chances to have a bricked router are sky high, but to be quite frankly, it will serve the purpose that it has today, bricked or not: Paper-weight.

A bin file? That is just a name, and doesn't say anything about the contents. It suggests that it contains only a raw flash dump, but I'm pretty sure it doesn't.
The bin file I downloaded contains from address 0x01014 up:

fwup-ptn partition-table base 0x00800 size 0x00800    
fwup-ptn product-info base 0x01000 size 0x00221    
fwup-ptn os-image base 0x01221 size 0x3cb401    
fwup-ptn soft-version base 0x3cc622 size 0x00015    
fwup-ptn profile base 0x3cc637 size 0x00c59    
fwup-ptn default-config base 0x3cd290 size 0x00db9    
fwup-ptn web-res base 0x3ce049 size 0xa303a    
fwup-ptn isp-addr-list base 0x471083 size 0x009d9    
fwup-ptn app-desc base 0x471a5c size 0x00519    
fwup-ptn app-db base 0x471f75 size 0x00c21

and from 0x01818 up:

partition fs-uboot base 0x00000 size 0x20000    
partition partition-table base 0x20000 size 0x02000    
partition default-mac base 0x30000 size 0x00020    
partition product-info base 0x30020 size 0x01000    
partition signature base 0x31020 size 0x00400    
partition hw-info base 0x3c000 size 0x04000    
partition os-image base 0x40000 size 0x500000    
partition soft-version base 0x540000 size 0x00100    
partition profile base 0x540100 size 0x02f00    
partition default-config base 0x543000 size 0x02000    
partition user-config base 0x550000 size 0x40000    
partition web-res base 0x590000 size 0x100000    
partition isp-addr-list base 0x690000 size 0x04000    
partition app-desc base 0x694000 size 0x10000    
partition app-db base 0x704000 size 0x20000    
partition license base 0x730000 size 0x10000    
partition log base 0x7e0000 size 0x20000    

That might be a database which has to be flashed, and is read by the firmware, but I think it is information for the flashing mechanism, meaning this file has some structure.
*Maybe* all TP-link devices use this structure, in that case you might borrow parts of a TP-Link project to build your .bin file.

Having said that, I think flashing OpenWRT using the internal firmware updater is a reliable way to brick your box. Updating the firmware will write a new filesystem, and maybe a new kernel, but it will leave the bootloader. I don't think a bootloader which expects VxWorks will successfully boot Linux. So to boot OpenWRT you'll have to exchange the bootloader, or insert a 2nd bootloader which behaves as an VxWorks image.
Seeing your knowledge level, I think you'd better sell this box and buy a OpenWRT supported model instead. (Or donate this box to the developer team)

Being a developer for almost two decades I know software very well, but you're right, my knowledge sucks regarding devices, firmware and stuff.
This is not a very popular model, so I think it's not worth the effort by the developer team. I just wanted something better than a consumer grade router to run openwrt at my home-office since I'm having some perfomance issues with TL-WDR4300.
I have this guy SYS-5018A-FTN4 running OpenWRT Trunk x86_64 compiled with eglibc with SpeedStep,SMP and other goodies working without any issues, the perfomance is amazing much better than pfsense since the image was compiled with eglibc I can run another services that I'm used to run on my linux box, but I don't feel comfortable having a "computer" running 24x7 as a internet gateway, I need perfomance: YES, but not that much and power saving is a must which I don't have using the supermicro. I have 2 wans, one FFTH 200Mbps and another Cable 100Mbps and I can't go above 180Mbps with consumer grade routers.
I don't think that TP-Link ER6120 is a top perfomance router, but it could be better than the most popular ones. I think I'll keep the supermicro for awhile and try to use for other things like TimeMachine, Mediaserver and so on.

(Last edited by joaopaulo.mello on 29 Jan 2015, 17:34)

Hi i know this is a old thread can someone confirm this is it a 14 pin ejjtag  so i can try to install openwrt on this as my router is bricked
imgur.com/a/b9F3s

(Last edited by antreas32 on 21 Oct 2017, 21:43)

The discussion might have continued from here.