Add support for MikroTik RB5009UG

Interesting new home lab router from Mikrotik, the RB5009UG:

Would be nice if we can get OpenWrt support for that device.

4 Likes

Looking forward to this one.

The SoC and switch are maintained in Linux:

The Mikrotik promo video shows board shots which look like there are UART pads (top left) and an SPI-NOR chip (which usually holds the RouterBOOTs, hard & soft configs, and a DTB). The 7.1b6 arm64 firmware has a 70x0*fwf, but device will likely have no-uart set in the hard_config, so no RouterBOOT console without changing that bit on NOR.

Expecting to have to patch Linux to load our DTB from an ELF section, or use an additional bootloader.

I will not be able to get one of these for two months. When someone gets one, a dump of the SPI-NOR chip (mostly for DTB), and a dmesg (or supout) will get us started.

4 Likes

Also interested in. I will order it myself in a month. With a boot loader, I think we'll come up with something. Perhaps I am porting my ipq-aux-loader to it.

1 Like

I wonder if this processor can do SQM at 1gbps.

RB5009 is just been delivered to me. It looks very cool. Unfortunately, I will have free time to work on it only a month later.

2 Likes

I decided to do some small research on RB5009. After six hours of digging, I managed to jailbreak the RouterOS and get the root console. Here is a ready to use jailbreak:

jailbreak

https://github.com/adron-s/mtik_initrd_hacks/blob/master/ready-kernels/kernel-new-7.1b4-arm64.elf and https://github.com/adron-s/mtik_initrd_hacks/tree/master/for_ftp_upload/pub)

extracted and decompiled DTS.

In total, we have the following:

/dev/mtdblock2  contains:
  Hard config at 0xaf000
  Soft config at 0xc0000
  DTS config at 0xd0000

GPIOs:
  gpio 60 as button
  gpio 91 as all-leds
  gpio 90 as user-led
  gpio 89 as sfp-led
  gpio 87 as usb-power-off

dmesg 
[    0.000000] Booting Linux on physical CPU 0x0000000000 [0x410fd081]
[    0.000000] Linux version 5.6.3 (build@builder) (gcc version 11.1.0 (GCC)) #17 SMP Mon Sep 20 07:31:44 UTC 2021
[    0.000000] Machine model: RB5009
[    0.000000] On node 0 totalpages: 16096
[    0.000000]   DMA zone: 16 pages used for memmap
[    0.000000]   DMA zone: 0 pages reserved
[    0.000000]   DMA zone: 16096 pages, LIFO batch:3
[    0.000000] psci: probing for conduit method from DT.
[    0.000000] psci: PSCIv1.1 detected in firmware.
[    0.000000] psci: Using standard PSCI v0.2 function IDs
[    0.000000] psci: Trusted OS resident on physical CPU 0x0
[    0.000000] psci: SMC Calling Convention v1.1
[    0.000000] WARNING: x1-x3 nonzero in violation of boot protocol:
[    0.000000]  x1: 0000000000000000
[    0.000000]  x2: 0000000000000006
[    0.000000]  x3: 000000000000000f
[    0.000000] This indicates a broken bootloader or old kernel
[    0.000000] percpu: Embedded 2 pages/cpu s40024 r32768 d58280 u131072
[    0.000000] pcpu-alloc: s40024 r32768 d58280 u131072 alloc=2*65536
[    0.000000] pcpu-alloc: [0] 0 [0] 1 [0] 2 [0] 3 
[    0.000000] Detected PIPT I-cache on CPU0
[    0.000000] CPU features: kernel page table isolation disabled by kernel configuration
[    0.000000] spectrev2 mitigation disabled by kernel configuration
[    0.000000] Speculative Store Bypass Disable mitigation not required
[    0.000000] CPU features: detected: ARM erratum 1319367
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 16080
[    0.000000] Kernel command line: root=/dev/ram0 no-uart no-buzzer benand_no_swecc=2 yaffs.inband_tags=1 parts=1 boot_part_size=8388608 arm64=Y board=5009 ver=7.1rc4 bver=7.0.5 hw_opt=00180005 boot=1 mlc=11
[    0.000000] Dentry cache hash table entries: 131072 (order: 4, 1048576 bytes, linear)
[    0.000000] Inode-cache hash table entries: 65536 (order: 3, 524288 bytes, linear)
[    0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[    0.000000] Memory: 1016704K/1030144K available (4862K kernel code, 1012K rwdata, 1344K rodata, 384K init, 733K bss, 13440K reserved, 0K cma-reserved)
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
[    0.000000] rcu: Hierarchical RCU implementation.
[    0.000000] rcu:     RCU restricting CPUs from NR_CPUS=16 to nr_cpu_ids=4.
[    0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 10 jiffies.
[    0.000000] rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=4
[    0.000000] NR_IRQS: 64, nr_irqs: 64, preallocated irqs: 0
[    0.000000] GIC: Adjusting CPU interface base to 0x00000000f022f000
[    0.000000] GIC: Using split EOI/Deactivate mode
[    0.000000] GICv2m: DT overriding V2M MSI_TYPER (base:160, num:32)
[    0.000000] GICv2m: range[mem 0xf0280000-0xf0280fff], SPI[160:191]
[    0.000000] GICv2m: DT overriding V2M MSI_TYPER (base:192, num:32)
[    0.000000] GICv2m: range[mem 0xf0290000-0xf0290fff], SPI[192:223]
[    0.000000] GICv2m: DT overriding V2M MSI_TYPER (base:224, num:32)
[    0.000000] GICv2m: range[mem 0xf02a0000-0xf02a0fff], SPI[224:255]
[    0.000000] GICv2m: DT overriding V2M MSI_TYPER (base:256, num:32)
[    0.000000] GICv2m: range[mem 0xf02b0000-0xf02b0fff], SPI[256:287]
[    0.000000] arch_timer: cp15 timer(s) running at 25.00MHz (phys).
[    0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x5c40939b5, max_idle_ns: 440795202646 ns
[    0.000003] sched_clock: 56 bits at 25MHz, resolution 40ns, wraps every 4398046511100ns
[    0.000108] Calibrating delay loop (skipped), value calculated using timer frequency.. 50.00 BogoMIPS (lpj=250000)
[    0.000116] pid_max: default: 32768 minimum: 301
[    0.000198] Mount-cache hash table entries: 8192 (order: 0, 65536 bytes, linear)
[    0.000217] Mountpoint-cache hash table entries: 8192 (order: 0, 65536 bytes, linear)
[    0.001253] rcu: Hierarchical SRCU implementation.
[    0.001504] mem dump base table DT node does not exist
[    0.001714] smp: Bringing up secondary CPUs ...
[    0.002127] Detected PIPT I-cache on CPU1
[    0.002168] CPU1: Booted secondary processor 0x0000000001 [0x410fd081]
[    0.002616] Detected PIPT I-cache on CPU2
[    0.002647] CPU2: Booted secondary processor 0x0000000100 [0x410fd081]
[    0.003079] Detected PIPT I-cache on CPU3
[    0.003101] CPU3: Booted secondary processor 0x0000000101 [0x410fd081]
[    0.003147] smp: Brought up 1 node, 4 CPUs
[    0.003152] SMP: Total of 4 processors activated.
[    0.003157] CPU features: detected: 32-bit EL0 Support
[    0.003160] CPU features: detected: CRC32 instructions
[    0.004423] CPU: All CPU(s) started at EL2
[    0.004458] alternatives: patching kernel code
[    0.004847] devtmpfs: initialized
[    0.006752] random: get_random_u32 called from _stext+0x1e5ca4/0x4b4e0c with crng_init=0
[    0.006950] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.006960] futex hash table entries: 1024 (order: 0, 65536 bytes, linear)
[    0.007053] pinctrl core: initialized pinctrl subsystem
[    0.007213] thermal_sys: Registered thermal governor 'step_wise'
[    0.007559] NET: Registered protocol family 16
[    0.007795] DMA: preallocated 256 KiB pool for atomic allocations
[    0.007952] NET: Registered protocol family 42
[    0.008099] hw-breakpoint: found 6 breakpoint and 4 watchpoint registers.
[    0.008148] ASID allocator initialised with 65536 entries
[    0.008242] Read of property:soc_version_minor from node failed
[    0.008245] Read of property:soc_version_major from node failed
[    0.008248] Read of property:cpu_type from node failed
[    0.008252] CPU: unavail, SoC Version: 4294967295.4294967295
[    0.008299] Initializing Peripheral Bus System - PBS
[    0.008349] pbs entry was not found in device-tree
[    0.016817] pps_core: LinuxPPS API ver. 1 registered
[    0.016823] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    0.016831] PTP clock support registered
[    0.017392] clocksource: Switched to clocksource arch_sys_counter
[    0.018089] NET: Registered protocol family 2
[    0.018343] tcp_listen_portaddr_hash hash table entries: 4096 (order: 0, 65536 bytes, linear)
[    0.018402] TCP established hash table entries: 8192 (order: 0, 65536 bytes, linear)
[    0.018443] TCP bind hash table entries: 8192 (order: 1, 131072 bytes, linear)
[    0.018532] TCP: Hash tables configured (established 8192 bind 8192)
[    0.018580] UDP hash table entries: 2048 (order: 0, 65536 bytes, linear)
[    0.018638] UDP-Lite hash table entries: 2048 (order: 0, 65536 bytes, linear)
[    0.018769] PCI: CLS 0 bytes, default 64
[    0.018848] Unpacking initramfs...
[    0.224565] Freeing initrd memory: 1024K
[    0.224917] hw perfevents: unable to count PMU IRQs
[    0.224927] hw perfevents: /ap806/config-space@f0000000/pmu: failed to register PMU devices!
[    0.225395] workingset: timestamp_bits=62 max_order=14 bucket_order=0
[    0.228156] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.228160] jffs2: version 2.2. (NAND) (SUMMARY)  © 2001-2006 Red Hat, Inc.
[    0.228342] yaffs: yaffs Installing.
[    0.238302] io scheduler mq-deadline registered
[    0.239398] armada-ap806-pinctrl f06f4000.system-controller:pinctrl: registered pinctrl driver
[    0.239959] armada-cp110-pinctrl f2440000.system-controller:pinctrl: registered pinctrl driver
[    0.240331] gpio gpiochip0: (f06f4000.system-controller:gpio@1040): created GPIO range 0->19 ==> f06f4000.system-controller:pinctrl PIN 0->19
[    0.240430] gpio gpiochip0: (f06f4000.system-controller:gpio@1040): added GPIO chardev (254:0)
[    0.240457] gpiochip_setup_dev: registered GPIOs 0 to 19 on device: gpiochip0 (f06f4000.system-controller:gpio@1040)
[    0.240649] gpio gpiochip1: (f2440000.system-controller:gpio@100): created GPIO range 0->31 ==> f2440000.system-controller:pinctrl PIN 0->31
[    0.240719] gpio gpiochip1: (f2440000.system-controller:gpio@100): added GPIO chardev (254:1)
[    0.240741] gpiochip_setup_dev: registered GPIOs 32 to 63 on device: gpiochip1 (f2440000.system-controller:gpio@100)
[    0.240959] gpio gpiochip2: (f2440000.system-controller:gpio@140): created GPIO range 0->30 ==> f2440000.system-controller:pinctrl PIN 32->62
[    0.241028] gpio gpiochip2: (f2440000.system-controller:gpio@140): added GPIO chardev (254:2)
[    0.241050] gpiochip_setup_dev: registered GPIOs 64 to 94 on device: gpiochip2 (f2440000.system-controller:gpio@140)
[    0.242944] NET: Registered protocol family 27
[    0.242949] IPC_RTR: ipc_router_create_log_ctx: IPC Logging disabled
[    0.242953] qmi_log_init: IPC Logging disabled
[    0.242955] qmi_log_init: IPC Logging disabled
[    0.243280] Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled
[    0.243865] msm_serial: driver initialized
[    0.244059] omap_rng f2760000.trng: Random Number Generator ver. 203b34c
[    0.244772] loop: module loaded
[    0.245380] NAND: 4 ECC bits => use MLC ecc
[    0.245386] nand: device found, Manufacturer ID: 0xc2, Chip ID: 0xd3
[    0.245389] nand: Macronix MX60LF8G18AC
[    0.245393] nand: 1024 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64
[    0.245405] Scanning device for bad blocks
[    5.961290] Bad eraseblock 3077 at 0x0000180a0000
[    6.581096] Bad eraseblock 3393 at 0x00001a820000
[    9.485487] Bad eraseblock 4871 at 0x0000260e0000
[   14.770802] Bad eraseblock 7560 at 0x00003b100000
[   14.983630] Bad eraseblock 7669 at 0x00003bea0000
[   16.009980] rb_nand_register_partitions(mtd);
[   16.010001] 2 fixed-partitions partitions found on MTD device main-storage
[   16.010004] Creating 2 MTD partitions on "main-storage":
[   16.010009] 0x000000000000-0x000000800000 : "RouterBoard NAND Boot"
[   16.010442] 0x000000800000-0x000040000000 : "RouterBoard NAND Main"
[   16.012738] orion_spi f0510600.spi: controller is unqueued, this is deprecated
[   16.012950] spi-nor spi0.0: found w25q128jv, expected m25p80
[   16.013142] spi-nor spi0.0: w25q128jv (16384 Kbytes)
[   16.013153] 1 fixed-partitions partitions found on MTD device spi0.0
[   16.013156] Creating 1 MTD partitions on "spi0.0":
[   16.013161] 0x000000000000-0x000000100000 : "RouterBoot"
[   16.013784] orion_spi f2700680.spi: controller is unqueued, this is deprecated
[   16.014220] mdio_bus fixed-0: GPIO lookup for consumer reset
[   16.014225] mdio_bus fixed-0: using lookup tables for GPIO lookup
[   16.014230] mdio_bus fixed-0: No GPIO consumer reset found
[   16.014243] libphy: Fixed MDIO Bus: probed
[   16.014247] cnss: INFO: IPC Logging is disabled!
[   16.014537] mv64xxx_i2c f2701000.i2c: GPIO lookup for consumer mux-rst
[   16.014541] mv64xxx_i2c f2701000.i2c: using device tree for GPIO lookup
[   16.014554] of_get_named_gpiod_flags: can't parse 'mux-rst-gpios' property of node '/cp0/config-space/i2c@701000[0]'
[   16.014564] of_get_named_gpiod_flags: can't parse 'mux-rst-gpio' property of node '/cp0/config-space/i2c@701000[0]'
[   16.014569] mv64xxx_i2c f2701000.i2c: using lookup tables for GPIO lookup
[   16.014573] mv64xxx_i2c f2701000.i2c: No GPIO consumer mux-rst found
[   16.014983] armada_thermal f06f8000.system-controller:thermal-sensor@80: IRQ index 0 not found
[   16.027434] armada_thermal f06f8000.system-controller:thermal-sensor@80: Thermal sensor 1 unavailable
[   16.027463] armada_thermal f06f8000.system-controller:thermal-sensor@80: Thermal sensor 2 unavailable
[   16.027491] armada_thermal f06f8000.system-controller:thermal-sensor@80: Thermal sensor 3 unavailable
[   16.027519] armada_thermal f06f8000.system-controller:thermal-sensor@80: Thermal sensor 4 unavailable
[   16.027523] armada_thermal f06f8000.system-controller:thermal-sensor@80: Overheat interrupt not available
[   16.027632] armada_thermal f2400000.system-controller:thermal-sensor@70: IRQ index 0 not found
[   16.028678] armada_thermal f2400000.system-controller:thermal-sensor@70: Overheat interrupt not available
[   16.028943] sbsa-gwdt f0610000.watchdog: Initialized with 10s timeout @ 25000000 Hz, action=0.
[   16.029470] of_get_named_gpiod_flags: parsed 'gpios' property of node '/cp0/config-space/leds/button[0]' - status (0)
[   16.029567] Registered gpio 60 as button
[   16.029583] of_get_named_gpiod_flags: parsed 'gpios' property of node '/cp0/config-space/leds/all-leds[0]' - status (0)
[   16.029645] Registered gpio 91 as all-leds
[   16.029681] of_get_named_gpiod_flags: parsed 'gpios' property of node '/cp0/config-space/leds/user-led[0]' - status (0)
[   16.029723] Registered gpio 90 as user-led
[   16.029755] of_get_named_gpiod_flags: parsed 'gpios' property of node '/cp0/config-space/leds/sfp-led[0]' - status (0)
[   16.029797] Registered gpio 89 as sfp-led
[   16.029828] of_get_named_gpiod_flags: parsed 'gpios' property of node '/cp0/config-space/leds/usb-power-off[0]' - status (0)
[   16.029869] Registered gpio 87 as usb-power-off
[   16.030294] NET: Registered protocol family 17
[   16.030878] hw perfevents: enabled with armv8_cortex_a72 PMU driver, 7 counters available
[   16.030997] armada8k-pcie f2600000.pcie: No available PHY
[   16.031062] armada8k-pcie f2600000.pcie: host bridge /cp0/pcie@600000 ranges:
[   16.031082] armada8k-pcie f2600000.pcie:       IO 0x00f9000000..0x00f900ffff -> 0x00f9000000
[   16.031094] armada8k-pcie f2600000.pcie:      MEM 0x00f6000000..0x00f6efffff -> 0x00f6000000
[   17.027390] armada8k-pcie f2600000.pcie: Phy link never came up
[   17.027395] armada8k-pcie f2600000.pcie: Link not up after reconfiguration
[   17.027450] armada8k-pcie f2600000.pcie: PCI host bridge to bus 0000:00
[   17.027457] pci_bus 0000:00: root bus resource [bus 00-ff]
[   17.027463] pci_bus 0000:00: root bus resource [io  0x0000-0xffff] (bus address [0xf9000000-0xf900ffff])
[   17.027467] pci_bus 0000:00: root bus resource [mem 0xf6000000-0xf6efffff]
[   17.027488] pci 0000:00:00.0: [11ab:0110] type 01 class 0x060400
[   17.027511] pci 0000:00:00.0: reg 0x10: [mem 0x00000000-0x000fffff]
[   17.027571] pci 0000:00:00.0: supports D1 D2
[   17.027575] pci 0000:00:00.0: PME# supported from D0 D1 D3hot
[   17.028382] pci 0000:00:00.0: bridge configuration invalid ([bus 00-00]), reconfiguring
[   17.029126] pci_bus 0000:01: busn_res: [bus 01-ff] end is updated to 01
[   17.029140] pci 0000:00:00.0: BAR 0: assigned [mem 0xf6000000-0xf60fffff]
[   17.029147] pci 0000:00:00.0: PCI bridge to [bus 01]
[   17.285442] armada8k-pcie f2620000.pcie: No available PHY
[   17.285501] armada8k-pcie f2620000.pcie: host bridge /cp0/pcie@620000 ranges:
[   17.285519] armada8k-pcie f2620000.pcie:       IO 0x00f9010000..0x00f901ffff -> 0x00f9010000
[   17.285530] armada8k-pcie f2620000.pcie:      MEM 0x00f7000000..0x00f7efffff -> 0x00f7000000
[   18.277389] armada8k-pcie f2620000.pcie: Phy link never came up
[   18.277394] armada8k-pcie f2620000.pcie: Link not up after reconfiguration
[   18.277440] armada8k-pcie f2620000.pcie: PCI host bridge to bus 0001:00
[   18.277445] pci_bus 0001:00: root bus resource [bus 00-ff]
[   18.277451] pci_bus 0001:00: root bus resource [io  0x10000-0x1ffff] (bus address [0xf9010000-0xf901ffff])
[   18.277456] pci_bus 0001:00: root bus resource [mem 0xf7000000-0xf7efffff]
[   18.277473] pci 0001:00:00.0: [11ab:0110] type 01 class 0x060400
[   18.277492] pci 0001:00:00.0: reg 0x10: [mem 0x00000000-0x000fffff]
[   18.277550] pci 0001:00:00.0: supports D1 D2
[   18.277554] pci 0001:00:00.0: PME# supported from D0 D1 D3hot
[   18.278331] pci 0001:00:00.0: bridge configuration invalid ([bus 00-00]), reconfiguring
[   18.279072] pci_bus 0001:01: busn_res: [bus 01-ff] end is updated to 01
[   18.279083] pci 0001:00:00.0: BAR 0: assigned [mem 0xf7000000-0xf70fffff]
[   18.279089] pci 0001:00:00.0: PCI bridge to [bus 01]
[   18.535362] armada8k-pcie f2640000.pcie: No available PHY
[   18.535437] armada8k-pcie f2640000.pcie: host bridge /cp0/pcie@640000 ranges:
[   18.535456] armada8k-pcie f2640000.pcie:       IO 0x00f9020000..0x00f902ffff -> 0x00f9020000
[   18.535467] armada8k-pcie f2640000.pcie:      MEM 0x00f8000000..0x00f8efffff -> 0x00f8000000
[   19.527389] armada8k-pcie f2640000.pcie: Phy link never came up
[   19.527393] armada8k-pcie f2640000.pcie: Link not up after reconfiguration
[   19.527440] armada8k-pcie f2640000.pcie: PCI host bridge to bus 0002:00
[   19.527446] pci_bus 0002:00: root bus resource [bus 00-ff]
[   19.527452] pci_bus 0002:00: root bus resource [io  0x20000-0x2ffff] (bus address [0xf9020000-0xf902ffff])
[   19.527456] pci_bus 0002:00: root bus resource [mem 0xf8000000-0xf8efffff]
[   19.527473] pci 0002:00:00.0: [11ab:0110] type 01 class 0x060400
[   19.527493] pci 0002:00:00.0: reg 0x10: [mem 0x00000000-0x000fffff]
[   19.527550] pci 0002:00:00.0: supports D1 D2
[   19.527554] pci 0002:00:00.0: PME# supported from D0 D1 D3hot
[   19.528329] pci 0002:00:00.0: bridge configuration invalid ([bus 00-00]), reconfiguring
[   19.529066] pci_bus 0002:01: busn_res: [bus 01-ff] end is updated to 01
[   19.529076] pci 0002:00:00.0: BAR 0: assigned [mem 0xf8000000-0xf80fffff]
[   19.529083] pci 0002:00:00.0: PCI bridge to [bus 01]
[   19.785483] Warning: unable to open an initial console.
[   19.785574] Freeing unused kernel memory: 384K
[   19.785587] Run /init as init process
[   19.785590]   with arguments:
[   19.785592]     /init
[   19.785595]     no-uart
[   19.785597]     no-buzzer
[   19.785599]   with environment:
[   19.785602]     HOME=/
[   19.785604]     TERM=linux
[   19.785607]     parts=1
[   19.785609]     arm64=Y
[   19.785611]     board=5009
[   19.785613]     ver=7.1rc4
[   19.785616]     bver=7.0.5
[   19.785618]     hw_opt=00180005
[   19.785620]     boot=1
[   19.787062] process '/oldinit' started with executable stack
[   19.788024] yaffs: dev is 32505857 name is "mtdblock1" rw
[   19.788028] yaffs: passed flags ""
[   19.788033] yaffs: yaffs: Attempting MTD mount of 31.1,"mtdblock1"
[   19.788036] yaffs: auto selecting yaffs2
[   19.950338] yaffs: yaffs_read_super: is_checkpointed 1
[   19.951703] yaffs: dev is 32505856 name is "mtdblock0" rw
[   19.951707] yaffs: passed flags ""
[   19.951710] yaffs: yaffs: Attempting MTD mount of 31.0,"mtdblock0"
[   19.951713] yaffs: auto selecting yaffs2
[   19.954907] yaffs: yaffs_read_super: is_checkpointed 1
[   23.201166] new-flash: starting...
[   23.201175] using MTD device
[   23.205975] HW_OPT[00180005]
[   23.205978] board name = RB5009UG+S+
[   23.205980] market name = 
[   23.205984] alloc spi_page_buf size = 4096
[   23.215973] WARN: missing /reserved-memory/panics
[   23.234438] NET: Registered protocol family 1
[   23.256372] logring: default buf size:65536, console_loglevel:1
[   23.264124] printk: console [logring0] enabled
[   23.318797] NET: Registered protocol family 10
[   23.319221] Segment Routing with IPv6
[   23.444748] nf_conntrack: table size 1015808 (4 * 253952)
[   23.470823] skb_bin_update_max_len: 0->1664
[   23.471004] gre: register ipv4
[   23.471014] gre: register ipv6
[   23.484231] sizeof(struct phy):680
[   23.502064] bridge: filtering via arp/ip/ip6tables is no longer available by default. Update your scripts to load br_netfilter if you need this.
[   23.507416] nand id 95d1d3c2 0000005a
[   23.507551] uid->nand_id 1870ef
[   23.507671] spi unique id 21585223845c60e4
[   23.844518] Initializing XFRM netlink socket
[   23.859778] NET: Registered protocol family 15
[   23.860312] random: ipsec: uninitialized urandom read (32 bytes read)
[   23.905981] random: net: uninitialized urandom read (3 bytes read)
[   23.905998] random: net: uninitialized urandom read (1024 bytes read)
[   23.909132] crypto-safexcel f2800000.crypto: EIP197:241(0,1,4,4)-HIA:230(2,6,6),PE:133/332,alg:7ffdf000
[   23.955277] rb: starting...
[   23.959180] rb: started
[   23.959665] rb_ioctl, cmd: 0x520f, arg: 0x0
[   23.959673] rb: RB_GET_TYPE
[   23.959952] rb_ioctl, cmd: 0x5201, arg: 0x0
[   23.959962] rb: RB_CFG_SIZE
[   23.960032] rb_ioctl, cmd: 0x5203, arg: 0x77f22640
[   23.960038] rb: RB_READ_CFG
[   23.965418] crypto-safexcel f2800000.crypto: TRC init: 15360d,80a (48r,256h)
[   23.966284] rb_ioctl, cmd: 0x5202, arg: 0x0
[   23.966291] rb: RB_INFO_SIZE
[   23.966302] rb_ioctl, cmd: 0x5204, arg: 0x77f23650
[   23.966307] rb: RB_READ_INFO
[   23.977995] probe_er_radio_data chunkid 3 caldataid 3
[   24.044708] usbcore: registered new interface driver usbfs
[   24.044744] usbcore: registered new interface driver hub
[   24.044808] usbcore: registered new device driver usb
[   24.071234] flash: writing cfg id = 23, size = 4
[   24.071651] xhci-hcd f2510000.usb3: xHCI Host Controller
[   24.071675] xhci-hcd f2510000.usb3: new USB bus registered, assigned bus number 1
[   24.071758] xhci-hcd f2510000.usb3: hcc params 0x0a000990 hci version 0x100 quirks 0x0000000000010010
[   24.071801] xhci-hcd f2510000.usb3: irq 37, io mem 0xf2510000
[   24.072149] hub 1-0:1.0: USB hub found
[   24.072173] hub 1-0:1.0: 1 port detected
[   24.072311] xhci-hcd f2510000.usb3: xHCI Host Controller
[   24.072323] xhci-hcd f2510000.usb3: new USB bus registered, assigned bus number 2
[   24.072332] xhci-hcd f2510000.usb3: Host supports USB 3.0 SuperSpeed
[   24.072378] usb usb2: We don't know the algorithms for LPM for this host, disabling LPM.
[   24.072614] hub 2-0:1.0: USB hub found
[   24.072636] hub 2-0:1.0: 1 port detected
[   24.076354] flash_ioctl: programming injected settings id 23
[   24.126707] port_node:ffff00003ffb0b18 port->id:0
[   24.127003] mvpp2 f2000000.ethernet switch0: switch0: 2c:c8:1b:ff:99:de
[   24.128761] i2c-gpio i2c-gpio: GPIO lookup for consumer sda
[   24.128771] i2c-gpio i2c-gpio: using lookup tables for GPIO lookup
[   24.128789] i2c-gpio i2c-gpio: GPIO lookup for consumer scl
[   24.128795] i2c-gpio i2c-gpio: using lookup tables for GPIO lookup
[   24.128847] i2c-gpio i2c-gpio: using lines 32 (SDA) and 33 (SCL)
[   24.128875] amethyst_reset mac:(____ptrval____)
[   24.150305] switch0: amethyst init serdes0 mode:d
[   24.150494] switch0: amethyst init serdes9 mode:a
[   24.150681] switch0: amethyst init serdes10 mode:d
[   24.171641] switch0: max_tx_buffers_per_port=112, tx_buffer_count=1024, cpu_port_count=1, stat_count=1, port_count=9, max_tx_buffers_per_pack=1, num_tx_queues:4
[   24.171659] mvpp2_probe out
[   24.187998] poe out not present
[   24.298112] switch0: open @2
[   24.300987] amethyst_reset mac:(____ptrval____)
[   24.322432] switch0: amethyst init serdes0 mode:d
[   24.322630] switch0: amethyst init serdes9 mode:a
[   24.322818] switch0: amethyst init serdes10 mode:d
[   24.345336] eth0: phy reg access: 168600ns
[   24.418676] IPv6: ADDRCONF(NETDEV_CHANGE): switch0: link becomes ready
[   24.488942] eth0: Caught tx_queue_len zero misconfig
[   24.489059] eth1: Caught tx_queue_len zero misconfig
[   24.489164] eth3: Caught tx_queue_len zero misconfig
[   24.489266] eth2: Caught tx_queue_len zero misconfig
[   24.489368] eth4: Caught tx_queue_len zero misconfig
[   24.489471] eth5: Caught tx_queue_len zero misconfig
[   24.489573] eth7: Caught tx_queue_len zero misconfig
[   24.489675] eth6: Caught tx_queue_len zero misconfig
[   24.489776] eth8: Caught tx_queue_len zero misconfig
[   25.119400] random: fast init done
[   27.779085] eth0: phy link up (1000/full)
[   27.780217] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[   33.797533] random: dhcpclient: uninitialized urandom read (4 bytes read)
[   38.119938] random: user: uninitialized urandom read (32 bytes read)
[   38.438401] rb_ioctl, cmd: 0x5212, arg: 0x0
[   38.438411] rb: RB_GET_CF_INFO
[   38.456130] random: snmp: uninitialized urandom read (4 bytes read)
[   53.939344] random: cloud: uninitialized urandom read (32 bytes read)
[  117.897372] random: crng init done


/ # uname -r
5.6.3

/ # cat /proc/mtd 
dev:    size   erasesize  name
mtd0: 00800000 00020000 "RouterBoard NAND Boot"
mtd1: 3f800000 00020000 "RouterBoard NAND Main"
mtd2: 00100000 00001000 "RouterBoot"

/ # df -h
Filesystem                Size      Used Available Use% Mounted on
tmpfs                   497.1M    384.0K    496.8M   0% /ram
devtmpfs                496.4M         0    496.4M   0% /dev
/dev/mtdRoot           1008.1M     17.1M    990.9M   2% /flash
/dev/mtdBoot              7.9M      3.6M      4.3M  46% /flash/boot
/dev/loop0               10.3M     10.3M         0 100% /
tmpfs                   497.1M         0    497.1M   0% /ram/disks

/ # cd /flash/boot/
/flash/boot # ls
VERSION     kernel      lost+found

/flash # ls
boot        lost+found  rw          var

/ # ls /sys/class/gpio/
all-leds       button         export         gpiochip0      gpiochip32     gpiochip64     sfp-led        unexport       usb-power-off  user-led

/ # cat /sys/bus/spi/devices/spi0.0/modalias 
spi:m25p80
/ # cat /sys/bus/spi/devices/spi/modalias 
spi0.0/  spi2.0/
/ # cat /sys/bus/spi/devices/spi2.0//modalias 
spi:rb-spi-poe

/ # cat /sys/bus/i2c/devices/i2c-0/name 
mv64xxx_i2c adapter
/ # cat /sys/bus/i2c/devices/i2c-1/name 
i2c-gpio-1
/ # cat /sys/bus/i2c/devices/i2c-1/device/modalias 
platform:i2c-gpio
/ # cat /sys/bus/i2c/devices/i2c-0/device/modalias 
of:Ni2cT(null)Cmarvell,mv78230-i2c

/ # lspci 
00:00.0 Class 0604: 11ab:0110
00:00.0 Class 0604: 11ab:0110
00:00.0 Class 0604: 11ab:0110
/ # lsusb 
Bus 001 Device 001: ID 1d6b:0002
Bus 002 Device 001: ID 1d6b:0003

/flash/rw # ip li ls
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: slowpath: <> mtu 0 qdisc noop qlen 1000
    link/generic 
3: tunnel: <> mtu 0 qdisc noop qlen 1000
    link/generic 
4: dap: <> mtu 0 qdisc noop qlen 1000
    link/generic 
5: br0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue qlen 1000
    link/ether f2:44:89:2c:32:47 brd ff:ff:ff:ff:ff:ff
6: switch0: <NOARP,UP,LOWER_UP> mtu 1500 qdisc noqueue 
    link/void 
7: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue qlen 1000
    link/ether 2c:c8:1b:ff:99:de brd ff:ff:ff:ff:ff:ff
8: eth1: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue qlen 1000
    link/ether 2c:c8:1b:ff:99:df brd ff:ff:ff:ff:ff:ff
9: eth2: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue qlen 1000
    link/ether 2c:c8:1b:ff:99:e0 brd ff:ff:ff:ff:ff:ff
10: eth3: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue qlen 1000
    link/ether 2c:c8:1b:ff:99:e1 brd ff:ff:ff:ff:ff:ff
11: eth4: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue qlen 1000
    link/ether 2c:c8:1b:ff:99:e2 brd ff:ff:ff:ff:ff:ff
12: eth5: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue qlen 1000
    link/ether 2c:c8:1b:ff:99:e3 brd ff:ff:ff:ff:ff:ff
13: eth6: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue qlen 1000
    link/ether 2c:c8:1b:ff:99:e4 brd ff:ff:ff:ff:ff:ff
14: eth7: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue qlen 1000
    link/ether 2c:c8:1b:ff:99:e5 brd ff:ff:ff:ff:ff:ff
15: eth8: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue qlen 1000
    link/ether 2c:c8:1b:ff:99:e6 brd ff:ff:ff:ff:ff:ff

/ # lsmod 
mvpp2 327680 0 - Live 0xffff8000013b0000
marvell_amethyst 327680 1 mvpp2, Live 0xffff800001970000
xhci_plat_hcd 262144 0 - Live 0xffff8000012f0000
xhci_hcd 327680 1 xhci_plat_hcd, Live 0xffff800001350000
usbcore 393216 2 xhci_plat_hcd,xhci_hcd, Live 0xffff800000f20000
usb_common 262144 2 xhci_plat_hcd,usbcore, Live 0xffff8000012a0000
vrf 327680 0 [permanent], Live 0xffff800001240000
rb 262144 1 - Live 0xffff8000011f0000
crypto_safexcel 327680 0 - Live 0xffff800001160000
wlan 655360 3 - Live 0xffff800001070000
sha512_generic 262144 1 crypto_safexcel, Live 0xffff800000ff0000
sha1_generic 262144 1 crypto_safexcel, Live 0xffff800000fa0000
capsmanglue 262144 1 wlan, Live 0xffff800000ed0000
af_key 327680 0 - Live 0xffff800000e70000
ticker 327680 1 - Live 0xffff800000de0000
xfrm_user 327680 0 - Live 0xffff800000b70000
libdes 262144 1 crypto_safexcel, Live 0xffff800000d90000
xfrm_algo 262144 2 af_key,xfrm_user, Live 0xffff800000d40000
ledgroup 262144 0 - Live 0xffff800000cf0000
ulog 327680 1 - Live 0xffff800000be0000
btest 327680 0 - Live 0xffff800000c90000
stm8_fan 262144 0 - Live 0xffff800000c40000
bridge2 393216 0 - Live 0xffff800000b00000
switch 327680 3 mvpp2,marvell_amethyst,bridge2, Live 0xffff800000a70000
phy_helper 262144 3 mvpp2,marvell_amethyst,switch, Live 0xffff8000009f0000
packet_hook 393216 11 mvpp2,wlan,bridge2,switch, Live 0xffff800000980000
tunnel6 262144 1 packet_hook, Live 0xffff800000930000
nf_conntrack 327680 1 packet_hook, Live 0xffff8000008d0000
jiffies 262144 37 - Live 0xffff800000880000
ipv6 589824 50 vrf,bridge2,packet_hook,[permanent], Live 0xffff8000007e0000
nf_defrag_ipv6 327680 2 nf_conntrack,ipv6, Live 0xffff800000780000
logring 327680 112 - Live 0xffff8000006f0000
unix 327680 166 - Live 0xffff800000660000
panics 327680 0 - Live 0xffff8000005d0000
flash 327680 5 mvpp2,marvell_amethyst,rb,phy_helper,panics, Live 0xffff800000540000


9 Likes

I am planning to get one as it uses fully upstream supported stuff, but they are out of stock eveywhere.

3 Likes

Similar device: https://linuxgizmos.com/marvell-7040-based-networking-sbc-features-10gbe-port-5g-and-wifi-6/

1 Like

There are plenty of OEM DTS nodes which are not relevant for this device (pcie, spi-poe, which point to future Mikrotik devices using this platform). Given the placeholder macaddr, and the chosen stdout-path in DTS, I would not be surprised if RouterBoot updates these in memory before providing the DTB to linux.

I started to look at mapping the translated OEM DTS phandles to the linux 7040 dtsi, cp0 and ap806 DTS nodes, but expect it to be very wrong at the moment (the phys, ethernet and switch are guesses).

WIP DTS starter
// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
/*
 * Based on the 7040-db DTS & Mikrotik RB5009 OEM DTB
 *
 * Device Tree file for Marvell Armada 7040 based
 * Mikrotik RB5009
 */

#include <dt-bindings/input/input.h>
#include <dt-bindings/gpio/gpio.h>
#include "armada-7040.dtsi"

/ {
	model = "Mikrotik RB5009";
	compatible = "marvell,mikrotik-rb5009", "marvell,armada7040",
		     "marvell,armada-ap806-quad", "marvell,armada-ap806";

	chosen {
		stdout-path = "serial0:115200n8";
	};

	memory@0 {
		device_type = "memory";
		reg = <0x0 0x0 0x0 0x80000000>;
	};

	aliases {
		led-boot = &led_user;
		led-failsafe = &led_user;
		led-running = &led_user;
		led-upgrade = &led_user;

		ethernet0 = &cp0_eth0;
		ethernet1 = &cp0_eth1;
		ethernet2 = &cp0_eth2;
	};

	cp0_reg_usb3_1_vbus: cp0-usb3-1-vbus {
		compatible = "regulator-fixed";
		regulator-name = "usb3h1-vbus";
		regulator-min-microvolt = <5000000>;
		regulator-max-microvolt = <5000000>;
		regulator-boot-on;
		gpios = <&cp0_gpio2 23 GPIO_ACTIVE_LOW>;
	};

	keys {
		compatible = "gpio-keys";

		reset {
			label = "reset";
			gpios = <&cp0_gpio1 28 GPIO_ACTIVE_LOW>;
			linux,code = <KEY_RESTART>;
		};
	};

	leds {
		compatible = "gpio-leds";
		pinctrl-0 = <&cp_led_pins>;
		pinctrl-names = "default";

		sfp {
			label = "green:sfp";
			gpios = <&cp0_gpio2 25 GPIO_ACTIVE_LOW>;
		};
		
		led_user: user {
			label = "blue:user";
			gpios = <&cp0_gpio2 26 GPIO_ACTIVE_LOW>;
			default-state = "keep";
			panic-indicator;
		};

/*
		all {
			gpios = <&cp0_gpio2 27 GPIO_ACTIVE_HIGH>;
		};

		usb-power-off {
			gpios = <&cp0_gpio2 23 GPIO_ACTIVE_LOW>;
		};
*/
	};
};

&smmu {
	/* Mikrotik have iommu not disabled */
	status = "okay";
};

&spi0 {
	status = "okay";

	spi-flash@0 {
		compatible = "jedec,spi-nor";
		reg = <0>;
		spi-max-frequency = <50000000>;

		partitions {
			compatible = "fixed-partitions";
			#address-cells = <1>;
			#size-cells = <1>;

			partition@0 {
				compatible = "fixed-partitions";
				#address-cells = <1>;
				#size-cells = <1>;
				label = "RouterBoot";
				reg = <0 0x100000>;

				partition@af000 {
					label = "hard_config";
					reg = <0xaf000 0x1000>;
					read-only;
				};

				partition@c0000 {
					label = "soft_config";
					reg = <0xc0000 0x1000>;
				};

				partition@d0000 {
					label = "dtb_config";
					reg = <0xd0000 0x10000>;
					read-only;
				};
			};
		};
	};
};

&uart0 {
	status = "okay";
	pinctrl-0 = <&uart0_pins>;
	pinctrl-names = "default";
};

&cp0_ethernet {
	status = "okay";
};

&cp0_eth0 {
	status = "okay";
	/* Network PHY */
	phy-mode = "10gbase-r";
	managed = "in-band-status";
	/* Generic PHY, providing serdes lanes */
	phys = <&cp0_comphy2 0>;

	fixed-link {
		speed = <10000>;
		full-duplex;
	};
};

/*from devboard DTS*/
&cp0_comphy4 {
	cp0_usbh1_con: connector {
		compatible = "usb-a-connector";
		phy-supply = <&cp0_reg_usb3_1_vbus>;
	};
};

&cp0_mdio {
	status = "okay";
	#address-cells = <1>;
	#size-cells = <0>;

	switch0: switch@0 {
		compatible = "marvell,mv88e6190";
		reg = <0>;
		interrupt-parent = <&cp0_icu_csr>;
		interrupts = <39 IRQ_TYPE_LEVEL_LOW>,
			<43 IRQ_TYPE_LEVEL_LOW>,
			<47 IRQ_TYPE_LEVEL_LOW>,
			<51 IRQ_TYPE_LEVEL_LOW>,
			<129 IRQ_TYPE_LEVEL_LOW>;
		interrupt-controller;
		#interrupt-cells = <2>;

		mdio {
			#address-cells = <1>;
			#size-cells = <0>;

			switch0_phy1: switch0phy@1 {
				reg = <1>;
				interrupt-parent = <&switch0>;
				interrupts = <1 IRQ_TYPE_LEVEL_HIGH>;
			};

			switch0_phy2: switch0phy@2 {
				reg = <2>;
				interrupt-parent = <&switch0>;
				interrupts = <2 IRQ_TYPE_LEVEL_HIGH>;
			};

			switch0_phy3: switch0phy@3 {
				reg = <3>;
				interrupt-parent = <&switch0>;
				interrupts = <3 IRQ_TYPE_LEVEL_HIGH>;
			};

			switch0_phy4: switch0phy@4 {
				reg = <4>;
				interrupt-parent = <&switch0>;
				interrupts = <4 IRQ_TYPE_LEVEL_HIGH>;
			};

			switch0_phy5: switch0phy@5 {
				reg = <5>;
				interrupt-parent = <&switch0>;
				interrupts = <5 IRQ_TYPE_LEVEL_HIGH>;
			};

			switch0_phy6: switch0phy@6 {
				reg = <6>;
				interrupt-parent = <&switch0>;
				interrupts = <6 IRQ_TYPE_LEVEL_HIGH>;
			};

			switch0_phy7: switch0phy@7 {
				reg = <7>;
				interrupt-parent = <&switch0>;
				interrupts = <7 IRQ_TYPE_LEVEL_HIGH>;
			};

			switch0_phy8: switch0phy@8 {
				reg = <8>;
				interrupt-parent = <&switch0>;
				interrupts = <8 IRQ_TYPE_LEVEL_HIGH>;
			};
		};

		ports {
			#address-cells = <1>;
			#size-cells = <0>;

			port@0 {
				reg = <0>;
				label = "cpu";
				ethernet = <&cp0_eth0>;
			};

			port@2 {
				reg = <2>;
				label = "ether2";
				phy-handle = <&switch0_phy2>;
			};

			port@3 {
				reg = <3>;
				label = "ether3";
				phy-handle = <&switch0_phy3>;
			};

			port@4 {
				reg = <4>;
				label = "ether4";
				phy-handle = <&switch0_phy4>;
			};

			port@5 {
				reg = <5>;
				label = "ether5";
				phy-handle = <&switch0_phy5>;
			};

			port@6 {
				reg = <6>;
				label = "ether6";
				phy-handle = <&switch0_phy6>;
			};

			port@7 {
				reg = <7>;
				label = "ether7";
				phy-handle = <&switch0_phy7>;
			};

			port@8 {
				reg = <8>;
				label = "ether8";
				phy-handle = <&switch0_phy8>;
			};

			port@9 {
				reg = <9>;
				label = "ether1";
				phy-mode = "2500base-x";
				managed = "in-band-status";
			};


			port@10 {
				reg = <10>;
				label = "sfp";
				phy-mode = "10gbase-r";
				managed = "in-band-status";
				sfp = <&sfp>;
			};
		};
	};
};

&cp0_pinctrl {
	cp_i2c0_pins: cp-i2c-pins {
		marvell,pins = "mpp0", "mpp1";
		marvell,function = "mss_i2c";
	};

	cp_uart0_pins: cp-uart0-pins {
		marvell,pins = "mpp29", "mpp30";
		marvell,function = "uart0";
	};

	cp_led_pins: led-pins {
		marvell,pins =
		"mpp28", "mpp52", "mpp53", "mpp54",
		"mpp58", "mpp59", "mpp60", "mpp61", "mpp62";
		marvell,function = "gpio";
	};
};

&cp0_usb3_1 {
	/*phys from devboard DTS*/
	phys = <&cp0_comphy4 1>;
	phy-names = "cp0-usb3h1-comphy";
	status = "okay";
};

&cp0_i2c0 {
	status = "okay";
	pinctrl-0 = <&cp_i2c0_pins>;
	pinctrl-names = "default";
	clock-frequency = <100000>;
	/* SFP cage? */
};

&cp0_uart0 {
	status = "okay";
	pinctrl-0 = <&cp_uart0_pins>;
	pinctrl-names = "default";
};

&cp0_nand_controller {
	status = "okay";
	pinctrl-0 = <&nand_pins>, <&nand_rb>;
	pinctrl-names = "default";

	nand@0 {
		reg = <0>;
		label = "main-storage";
		nand-rb = <0>;
		nand-ecc-strength = <4>;
		nand-ecc-step-size = <512>;

		partitions {
			compatible = "fixed-partitions";
			#address-cells = <1>;
			#size-cells = <1>;

			partition@0 {
				label = "RouterBoard NAND Boot";
				reg = <0 0x800000>;
			};

			partition@800000 {
				label = "RouterBoard NAND Main";
				reg = <0x800000 0x40000000>;
			};
		};
	};
};

sfp: sfp-switch0 {
	compatible = "sff,sfp";
	i2c-bus = <&cp0_i2c0>;
};

Support for the switch was added in Linux 5.13: de776d0d316f ("net: dsa: mv88e6xxx: add support for mv88e6393x family"), and there have been a few fixups since then.

There is now an example of this switch used in DTS:
https://lore.kernel.org/all/20211018011211.3836590-3-chris.packham@alliedtelesis.co.nz/ with https://github.com/torvalds/linux/blob/master/arch/arm64/boot/dts/marvell/cn9130-crb.dtsi

Would guess this is the switch serdes being configured for 10gbase-r for the CPU and SFP ports, and 2500base-x for the 2.5 WAN ethernet port. The 2.5G WAN ethernet needs a transceiver, and the RouterOS marvell_amethyst.ko includes the string "phy_qca8081_ops". The QCA8081 driver is in the process of being upstreamed now.

I still want one of these, but no ETA at my supplier, and the device using YAFFs complicates things.

1 Like

I bought my RB5009 here.

I wonder why they needed YAFFS again? They have already begun to use UBI.

Also this device has 16 MB of SPI-NOR:

The only question is, can the RouterBOOT load the kernel from NOR?

I should have some of these soon at work.

Are they seriously using YAFFS again?
They finally moved to UBI on IPQ40xx devices

I'm should also have 1 soon

[   19.788024] yaffs: dev is 32505857 name is "mtdblock1" rw
[   19.788028] yaffs: passed flags ""
[   19.788033] yaffs: yaffs: Attempting MTD mount of 31.1,"mtdblock1"
[   19.788036] yaffs: auto selecting yaffs2
[   19.950338] yaffs: yaffs_read_super: is_checkpointed 1
[   19.951703] yaffs: dev is 32505856 name is "mtdblock0" rw
[   19.951707] yaffs: passed flags ""
[   19.951710] yaffs: yaffs: Attempting MTD mount of 31.0,"mtdblock0"
[   19.951713] yaffs: auto selecting yaffs2
[   19.954907] yaffs: yaffs_read_super: is_checkpointed 1

I will never understand the logic behind YAFFS even, so they wasted their time porting YAFFS to 5.6 kernel

Yes, but the presence of YAFFS adds to us problems when porting OpenWrt to this device. I would like to hope that RouterBoot will be able to boot the kernel from the NOR flash drive ... although this is hard to believe.

Yes, I know since it's not in the upstream kernel.
It brings back the same issues as the ath79 based NAND MikroTik devices.

Alternatively, I will try to implement in kernel2minor writing the kernel to a nand flash drive, taking into account possible bad blocks. At the same time, RB2011 will also benefit from this.

1 Like

Received today

We already do that for ath79? What is the difference between ath79 and this board? (I am just trying to understand why we need to add extra stuff to kernel2minor. Just interested to understand the underlying issue.)

You have correctly noticed that kernel2minor is already able to create an image for NAND. Problems begin when bad blocks are already present on the NAND in the place of image writing. To fix this, we need to create a small utility that would write the image and make some YAFFS blocks remap when bad blocks are found.

1 Like