[WIP] Porting Mikrotik RB2011 to ath79 - testers needed

so this units are a dead end (waste of time). we will better be off with selling them as long as they are still worth a few bucks...

I started porting the device myself after I got one for use in Hamnet from a friend, and only now I noticed this thread. While researching SFP I came to the same conclusion, that DSA is needed indeed, but other than that, I got the switches working. with swconfig. Will take a look at your work, I'd like to have this device supported too.

1 Like

Which one?
RB2011iL
RB2011UiAS

RB2011UiAS-RM, to be exact. With LCD.

Oh I have that and RB2011UiAS-2HnD-IN and the RB2011iLS

I got most parts of the device working, save for SFP, which doesn't set link up - the transceiver itself probes, and USB port (on which USB root hub fails to probe), and obviously, the display. LEDs are handled by my earlier patch adding LED support to AR8327 swconfig driver. I think it's a little bit closer to upstreaming now.

3 Likes

Due to request on Github, here are my test images:
https://drive.google.com/drive/folders/16y2PMBrS3i_sswfZocZQ9hqVoGrtib8D

I'd be grateful for feedback especially regarding wireless, since my unit doesn't have it.

2 Likes

I'll try to take a look at this next week and aid in supporting the sfp and wireless.

This build is working fine now with switch fixed 1gb speed on ports correct.
https://forum.openwrt.org/uploads/default/original/3X/4/6/46bb5fb11168fd47bed4857e0c1630af1b108bb2.jpeg

I`ll do some vlans test on switch tab and see results.

Edit.
After some tests I got some wrong ports
Lan1 is showing port 05
Lan2 is showing port 01
Lan3 is showing port 02
Lan4 is showing port 03
Lan5 is showing port 04

Okay, I think then SFP port needs to go first in /etc/board.d/02_network, then. Because eth1 is WAN by default.
I haven't dug much into this yet, my focus is to get every device running first.

1 Like

Hello Leo, I tried to compile your commit #757190e but faced some problems doing so. My make menuconfig did not provide the target "CONFIG_TARGET_ath79_mikrotik_DEVICE_mikrotik_routerboard-2011uias-2hnd", required to build. When I set

CONFIG_TARGET_ath79_mikrotik=y
CONFIG_TARGET_ath79_mikrotik_DEVICE_mikrotik_routerboard-2011uias-2hnd=y
CONFIG_TARGET_PROFILE="DEVICE_mikrotik_routerboard-2011uias-2hnd"

in my .config, compilation works, but there are no binaries created in

bin/targets/ath79/mikrotik

I have two rb2011 UiaS v3 devices and would like to try your patches on my device.
Could you give me an advice how to build ? Is it sensible to try them for UiaS anyway, as you made them for the 2HnD version ? As these devices use a " ESMT NAND 128MiB" flash, I never got them working with 19.07, as this chip was not detected by the related kernel correctly.

That's strange...

I'll post my config to the same directory as the images, this should help. I use "multiple devices" and "per-device rootfs" options for my builds, as it is done in upstream builds.
Edit: posted.

Hello Leo, thanks for that upload. Meanwhile I gave it a try and

  1. checked out owrt revision 757190eddc0305d4109c5d68d5d79c71cc6dbd59
  2. added your .config
  3. did the steps advised in "make help", that is ./scripts/feeds update -a and install -a
  4. run "make -j31 IGNORE_ERRORS='n m' -k"
    As result, there are some packages that do not compile, but this was not a problem for the main target in my earlier builds.
    After updating and installation of feeds, and also with make menuconfig I always get a lot of warnings for missing packages.. I tried to move over some missing ones from master, but with no success..
./scripts/feeds install -a
WARNING: Makefile 'package/feeds/packages/libreswan/Makefile' has a dependency on 'kmod-nft-xfrm', which does not exist
WARNING: Makefile 'package/feeds/packages/libreswan/Makefile' has a dependency on 'iptables-zz-legacy', which does not exist
WARNING: Makefile 'package/feeds/packages/libreswan/Makefile' has a dependency on 'ip6tables-zz-legacy', which does not exist
WARNING: Makefile 'package/feeds/luci/luci-proto-unet/Makefile' has a dependency on 'unetd', which does not exist
WARNING: Makefile 'package/feeds/luci/luci-proto-unet/Makefile' has a dependency on 'unet-cli', which does not exist
WARNING: Makefile 'package/feeds/packages/midisport-firmware/Makefile' has a dependency on 'fxload', which does not exist
WARNING: Makefile 'package/feeds/packages/prometheus-node-exporter-lua/Makefile' has a dependency on 'ltq-dsl-app', which does not exist
WARNING: Makefile 'package/feeds/packages/python-cryptography/Makefile' has a dependency on 'libopenssl-legacy', which does not exist
WARNING: Makefile 'package/feeds/packages/python-jsonschema/Makefile' has a dependency on 'python3-jsonschema-specifications', which does not exist
WARNING: Makefile 'package/feeds/packages/python-jsonschema/Makefile' has a dependency on 'python3-referencing', which does not exist
WARNING: Makefile 'package/feeds/packages/python-jsonschema/Makefile' has a dependency on 'python3-rpds-py', which does not exist
WARNING: Makefile 'package/feeds/packages/wavemon/Makefile' has a dependency on 'libnl-cli', which does not exist
Installing all packages from feed packages.
Installing package 'cligen' from packages
Installing package 'libsocketcan' from packages
WARNING: Not overriding core package 'pcre'; use -f to force
Installing package 'python-jsonschema-specifications' from packages
Installing package 'python-referencing' from packages
Installing package 'python-rpds-py' from packages
Installing package 'uspot' from packages
WARNING: No feed for package 'ucode-mod-uloop' found
WARNING: No feed for package 'ucode-mod-uloop' found
Installing all packages from feed luci.
Installing package 'luci-app-crowdsec-firewall-bouncer' from luci
Installing package 'luci-app-sshtunnel' from luci
Installing package 'luci-app-tor' from luci
Installing package 'luci-app-usteer' from luci
Installing package 'luci-proto-external' from luci
Installing package 'luci-proto-yggdrasil' from luci
Installing all packages from feed routing.
Installing all packages from feed telephony.

These warnings I also see while compilation is starting:

make -j31  IGNORE_ERRORS="n m" -k
WARNING: Makefile 'package/feeds/packages/libreswan/Makefile' has a dependency on 'kmod-nft-xfrm', which does not exist
WARNING: Makefile 'package/feeds/packages/libreswan/Makefile' has a dependency on 'iptables-zz-legacy', which does not exist
WARNING: Makefile 'package/feeds/packages/libreswan/Makefile' has a dependency on 'ip6tables-zz-legacy', which does not exist
WARNING: Makefile 'package/feeds/luci/luci-proto-unet/Makefile' has a dependency on 'unetd', which does not exist
WARNING: Makefile 'package/feeds/luci/luci-proto-unet/Makefile' has a dependency on 'unet-cli', which does not exist
WARNING: Makefile 'package/feeds/packages/midisport-firmware/Makefile' has a dependency on 'fxload', which does not exist
WARNING: Makefile 'package/feeds/packages/prometheus-node-exporter-lua/Makefile' has a dependency on 'ltq-dsl-app', which does not exist
WARNING: Makefile 'package/feeds/packages/python-cryptography/Makefile' has a dependency on 'libopenssl-legacy', which does not exist
WARNING: Makefile 'package/feeds/packages/uspot/Makefile' has a dependency on 'ucode-mod-uloop', which does not exist
WARNING: Makefile 'package/feeds/packages/uspot/Makefile' has a dependency on 'ucode-mod-uloop', which does not exist
WARNING: Makefile 'package/feeds/packages/wavemon/Makefile' has a dependency on 'libnl-cli', which does not exist
make[2]: Entering directory '/var/projects/openwrt/rb2011uias/snapshot_23.05.2_23757190e/scripts/config'
make[2]: 'conf' is up to date.
make[2]: Leaving directory '/var/projects/openwrt/rb2011uias/snapshot_23.05.2_23757190e/scripts/config'
time: target/linux/prereq#0.16#0.05#0.20
WARNING: your configuration is out of sync. Please run make menuconfig, oldconfig or defconfig!
 make[1] world
 make[2] package/cleanup
 make[2] target/compile
 make[3] -C target/linux compile
 make[2] buildinfo
 make[2] package/compile
...
 make[3] -C package/libs/libxml2 compile
    ERROR: package/feeds/luci/rpcd-mod-luci failed to build.
..
 make[3] -C package/system/opkg compile
    ERROR: package/libs/libxml2 failed to build.
...
 make[3] -C package/base-files compile
    ERROR: package/feeds/packages/jool failed to build
...
 make[3] -C package/kernel/ath10k-ct compile
    ERROR: package/feeds/routing/batman-adv failed to build.
...
make -r world: build failed. Please re-run make with -j1 V=s or V=sc for a higher verbosity level to see what's going on
make: *** [/var/projects/openwrt/rb2011uias/snapshot_23.05.2_23757190e/include/toplevel.mk:230: world] Error 1

Running with -j1 V=s simply stops with the first package failed to compile.
There are no images prepaired in "bin/targets/ath79/mikrotik/" folder.
As I'm unexperienced with the details of the owrt compilation processes, maybe somebody sees my failure and can give a cue ?

I suppose, it is related to the error compiling libxml2, as it may be mandatory for some image binaries, but I could not manage to make it compile in your revision..

Huh, I have no idea for what the extra switches were added to final make.
Did you try to download the packages first by calling make download?
I recall some woes with the package mirrors at the time I built it first.

On my setup (Debian 12 as build host) I did:

  • clone the repo
  • make package/symlinks
  • insert the .config
  • make menuconfig (customize as you wish, otherwise just make defconfig would suffice)
  • time make -j $(nproc)
    And done.
    While at that, you might want to rebase on top of current main, there is no particular reason to just check out this exact revision, this might fix your woes with packages too. Especially, that synchronizing packages will pull the latest branches, while core repo is fixed at state from 2 weeks ago. I'll post my feeds.buildinfo too, then. If you wish to keep the revision of core repo, then use that in place of feeds.conf.

By any chance, does anyone here know of a repair/service manual for RB2011? My unit has a ghost link issue on one of 100M ports, which sometimes works if I touch the pads of the connector or coupling transformer.Looks like some kind of crosstalk between TX and RX - but I wasn't able to suppress or pinpoint.

On port 10? This port is poe out port, atleast in my device which aparently was hit by lighthning or some weird things happened to it.

No, on port 6. But to discuss that, let's create another topic.