Add support for MikroTik RB5009UG

with pleasure it's really very nice I have a macbook but I have parallel desktop with ubuntu I am new to firmware construction on the other hand

when you say a certain time is how much about 1 month or 2 before openwrt 22 is right

Going on what robimarko said I wouldn't expect support before OpenWrt switches to 5.15, so I wouldn't get my hopes up for 22.xx. That will use kernel 5.10. And between branching and a stable release will be quite a few months as well.

Once 22.xx gets branched though you might very well be able to apply adron's patches on top of it and build a stable version like that.

1 Like

Ok i understand i you send mp about build :+1::slightly_smiling_face:

I got it working with the new elf image

sudo ip addr add 192.168.88.1/24 dev eth0
sudo dnsmasq --bind-interfaces -i eth0 -a 192.168.88.1 --dhcp-range=192.168.88.100,192.168.88.200  --dhcp-authoritative --dhcp-boot=openwrt-mvebu-cortexa72-mikrotik_rb5009-initramfs-fit-uImage.elf --enable-tftp --tftp-root=/srv/tftpboot/ -d -u nobody -p0 -K --log-dhcp --bootp-dynamic

Then this time around it got past the sending image, i was able to get a link light on port2 of the router, and I switched my desktop's eth0 to be a dhcp client instead of a dhcp server and was able to ssh to 192.168.1.1

EDIT: also fwiw since the files don't have clear versions, this is the file that worked

$ sha256sum openwrt-mvebu-cortexa72-mikrotik_rb5009-initramfs-fit-uImage.elf                                                                                                                                                                                              
4c4eefea7d5031e23cabaeef61c22b77a255ce64165658bf3c062988b247a09a  openwrt-mvebu-cortexa72-mikrotik_rb5009-initramfs-fit-uImage.elf

1 Like

I've been trying myself but no dice no matter whether with dnsmasq or TinyPXE on Windows :expressionless: :person_facepalming:.

What were your settings in RouterOS? Boot device to 'try ethernet then NAND' I suppose. Boot protocol DHCP? Did you have 'use backup bootloader' ticked?

My routeros got borked while I was trying to do the install. So what I've been doing is holding reset while plugging it in, the green LED under the sfp+ port will go solid, blink, then turn off (takes ~15 seconds total). ~1sec after it turns off release the reset button and it will tftp boot.

Also edited my above comment with the sha256 of the file that worked for me.

1 Like

Thanks. I've been trying exactly that, but no dice somehow. Will try that on yet another system later on.

I don't think its the system fwiw. The only thing I did differently this time was set my system's ip to .88.1 I don't think that made any difference. Previously I also tried on 3 different systems as well. I think there was an issue with the old version of the elf image. Best of luck!

1 Like

Thanks! What RouterOS version were you on?

I believe either 7.1.0 or 7.1.1 stable. But not 100% sure on that. I'm new to these mikrotik's and their versioning channels confuse me.

1 Like

You should be creat4 a static ip adress with tinypxe for flash :wink: exemple 192.168.1.10

Noticed that the cpufreq driver isn't enabled in the cortexa72 subtarget. Have submitted a PR to rectify this.

I was wondering if there is a reason why "ARM64 Accelerated Cryptographic Algorithms" are disabled? Would we not see benefit in crypto performance if they were enabled?

2 Likes

@hibby50 I'm completely puzzled, but with the latest ELF image (hash you shared) I got it to boot through just fine - from the first time :person_facepalming:.

@robimarko I'm new to NAND, could you tell me which image I should flash from the ramdisk? I built with your 5.15 patches and I got the following NAND specific images.

-rw-r--r-- 1 user group  13M 13 feb 13:18 openwrt-mvebu-cortexa72-mikrotik_rb5009-squashfs-nand-factory.ubi
-rw-r--r-- 1 user group  12M 13 feb 13:18 openwrt-mvebu-cortexa72-mikrotik_rb5009-squashfs-nand-sysupgrade.bin

I figured I could use the sysupgrade image since /proc/mtd showed a UBI device (mtd0), but Openwrt thought differently:

# cat /sys/firmware/mikrotik/soft_config/boot_device 
eth flasheth ethonce [flash] cfg cfgonce 
root@OpenWrt:/tmp# sysupgrade openwrt-mvebu-cortexa72-mikrotik_rb5009-squashfs-nand-sysupgrade.bin 
Cannot save config while running from ramdisk.
Fri Jul  4 11:47:44 UTC 2104 upgrade: Commencing upgrade. Closing all shell sessions.
Command failed: Connection failed
root@OpenWrt:/tmp# Connection to 192.168.1.1 closed by remote host.

I reckon it went sideways on the 'Command failed' :stuck_out_tongue: . It rebooted, but it seems to be bootlooping. Should I first write the factory UBI image? I'm unfamiliar with NAND/UBI :frowning: .

1 Like

Its not ready for flashing at all, I am not at that stage so please dont flash any of them.

It needs more love

2 Likes

Oh! Then I'll install adron's image. Thanks.

Edit: I'm seeing the 'Command failed' message on the NOR image as well. So it's not limited to the NAND images.

Something else to add here. I am noticing that when cold booting, the initial time is one of a range of values in the year 2020, 2065 or 2099. The values are repeatable, though not sure if other users will get the same or different values. Some examples:

[ 1.278655] armada38x-rtc f2284000.rtc: setting system clock to 2020-08-19T15:02:19 UTC (1597849339)

[ 1.278418] armada38x-rtc f2284000.rtc: setting system clock to 2065-11-29T09:25:22 UTC (3026712322)

[ 1.281120] armada38x-rtc f2284000.rtc: setting system clock to 2099-12-07T10:37:54 UTC (4100323074)

adron's initramfs:
[ 10.559771] armada38x-rtc f2284000.rtc: setting system clock to 2104-03-29T15:25:41 UTC (4236247541)

adron's sysupgrade:
[ 1.282628] armada38x-rtc f2284000.rtc: setting system clock to 2104-03-29T15:30:44 UTC (4236247844)

For values in the past its not a big deal. For values in the future it is causing problems, eg with collectd/rrdtool, once the time is corrected.

2 Likes

I'm seeing this on the sysupgrade image:

root@OpenWrt:~# dmesg |grep rtc
[    1.277463] armada38x-rtc f2284000.rtc: registered as rtc0
[    1.282996] armada38x-rtc f2284000.rtc: setting system clock to 2036-06-15T07:44:47 UTC (2097128687)

has anyone found any info in the original firmware that could suggest that a version of this router with integrated wifi could be released one day? it would be really perfect with a wifi 6.

sorry for the off topic :sweat_smile:

2 Likes

I think if you start reading the topic all the way from the top that people mentioned this might be possible, since the board layout is such that MikroTik might provide versions with wireless in the future.

I saw this info, but it's not because there's room for it that Mikrotik plans to do it. A trace in the firmware, in a config file, etc would be a more reliable indication