Adding support for Mercusys MR90X

I got the router yesterday so no I don't understand much yet on the device and how it's partitioned. My noobish assumptions

ubinfo -a
UBI version:                    1
Count of UBI devices:           3
UBI control device major/minor: 10:62
Present UBI devices:            ubi0, ubi1, ubi2

ubi0
Volumes count:                           3
Logical eraseblock size:                 126976 bytes, 124.0 KiB
Total amount of logical eraseblocks:     400 (50790400 bytes, 48.4 MiB)
Amount of available logical eraseblocks: 175 (22220800 bytes, 21.1 MiB)
Maximum count of volumes                 128
Count of bad physical eraseblocks:       0
Count of reserved physical eraseblocks:  20
Current maximum erase counter value:     1
Minimum input/output unit size:          2048 bytes
Character device major/minor:            250:0
Present volumes:                         0, 1, 2

Volume ID:   0 (on ubi0)
Type:        static
Alignment:   1
Size:        6 LEBs (761856 bytes, 744.0 KiB)
Data bytes:  747152 bytes (729.6 KiB)
State:       OK
Name:        uboot
Character device major/minor: 250:1
-----------------------------------
Volume ID:   1 (on ubi0)
Type:        static
Alignment:   1
Size:        26 LEBs (3301376 bytes, 3.1 MiB)
Data bytes:  3215992 bytes (3.0 MiB)
State:       OK
Name:        kernel
Character device major/minor: 250:2
-----------------------------------
Volume ID:   2 (on ubi0)
Type:        static
Alignment:   1
Size:        169 LEBs (21458944 bytes, 20.4 MiB)
Data bytes:  21450752 bytes (20.4 MiB)
State:       OK
Name:        rootfs
Character device major/minor: 250:3

===================================

ubi1
Volumes count:                           1
Logical eraseblock size:                 126976 bytes, 124.0 KiB
Total amount of logical eraseblocks:     32 (4063232 bytes, 3.8 MiB)
Amount of available logical eraseblocks: 0 (0 bytes)
Maximum count of volumes                 128
Count of bad physical eraseblocks:       0
Count of reserved physical eraseblocks:  10
Current maximum erase counter value:     3
Minimum input/output unit size:          2048 bytes
Character device major/minor:            249:0
Present volumes:                         0

Volume ID:   0 (on ubi1)
Type:        dynamic
Alignment:   1
Size:        18 LEBs (2285568 bytes, 2.1 MiB)
State:       OK
Name:        tp_data
Character device major/minor: 249:1

===================================

ubi2
Volumes count:                           2
Logical eraseblock size:                 126976 bytes, 124.0 KiB
Total amount of logical eraseblocks:     64 (8126464 bytes, 7.7 MiB)
Amount of available logical eraseblocks: 0 (0 bytes)
Maximum count of volumes                 128
Count of bad physical eraseblocks:       0
Count of reserved physical eraseblocks:  20
Current maximum erase counter value:     4
Minimum input/output unit size:          2048 bytes
Character device major/minor:            248:0
Present volumes:                         0, 1

Volume ID:   0 (on ubi2)
Type:        dynamic
Alignment:   1
Size:        20 LEBs (2539520 bytes, 2.4 MiB)
State:       OK
Name:        user_data1
Character device major/minor: 248:1
-----------------------------------
Volume ID:   1 (on ubi2)
Type:        dynamic
Alignment:   1
Size:        20 LEBs (2539520 bytes, 2.4 MiB)
State:       OK
Name:        user_data2
Character device major/minor: 248:2

It seems that mtd:ubi0 includes 3 logical partitions

  • uboot: 744 KB, static.
  • kernel: 3.1 MB, static.
  • rootfs: 20.4 MB, static.
    So where are the extra ~20MB? why not include them in rootfs

In the same logic mtd:ubi1 includes 1 partition
tp_data: 2.1 MB, dynamic.
But mtd:ubi1 is 50MB in size.

So why don't we

  1. resize ubi1 to 10-20MB for tp_data and extend ubi0
  2. add to rootfs the available ~20MB + the space gained from resized partitions

I am really not the guy that clearly understands/knows the way to do it...but I am happy to help with my guinea pig router.

And please correct me if I understand something wrong.

+1 more question but what is the OpenWRT U-boot layout installation method?

-----EXTRA-----

I followed the OpenWRT U-boot layout installation method. The files needed to follow this method are only available for 24.10.X version.
It seems that this method changes the partitions on the device, which is totally fine by me, OpenWRT is my only choice and the reason I bought this router on a great Amazon offer.
After completing the installation now my storage is 97.10MB which solves all my problems. Sorry for the trouble...but still if anyone can clear things out for me regarding the device partitioning I would like to get that knowledge. I usually do that stuff through a UI tool (e.g. gparted) and I am missing much especially on how embedded devices partitioning works.

1 Like

...probably yes, there seems a new option in 24.10rc4:
commit 24bddf68bd9a5fe670d1664a44a30d42c7784c00

Add U-Boot replacement loader for the MERCUSYS MR90X. This is required to increase available flash space in OpenWrt.

@csharper2005 can you give some insights on this?

@Pico Since 24.10-rc4 we have 2 options to install: stock u-boot layout and OpenWrt u-boot layout (stock bootloader has to be replaced by the opensource one).

Installation (from stock) - https://openwrt.org/toh/mercusys/mr90x_v1#installation_openwrt_u-boot_layout

Stock U-Boot UBI size: 50 MiB
OpenWrt U-boot UBI size: 126 MiB

2 Likes

How do you install from existing Openwrt, currently rocking rc5?

Return to stock firmware, then install OpenWrt U-boot version.

Can I not just boot the initramfs image and do the uboot stuff?

I have not explored this possibility in detail.

Good afternoon. You need a dump of the router flash drive for the programmer. Thank you in advance.

I successfully installed OpenWRT 24.10 on a stock MR90X using the OpenWrt u-Boot Layout, however I am experiencing wifi stability issues when throughput is high (eg, when running a speedtest, 200Mbps+). When I trigger the issue, the wifi clients are disconnected and the SSID takes a number of minutes to be re-advertised. Wifi clients can't connect unless I restart the wifi through luci and even after that, wifi throughput is very low (10-20mbps). Is anyone else experiencing this issue?

8 posts were split to a new topic: OpenWrt support for Tp-link XDR6010 v2.0

Hello!
After some experiments the device got into a cyclic reboot (green light for a couple of seconds, then orange light for about 20 seconds and then all over again)
Turning on with the reset button pressed seems to put it into recovery mode with a strange ip 192.0.2.1. The recovery process goes normally at first 6-10%, but then it suddenly speeds up and seems to be finished, asking for a manual reboot. After a manual reboot it goes into a cyclic reboot again, it seems the recovery is not successful.
Without UART is it useless to continue figuring it out?)

What kind of experiments?

Installing openwrt :slight_smile:

The non-linear progress feedback of the recovery option seems to be normal from as far as I remember.

The mr90x is not the easiest to install, if someone is unfamiliar with telnet and SSH, as it is not just uploading a firmware file.

We were not there, when you had installed it.
If you can be more specific about about the steps (from the installation steps from the OpenWRT wiki) you took to install it, potential error messages or command return messages and which exact binary you had used, there is a higher chance someone can help you.

So far I am suspecting that you missed some or all commands that you are supposed to run via SSH.

I have v1.2
There was an warn in step 3 of the normal installation: "Warning: Bad CRC, using default environment".

Not all commands in step 17 were executed.
Instead of steps 18 and 19, loged in LuCI and try to install sysupgrade directly from LuCI. The process stuck.
After some time rebooted the router manualy.

That's why I called it an "some experiment", but not normal installing OWRT strictly according to the manual :slight_smile:

there was a separate forum thread about 1.2. I would recommend reading the whole thread):

I do not have 1.2 and do not know, if you would need to undo some of the boot loader settings of the failed attempt (if so I think you would probably need a serial cable), you would need to try.

What firmware version was stock before you started.

It seems MR90X(EU)_V1.20_230808(Multi-language)

Good morning,

form the device page OpenWrt installation guide (point 3): "If the result is tp_boot_idx=1 then install MERCUSYS stock firmware using web interface and start from the p.2."
What means p.2.???? Point 2?? Part 2??? i don't understand it!

Help me please!

Thanks

keep reading the thread you linked to...