MikroTik RouterBOARD RB5009UG+S+IN

From TechInfoDepot
Jump to navigationJump to search
MikroTik RB5009UG+S+in
Homepage Product page
3rd Party Firmware
dd-wrt Status Unknown
OpenWrt Partial Support
Tomato any flavor Incompatible
Gargoyle Status Unknown
Platform
Brand • Model • Rev MikroTik RB5009UG+S+IN
Type router
CPU1 checkY Marvell 88F7040
CPU1 Type ARMv8 Cortex-A72
CPU1 Speed 1.4 GHz ( 4 cores ) 64-bit
Flash1 Chip Brand? Model?
Flash1 Size 1 GiB 1,024 MiB <br />1,073,741,824 B <br />8,388,608 Kib <br />1,048,576 KiB <br />8,192 Mib <br /> (NAND)
Flash2 Size 16 MiB16,777,216 B <br />131,072 Kib <br />16,384 KiB <br />128 Mib <br />0.0156 GiB <br /> (SPI-NOR)
RAM1 Size 1 GiB 1,024 MiB <br />1,073,741,824 B <br />8,388,608 Kib <br />1,048,576 KiB <br />8,192 Mib <br /> (DDR4)
RAM1 Chip Brand? Model?
ETH chip1 Marvell 88F7040
ETH chip2 Marvell 88E6393X
ETH chip3 Qualcomm QCA8081
Switch Marvell 88F7040
Ethernet Port Count 1-2.5GbE-WAN
7-1GbE-LAN
Wired Standard IEEE 802.3i/3u/3ab/3bz
Stock bootloader RouterBOOT
Stock FW OS Linux 5.10.118
Expansion IF types USB 3.0, SPF+
USB ports 1
SFP ports 1
USB Hub Compatible Untested
Power 24 VDC, 1.5 A
Connector type barrel
Serial Port (UART) yes, (115200 8N1)
Other
3rd Party Firmware Support OpenWrt • (List | Dev | DLs)
Retail
(Est.) release date 28 October 2021
ASIN B09GW641SL
Physical
Dimensions 19.69 x 19.69 x 11.02 inches
Weight 14.1 ounces

For a list of all currently documented Marvell chipsets with specifications, see Marvell.
For a list of all currently documented Qualcomm chipsets with specifications, see Qualcomm.

For a list of all currently documented MikroTik devices with specifications, see MikroTik.

Flashing

Flashing OpenWrt

Target: mvebu
Subtarget: cortexa72
Package architecture: aarch64_cortex-a72
Supported Since Commit
Support started version: 24.10.0
Current supported version: 25.12.4
Unsupported Functions:
QCA8081 2.5 Gbps capability on 5.10 (22.03)
LAN Hardware: Marvell 88E6393X
LAN Comment: Qualcomm Atheros QCA8081 2.5Gbe Phy, PoE-in on port 1
WLAN Hardware: none
WLAN Comment: No WLAN
Installation method(s):
Mikrotik TFTP
Install Comment:
Needs hacked RouterBOOT
Recovery Comment:
Mikrotik TFTP
Comment:
See https://github.com/adron-s/openwrt-rb5009#readme
git • >>
mvebu: add support for RB5009UG+S+IN
This patch adds support for Mikrotik RB5009UG+S+IN.

Specifications:
  - SoC: Marvell Armada 7040 (88F7040) - 4 cores, ARMv8 Cortex-A72, 1.4GHz, 64bit
  - RAM: 1024MB DDR4
  - Flash: 16MB SPI NOR flash, 1024MB NAND
  - Ethernet:
  	* Marvell 88E6393X - Amethyst:
  	* one 2.5G RJ45 port via Qualcomm QCA8081 PHY
  	* seven 1G RJ45 ports via built-in PHY-s
  	* one 10G SFP+ cage
  	* All ports share the same 10G switch uplink to the CPU
  - LED: User, SFP, Hdr1, Hdr2
  - Buttons: Reset
  - UART: 115200 8n1 on the MikroTik 16 pin header
  - USB: One USB3 port
  - Power: 24-57 V via
  	* DC jack
  	* 802.3af/at PoE on Ethernet 1
  	* 2-pin terminal on the side

16 Pin header pinout:
1   GND Vcc  RX  ?  GND
   #--------------------#
   |.-. .-. .-. .-. .-. |
   |'-' '-' '-' '-' '-' |
   |.-. .-. .-. .-. .-. |
   |'-' '-' '-' '-' '-' |
   #--------------------#
2   CLK  DO /CS  TX  DI

Do note that the default RouterBoot has disabled UART even when the
required hard-config bit is set to indicate UART support.
Patched RouterBoot must be used if UART is desired.

Also, since ARM64 Linux support does not support in any way appending the
DTB to the kernel image we use mainline U-Boot with added RB5009 support
in order to boot OpenWrt.
MikroTik uses YAFFS to store the boot kernel and we use YAFUT to put U-Boot
as the kernel which RouterBoot then simply boots as an ELF.

Install instructions:

NOTE: In case you are using an existing out of tree version of OpenWrt make
sure to reinstall RouterOS via Netinstall to return the expected partition
layout.

1. Prepare FAT or EXT4 formatted USB drive with OpenWrt initramfs:
* Copy bin/targets/mvebu/cortexa72/openwrt-mvebu-cortexa72-mikrotik_rb5009-initramfs-uImage.itb
to the root of FAT or EXT4 formatted USB drive.
* Plug in the drive to the RB5009 USB port

2. Boot the modified OpenWrt built U-Boot ELF:
u-boot.elf from bin/targets/mvebu/cortexa72/u-boot-rb5009/u-boot.elf

Consult OpenWrt wiki for common instructions on switching to boot from
Ethernet once as well as serving the file:
https://openwrt.org/toh/mikrotik/common

Once U-Boot is booted it will attempt to boot in the following order:
1. NAND
2. USB
3. Network

NAND is expected to fail but USB or Networking need to serve the OpenWrt
initramfs image and after booting it will be accessible from LAN ports
on the default 192.168.1.1 IP with default credentials.

3. Flash modified RouterBoot that enables UART (Optional but recommended):
https://public.robimarko.eu/RB5009/70x0-7.15-uart.fwf

* Copy the file over to the booted OpenWrt initramfs to /tmp
* Run: mtd erase RouterBOOT-primary
* Run: mtd write /tmp/70x0-7.15-uart.fwf RouterBOOT-primary

4. Install U-Boot to boot OpenWrt:
* Copy the u-boot.elf from bin/targets/mvebu/cortexa72/u-boot-rb5009/u-boot.elf
to OpenWrt initramfs to /tmp.
* Run: . /lib/functions.sh
* Run: yafut -d /dev/mtd$(find_mtd_index "YAFFS") -w -i /tmp/u-boot.elf -o kernel -T
This will use yafut to copy the U-Boot as kernel in YAFFS so that RouterBoot boots it.

5. Wipe the NAND UBI partition:
* Run: ubiformat /dev/mtd$(find_mtd_index "ubi") -y
This will prepare the existing RouterOS rootfs partition for OpenWrt.

6. Flash OpenWrt:
* Copy the bin/targets/mvebu/cortexa72/openwrt-mvebu-cortexa72-mikrotik_rb5009-squashfs-sysupgrade.bin
to OpenWrt initramfs to /tmp.
* Run: sysupgrade /tmp/openwrt-mvebu-cortexa72-mikrotik_rb5009-squashfs-sysupgrade.bin

Device will reboot, boot U-Boot and then OpenWrt.

Recovery:

In case you need to reinstall OpenWrt if it crashes after U-Boot, there is
a recovery mechanism in OpenWrt to boot the OpenWrt initramfs.
You need to hold the reset button while U-Boot is booting and then it will
boot the OpenWrt initramfs from:
1. USB
2. Networking

In recovery mode U-Boot will light all of the LED-s except for the switch
ones.

In case you want to return to RouterOS, you can simply do that via
Netinstall like on any other MikroTik board.

Credits also go to Serhii Serhieiev who origininally
figured out the RouterBoot modification for UART, the missing 10G MVPP2
support in U-Boot as well as the custom aux loader to boot directly via
RouterBoot.