[WIP] Porting Mikrotik RB2011 to ath79 - testers needed

...nevermind, I had this: https://github.com/robimarko/routeros-GPL starred all the time on Github. And now I've found where LCD and all the stuff is configured: https://github.com/robimarko/routeros-GPL/blob/master/linux_3_3_5_patch_RouterOS644/arch/mips/rb/platform.c

3 Likes

LCD would be great! :wink:

1 Like
+               gpio_poe_out {
+                       gpio-export,name = "poe:power";
+                       gpio-export,output = <0>;
+                       gpios = <&gpio 2 GPIO_ACTIVE_HIGH>;
+               };
+       };

Just checked: I have it set ACTIVE_HIGH, but at the same time set as low initially, so it should work either way. You can play with it in sysfs - I don't have my device on hand until ~Wednesday.

1 Like

echo 1 > /sys/class/gpio/poe:power/value works like a charm!


NAND repair works well BTW via:

netinstall -r -a 192.168.88.1 routeros-7.16.1-mipsbe.npk

Maybe I didn't enable it by default, since it's a passive output - to not fry anything connected there by accident.

1 Like

I've figured out, that gpio-export doesn't take GPIO_ACTIVE_LOW into account properly, and sets initial state regardless of it - so yeah, I had PoE and USB power backwards, both disabled. I pushed fixes to Github, and updated images.

Now I might need some help figuring out the SFP finally - I wonder if it's at all possible with swconfig, without migrating whole target to DSA, which is long in the works.

3 Likes

i would like to step in but in only have a 64mb flash unit left and doest boot openwrt right now. anyone else?!

Try doing netinstall as per

this should take care of NAND bad blocks

Unfortunately, I don't have SFP modules around.
@Leo-PL Any recommendations for affordable ones?

Look on your favourite auction site for used 850nm or SX modules, especially FC ones are dirt cheap but should work. I had mine for equivalent of around 1EUR.

I tried doing some hacks to get it up, but it's still incomplete and doesn't work - I think figuring out the SGMII parameters in the switch should be done next, but I'm lacking some knowledge here.

today i had some time. serial port on 64MB version doesnt work for me. tested every pin with every common baudrate.
maybe its disabled?

ok...routerboot 2.23. there is NO serial port at all in routeros available

Correct. This is debug-only console on that model, despite same UART in CPU being used - 2100UiAS exposes it over 8P8C connnector, even with preboot CLI. But OpenWrt will use it anyway.

means if iยด ll try openwrt ram boot it will output something?

1 Like

@Leo-PL Do you know of any particular reason, why this is not part of the 24.10.0-rc?

Yes, I do. Support isn't ready, so I have not yet submitted this upstream.

1 Like

@Leo-PL

the question is: what is missing for the PR? maybe someone lands u a hand.

if its done we can focus on a more robust hw like the rb3011 :wink:

Currently I'm struggling to get SFP port working. The LCD is just nice to have, so maybe it's better to actually document what's done and submit what we have now.

1 Like

yes, LCD is ice to have.

whats also not working is the 64mb flash support. since i sold all my 128mb flash versions, 64MB is the only one thats left on my side.
but i try to get serial info when i have some sparetime, since it should work when openwrt is flashed. never seen a single byte on serial with ros installed up to now.

I think I'll clean up what I have now in coming days and post a PR, documenting what's missing - most of the networking features of the device do work, after all.
As for your problems with 64M devices, that's really strange, as I tested the very same image on RB2011 lite I got from a friend, and it just worked :frowning:
Last partition has size set to 0 in the device tree, to accomodate length up to the end of flash.
I strongly suspect a worn flash chip :confused:

1 Like

@Leo-PL Sorry if I came across rude. I would really like to see this going upstream. So please let me emphasize once more:

Thank you for your work!!!
If we ever meet, beers on me! :bowing_man:

I was quickly looking through my inventory. I don't have a 64M version either.
Additionally, I've quickly checked SFP and SFP+ modules.

root@OpenWrt:~# dmesg | grep sfp
[   16.896812] sfp sfp: Host maximum power 1.0W
[   16.913961] sfp sfp: No tx_disable pin: SFP modules will always be emitting.
[   17.370091] sfp sfp: module FS               SFP1G-SX-85      rev A    sn C2403790780      dc 240329  
root@OpenWrt:~# cat /sys/kernel/debug/sfp/state 
Module state: waitdev
Module probe attempts: 0 0
Device state: detached
Main state: down
Fault recovery remaining retries: 0
PHY probe remaining retries: 0
Signalling rate: 0 kBd
Rate select threshold: 0 kBd
moddef0: 1
rx_los: 0
tx_fault: 0
tx_disable: 1
rs0: 0
rs1: 0
root@OpenWrt:~# 
root@OpenWrt:~# dmesg | grep sfp
[   16.941179] sfp sfp: Host maximum power 1.0W
[   16.963953] sfp sfp: No tx_disable pin: SFP modules will always be emitting.
[   17.444741] sfp sfp: module FINISAR CORP.    FTLX8574D3BCL    rev A    sn N69BBKK          dc 210902  
root@OpenWrt:~# cat /sys/kernel/debug/sfp/state 
Module state: waitdev
Module probe attempts: 0 0
Device state: detached
Main state: down
Fault recovery remaining retries: 0
PHY probe remaining retries: 0
Signalling rate: 0 kBd
Rate select threshold: 0 kBd
moddef0: 1
rx_los: 0
tx_fault: 0
tx_disable: 1
rs0: 0
rs1: 0
root@OpenWrt:~#