Teltonika RUT950

I am trying to install OpenWRT to Teltonika RUT950, batch number 069. The device should be pretty much the same as the RUT955, which appears to have support out-of-the box. Here are the main features of my device:

  • CPU: Atheros AR9344 rev 3 / MIPS 74Kc V4.12
  • Memory 128 Mb
  • Quectel EC25 LTE modem (2c7c:0125)

I've figured out that since the difference is the RS232/485 connectors of RUT955 which RUT950 is missing, a safe bet to start would be to copy all RUT955-related OpenWRT configurations to RUT950, build and install the factory version of the firmware.

Unfortunately, this has not played out as I hoped.

The RUT950 starts to boot the kernel, but after a promising start it enters a boot loop. After trying my own build I've tried the RUT955 24.10.3 factory build (and all builds, actually). The outcomes are similar which I describe below.

The firmware installation method does not make a difference. So far I've tried

  • to download the image to the Teltonika's RutOS /tmp/ and install it with sysupgrade
  • by using U-Boot to download the image over TFTP and erasing/copying the image to the RUT950
  • by using U-Boot WebUI

From the learning perspective, this has been educating and now I'm a master in flashing the stock firmware. From the perspective of installing OpenWRT, they all result similair outcome.

What happens is that in the first boot cycle the kernel appears to create some partitions, but then reboots itself. Here is the complete log of the first boot:

***************************************
*     U-Boot 3.0.1     2017-02-15     *
***************************************

** Warning: SPI NOR FLASH in bank #1 is
   unknown, JEDEC ID: 0xC84018

   Information provided in SFDP:
   - FLASH size: 16 MB
   - erase sector size: 64 kB
   - erase sector command: 0xD8

  BOARD: Teltonika RUT9XX
    RAM: 128 MB DDR2 32-bit CL3-4-4-10
  FLASH: 16 MB Unknown unknown model
 CLOCKS: CPU/RAM/AHB/SPI/REF
         550/400/200/ 25/ 40 MHz

Hit any key to stop booting:  0 

Booting image from 0x9F040000...

   Vendor/image name:    OpenWrt r29087-d9c5716d1d
   Hardware ID:          0x35000001
   Whole image size:     0 kB (0 bytes)
   Kernel size:          2.5 MB (2620781 bytes)
   Rootfs size:          0 kB (0 bytes)
   Kernel load address:  0x80060000
   Kernel entry point:   0x80060000

   Header CRC...  skipped
   Data CRC...    skipped

Stopping network... OK!
Uncompressing Kernel... OK!
Starting kernel...

[    0.000000] Linux version 6.6.119 (builder@buildhost) (mips-openwrt-linux-musl-gcc (OpenWrt GCC 13.3.0 r29087-d9c5716d1d) 13.3.0, GNU ld (GNU Binut5
[    0.000000] printk: bootconsole [early0] enabled
[    0.000000] CPU0 revision is: 0001974c (MIPS 74Kc)
[    0.000000] MIPS: machine is Teltonika RUT955
[    0.000000] SoC: Atheros AR9344 rev 3
[    0.000000] Initrd not found or empty - disabling initrd
[    0.000000] Primary instruction cache 64kB, VIPT, 4-way, linesize 32 bytes.
[    0.000000] Primary data cache 32kB, 4-way, VIPT, cache aliases, linesize 32 bytes
[    0.000000] Zone ranges:
[    0.000000]   Normal   [mem 0x0000000000000000-0x0000000007ffffff]
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000000000000-0x0000000007ffffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x0000000007ffffff]
[    0.000000] Kernel command line: console=ttyS0,115200 rootfstype=squashfs,jffs2
[    0.000000] Dentry cache hash table entries: 16384 (order: 4, 65536 bytes, linear)
[    0.000000] Inode-cache hash table entries: 8192 (order: 3, 32768 bytes, linear)
[    0.000000] Writing ErrCtl register=00000000
[    0.000000] Readback ErrCtl register=00000000
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 32480
[    0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[    0.000000] Memory: 119896K/131072K available (6837K kernel code, 610K rwdata, 900K rodata, 1244K init, 233K bss, 11176K reserved, 0K cma-reserved)
[    0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] NR_IRQS: 51
[    0.000000] CPU clock: 550.000 MHz
[    0.000000] clocksource: MIPS: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 6950037990 ns
[    0.000002] sched_clock: 32 bits at 275MHz, resolution 3ns, wraps every 7809031678ns
[    0.008808] Calibrating delay loop... 274.02 BogoMIPS (lpj=1370112)
[    0.085693] pid_max: default: 32768 minimum: 301
[    0.104219] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.112417] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.132759] RCU Tasks Trace: Setting shift to 0 and lim to 1 rcu_task_cb_adjust=1 rcu_task_cpu_ids=1.
[    0.150375] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.161417] futex hash table entries: 256 (order: 0, 3072 bytes, linear)
[    0.172448] pinctrl core: initialized pinctrl subsystem
[    0.182066] NET: Registered PF_NETLINK/PF_ROUTE protocol family
[    0.189455] thermal_sys: Registered thermal governor 'step_wise'
[    0.192907] /ahb/apb: Fixed dependency cycle(s) with /ahb/apb/interrupt-controller@18060010
[    0.225572] clocksource: Switched to clocksource MIPS
[    0.245744] NET: Registered PF_INET protocol family
[    0.251481] IP idents hash table entries: 2048 (order: 2, 16384 bytes, linear)
[    0.261512] tcp_listen_portaddr_hash hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.271027] Table-perturb hash table entries: 65536 (order: 6, 262144 bytes, linear)
[    0.279691] TCP established hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.288260] TCP bind hash table entries: 1024 (order: 1, 8192 bytes, linear)
[    0.296174] TCP: Hash tables configured (established 1024 bind 1024)
[    0.304146] MPTCP token hash table entries: 512 (order: 1, 6144 bytes, linear)
[    0.312607] UDP hash table entries: 256 (order: 0, 4096 bytes, linear)
[    0.319959] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes, linear)
[    0.328979] NET: Registered PF_UNIX/PF_LOCAL protocol family
[    0.335361] PCI: CLS 0 bytes, default 32
[    0.346293] workingset: timestamp_bits=14 max_order=15 bucket_order=1
[    0.355796] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.362321] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    0.383456] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 251)
[    0.396348] pinctrl-single 1804002c.pinmux: 544 pins, size 68
[    0.404955] Serial: 8250/16550 driver, 16 ports, IRQ sharing enabled
[    0.418815] printk: console [ttyS0] disabled
[    0.424200] 18020000.uart: ttyS0 at MMIO 0x18020000 (irq = 9, base_baud = 2500000) is a 16550A
[    0.433935] printk: console [ttyS0] enabled
[    0.433935] printk: console [ttyS0] enabled
[    0.442854] printk: bootconsole [early0] disabled
[    0.442854] printk: bootconsole [early0] disabled
[    0.498355] spi-nor spi0.0: gd25q128 (16384 Kbytes)
[    0.503503] 5 fixed-partitions partitions found on MTD device spi0.0
[    0.510097] OF: Bad cell count for /ahb/spi@1f000000/flash@0/partitions
[    0.516884] OF: Bad cell count for /ahb/spi@1f000000/flash@0/partitions
[    0.523937] Creating 5 MTD partitions on "spi0.0":
[    0.528864] 0x000000000000-0x000000020000 : "u-boot"
[    0.537970] 0x000000020000-0x000000030000 : "config"
[    0.545764] OF: Bad cell count for /ahb/spi@1f000000/flash@0/partitions
[    0.552927] 0x000000030000-0x000000040000 : "art"
[    0.560877] OF: Bad cell count for /ahb/spi@1f000000/flash@0/partitions
[    0.568097] 0x000000040000-0x000000f70000 : "firmware"

The following boot logs look like this:

***************************************
*     U-Boot 3.0.1     2017-02-15     *
***************************************

** Warning: SPI NOR FLASH in bank #1 is
   unknown, JEDEC ID: 0xC84018

   Information provided in SFDP:
   - FLASH size: 16 MB
   - erase sector size: 64 kB
   - erase sector command: 0xD8

  BOARD: Teltonika RUT9XX
    RAM: 128 MB DDR2 32-bit CL3-4-4-10
  FLASH: 16 MB Unknown unknown model
 CLOCKS: CPU/RAM/AHB/SPI/REF
         550/400/200/ 25/ 40 MHz

Hit any key to stop booting:  0 

Booting image from 0x9F040000...

   Image name:    MIPS OpenWrt Linux-5.10.221
   Build date:    2024-07-15 22:25:54 UTC
   Architecture:  MIPS
   OS/image type: Linux Kernel
   Compression:   LZMA
   Data size:     5.4 MB (5679178 bytes)
   Load address:  0x80060000
   Entry point:   0x80060000

   Header CRC...  OK!
   Data CRC...    skipped

Stopping network... OK!
Uncompressing Kernel... OK!
Starting kernel...

[    0.000000] Linux version 5.10.221 (builder@buildhost) (mips-openwrt-linux-musl-gcc (OpenWrt GCC 11.2.0 r20341-591b7e93d3) 11.2.0, GNU ld (GNU Binu4
[    0.000000] printk: bootconsole [early0] enabled
[    0.000000] CPU0 revision is: 0001974c (MIPS 74Kc)
[    0.000000] MIPS: machine is Teltonika RUT955
[    0.000000] SoC: Atheros AR9344 rev 3
[    0.000000] Initrd not found or empty - disabling initrd
[    0.000000] Primary instruction cache 64kB, VIPT, 4-way, linesize 32 bytes.
[    0.000000] Primary data cache 32kB, 4-way, VIPT, cache aliases, linesize 32 bytes
[    0.000000] Zone ranges:
[    0.000000]   Normal   [mem 0x0000000000000000-0x0000000007ffffff]
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000000000000-0x0000000007ffffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x0000000007ffffff]
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 32480
[    0.000000] Kernel command line: console=ttyS0,115200 rootfstype=squashfs,jffs2
[    0.000000] Dentry cache hash table entries: 16384 (order: 4, 65536 bytes, linear)
[    0.000000] Inode-cache hash table entries: 8192 (order: 3, 32768 bytes, linear)
[    0.000000] Writing ErrCtl register=00000000
[    0.000000] Readback ErrCtl register=00000000
[    0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[    0.000000] Memory: 110328K/131072K available (5913K kernel code, 605K rwdata, 752K rodata, 11920K init, 210K bss, 20744K reserved, 0K cma-reserved)
[    0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] NR_IRQS: 51
[    0.000000] CPU clock: 550.000 MHz
[    0.000000] clocksource: MIPS: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 6950037990 ns
[    0.000011] sched_clock: 32 bits at 275MHz, resolution 3ns, wraps every 7809031678ns
[    0.008793] Calibrating delay loop... 274.02 BogoMIPS (lpj=1370112)
[    0.085715] pid_max: default: 32768 minimum: 301
[    0.091040] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.099205] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.110325] dyndbg: Ignore empty _ddebug table in a CONFIG_DYNAMIC_DEBUG_CORE build
[    0.122924] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.133949] futex hash table entries: 256 (order: -1, 3072 bytes, linear)
[    0.141666] pinctrl core: initialized pinctrl subsystem
[    0.152584] NET: Registered protocol family 16
[    0.158520] thermal_sys: Registered thermal governor 'step_wise'
[    0.225567] clocksource: Switched to clocksource MIPS
[    0.239407] NET: Registered protocol family 2
[    0.244543] IP idents hash table entries: 2048 (order: 2, 16384 bytes, linear)
[    0.253567] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 4096 bytes, linear)
[    0.263016] TCP established hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.271593] TCP bind hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.279479] TCP: Hash tables configured (established 1024 bind 1024)
[    0.286720] UDP hash table entries: 256 (order: 0, 4096 bytes, linear)
[    0.294029] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes, linear)
[    0.302230] NET: Registered protocol family 1
[    0.307195] PCI: CLS 0 bytes, default 32
[    0.555704] workingset: timestamp_bits=14 max_order=15 bucket_order=1
[    0.567921] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.574427] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    0.587568] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 251)
[    0.599343] pinctrl-single 1804002c.pinmux: 544 pins, size 68
[    0.607021] Serial: 8250/16550 driver, 16 ports, IRQ sharing enabled
[    0.616867] printk: console [ttyS0] disabled
[    0.621723] 18020000.uart: ttyS0 at MMIO 0x18020000 (irq = 9, base_baud = 2500000) is a 16550A
[    0.631412] printk: console [ttyS0] enabled
[    0.631412] printk: console [ttyS0] enabled
[    0.640321] printk: bootconsole [early0] disabled
[    0.640321] printk: bootconsole [early0] disabled

I am a bit puzzled: it appears that the kernel boots but there are no messages related to missing root filesystem etc.

Another thread describes RUT955 having similair problems, but according to the forum there appears to be plenty of people running quite happily OpenWRT on Teltonika RXX.

Any ideas how to proceed debugging?

"pretty much the same" isn't close enough, unless the the RS233/485 really is the only difference.

Indeed.

As I wrote in the OP, my RUT950 has same CPU, same amount of RAM and even the same GSM device reported in the OpenWRT RUT955 device page.

Also, the linked case describes similar problem on RUT955.

So far I have no evidence that the core components differ. Do you have insight on these devices or are you just generally saying that "devices which look like the same are not necessary the same"?

I don't, point is, same hw doesn't mean interchangeable OpenWRT images (as you appear to have found out already).

Hi!
As far as I can tell, Teltonika has several revisions of their devices. Apparently, we have the first revision, and that's the one causing the problems. The manufacturer's website has information on the revisions, and they stopped releasing firmware updates much earlier than the second one.

After some trial and error I am now able to boot the initramfs-kernel image.

However, I am still struggling to set up the MTD partitions correctly. Because of this my rootfs cannot be found:

[    0.436864] mtd: Found partition defined in DT for u-boot. Assigning OF node to support nvmem.
[    0.436899] mtd: Found partition defined in DT for config. Assigning OF node to support nvmem.
[    0.445721] mtd: Found partition defined in DT for art. Assigning OF node to support nvmem.
[    0.454496] mtd: Found partition defined in DT for event-log. Assigning OF node to support nvmem.
[    0.463013] 5 cmdlinepart partitions found on MTD device spi0.0
[    0.478041] Creating 5 MTD partitions on "spi0.0":
[    0.482933] 0x000000000000-0x000000020000 : "u-boot"
[    0.490766] 0x000000020000-0x000000030000 : "config"
[    0.497723] 0x000000030000-0x000000040000 : "art"
[    0.504402] 0x000000040000-0x000000f70000 : "firmware"
[    0.511371] 0x000000f70000-0x000001000000 : "event-log"
[    0.531774] i2c_dev: i2c /dev entries driver
[    0.539012] NET: Registered PF_INET6 protocol family
[    0.585597] Segment Routing with IPv6
[    0.589488] In-situ OAM (IOAM) with IPv6
[    0.593750] NET: Registered PF_PACKET protocol family
[    0.598984] 8021q: 802.1Q VLAN Support v1.8
[    0.634602] clk: Disabling unused clocks
[    0.639622] MTD: Couldn't look up '': -22
[    0.644014] /dev/root: Can't open blockdev
[    0.648212] VFS: Cannot open root device "" or unknown-block(0,0): error -6
[    0.655324] Please append a correct "root=" boot option; here are the available partitions:
[    0.663823] 1f00             128 mtdblock0 
[    0.663840]  (driver?)
[    0.670472] 1f01              64 mtdblock1 
[    0.670485]  (driver?)
[    0.677133] 1f02              64 mtdblock2 
[    0.677147]  (driver?)
[    0.683802] 1f03           15552 mtdblock3 
[    0.683818]  (driver?)
[    0.690455] 1f04             576 mtdblock4 
[    0.690468]  (driver?)
[    0.697127] List of all bdev filesystems:
[    0.701195]  squashfs
[    0.701202] 
[    0.705035] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
[    0.713428] Rebooting in 1 seconds..

Now it mounts the squashfs. However, I had to make a slight change to target/linux/ath79/config-6.12:

CONFIG_MTD_SPLIT_FIRMWARE=y

According to this it should not be required since the firmware partition has label "firmware". This is part of my dts file:

partition@40000 {
    label = "firmware";
    reg = <0x040000 0xF30000>;
};

What puzzles me is

  • Should the CONFIG_MTD_SPLIT_FIRMWARE to be avoided and if not, what is the proper way to inject this configuration parameter to the build process?
  • If the labels are the way to go, how can make them work?

Partition-related part of kernel logs without CONFIG_MTD_SPLIT_FIRMWARE set:

[    0.436267] 5 fixed-partitions partitions found on MTD device spi0.0
[    0.442815] Creating 5 MTD partitions on "spi0.0":
[    0.447692] 0x000000000000-0x000000020000 : "u-boot"
[    0.455538] 0x000000020000-0x000000030000 : "config"
[    0.462462] 0x000000030000-0x000000040000 : "art"
[    0.469071] 0x000000040000-0x000000f70000 : "firmware"
[    0.476139] 0x000000f70000-0x000001000000 : "event-log"
[    0.496321] i2c_dev: i2c /dev entries driver
[    0.503522] NET: Registered PF_INET6 protocol family
[    0.549867] Segment Routing with IPv6
[    0.553792] In-situ OAM (IOAM) with IPv6
[    0.558005] NET: Registered PF_PACKET protocol family
[    0.563291] 8021q: 802.1Q VLAN Support v1.8
[    0.598957] clk: Disabling unused clocks
[    0.604041] MTD: Couldn't look up '': -22
[    0.608362] /dev/root: Can't open blockdev
[    0.612622] VFS: Cannot open root device "" or unknown-block(0,0): error -6
[    0.619690] Please append a correct "root=" boot option; here are the available partitions:
[    0.628194] 1f00             128 mtdblock0 
[    0.628210]  (driver?)
[    0.634859] 1f01              64 mtdblock1 
[    0.634873]  (driver?)
[    0.641510] 1f02              64 mtdblock2 
[    0.641522]  (driver?)
[    0.648173] 1f03           15552 mtdblock3 
[    0.648187]  (driver?)
[    0.654843] 1f04             576 mtdblock4 
[    0.654857]  (driver?)
[    0.661494] List of all bdev filesystems:
[    0.665577]  squashfs
[    0.665585] 
[    0.669403] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
[    0.677797] Rebooting in 1 seconds..

Partition-related part of kernel logs with CONFIG_MTD_SPLIT_FIRMWARE set:

    0.436615] 5 fixed-partitions partitions found on MTD device spi0.0
    0.443167] Creating 5 MTD partitions on "spi0.0":
[    0.448043] 0x000000000000-0x000000020000 : "u-boot"
    0.455936] 0x000000020000-0x000000030000 : "config"
    0.462919] 0x000000030000-0x000000040000 : "art"
    0.469565] 0x000000040000-0x000000f70000 : "firmware"
    0.476850] 2 uimage-fw partitions found on MTD device firmware
    0.482949] 0x000000040000-0x0000002e4ca4 : "kernel"
[    0.487998] mtd: partition "kernel" doesn't end on an erase/write block -- force read-only
    0.498199] 0x0000002e4ca4-0x000000f70000 : "rootfs"
    0.503339] mtd: partition "rootfs" doesn't start on an erase/write block boundary -- force read-only
    0.514345] mtd: setting mtd5 (rootfs) as root device
    0.519579] 1 squashfs-split partitions found on MTD device rootfs
    0.525928] 0x0000006a0000-0x000000f70000 : "rootfs_data"
    0.533281] 0x000000f70000-0x000001000000 : "event-log"