Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revisionBoth sides next revision
toh:mercusys:mr90x_v1 [2023/10/31 20:08] – [Installation] csharper2005toh:mercusys:mr90x_v1 [2024/11/30 21:25] – [UART method] csharper2005
Line 6: Line 6:
  
 The MERCUSYS MR90X(EU) v1 router supports 4 802.11ax streams on both 2.4GHz @40MHz and 5GHz @160MHz for a combined 6000Mbps wireless speed. It is based on the MediaTek MT7986B SoC. The MERCUSYS MR90X(EU) v1 router supports 4 802.11ax streams on both 2.4GHz @40MHz and 5GHz @160MHz for a combined 6000Mbps wireless speed. It is based on the MediaTek MT7986B SoC.
 +
 +The Chinese model X60G(AX6000) is **NOT** the same, which doesn't have a 2.5 Gpbs PHY either.
  
 /*****/ /*****/
Line 15: Line 17:
 ===== Supported Versions ===== ===== Supported Versions =====
  
----- datatable ---- +<!-- ToH: { 
-cols    BrandModelVersionsSupported Current Rel, OEM device homepage URL_url, Forum Search_search-forums, Device Techdata_pageid +  "source""json", 
-headers BrandModel, Version, Current Release, OEM Info, Forum Search, Technical Data +  "dom": "t", 
-align   c,c,c,c,c,c,c +  "paging": false
-filter  : Brand=MERCUSYS +  "rotate"true
-filter  Model=MR90X +  "shownColumns"["brand""model""version""supportedcurrentrel""oemdevicehomepageurl""forumsearch", "deviceid"]
-filter  Versions~v1 +  "filterColumns"{"brand": "^MERCUSYS$", "model""^MR90X$", "version""^v1$"} 
-----+-->
  
 /* If no unsupported functions known, comment out the following datatable or delete it. */ /* If no unsupported functions known, comment out the following datatable or delete it. */
 /* /*
----- datatable ---- +<!-- ToH{ 
-cols    Unsupported Functions_unsupporteds +  "source""json", 
-filter  : Brand=MERCUSYS +  "dom""t", 
-filter  : Model=MR90X +  "paging"false
-filter  : Versions~v1 +  "shownColumns"["unsupported_functions""model""version""cpu""cpumhz""cpucores""flashmb""rammb""wlanhardware""wlan24ghz""wlan50ghz""ethernet100mports""ethernet1gports""modem""usbports"]
-----  +  "filterColumns"{"brand": "^MERCUSYS$", "model""^MR90X$", "version""^v1$"} 
-*/ +-->
- +
-===== Experimental Versions ===== +
- +
-/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *  +
-   The official Table of Hardware only lists current, stable versions of OpenWrt. +
-   Use this space to describe any on-going efforts to create a newer version       * +
-   of the firmware for this device. Provide links to firmware images,              * +
-   active threads on the forum, or other sources of information.                   * +
- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ +
- +
-//None at this time.// +
- +
-===== Hardware Highlights ===== +
----- datatable ---- +
-cols    : Model, Versions, CPU, CPU MHz, CPU Cores_numcores, Flash MB_mbflashs, RAM MB_mbram, WLAN Hardware, WLAN 2.4GHz, WLAN 5.0GHz, Ethernet 100M ports_, Ethernet Gbit ports_, ModemUSB ports_ +
-header  : ModelVersion,SoC,CPU MHz,CPU Cores,Flash MB,RAM MB,WLAN Hardware,WLAN2.4,WLAN5.0,100M ports,Gbit ports,Modem,USB +
-align   : c,c,c,c,c,c,c,c,c,c,c,c,c +
-filter  : Brand=MERCUSYS +
-filter  Model=MR90X +
-filter  Versions~v1 +
-----+
  
  
Line 59: Line 40:
 /* stable release */ /* stable release */
  
----- datatable ---- +<!-- ToH: { 
-cols    ModelVersionsSupported Current RelFirmware OpenWrt Install URL_urlFirmware OpenWrt Upgrade URL_url, Firmware OEM Stock URL_url +  "source""json", 
-headers ModelVersionCurrent ReleaseFirmware OpenWrt InstallFirmware OpenWrt UpgradeFirmware OEM Stock +  "dom": "t", 
-align   : c,c,c +  "paging": false, 
-filter  : Brand=MERCUSYS +  "rotate": true
-filter  Model=MR90X +  "shownColumns"["model""version""supportedcurrentrel""firmwareopenwrtinstallurl""firmwareopenwrtupgradeurl""firmwareoemstockurl"]
-filter  Versions~v1 +  "filterColumns"{"brand": "^MERCUSYS$", "model""^MR90X$", "version""^v1$"} 
-----+-->
  
 ==== Installation ==== ==== Installation ====
Line 99: Line 80:
 </code> </code>
  
-3. Open for editing ''/etc/hotplug.d/iface/65-iptv'' (e.g., using WinSCP and SSH settings from the p.1)+3. Run the following command: 
  
-4.  Add a newline after ''#!/bin/sh'':+<code bash> 
 +fw_printenv | grep tp_boot_idx 
 +</code> 
 + 
 +If the result is ''tp_boot_idx=1'' then install MERCUSYS stock firmware using web interface and start from the p.2. Otherwise, go to the next step. 
 + 
 +4. Open for editing ''/etc/hotplug.d/iface/65-iptv'' (e.g., using WinSCP and SSH settings from the p.2) 
 + 
 +5.  Add a newline after ''#!/bin/sh'':
 <code bash> <code bash>
 telnetd -l /bin/login.sh telnetd -l /bin/login.sh
 </code> </code>
  
-5.  Save ''65-iptv'' file+6.  Save ''65-iptv'' file
  
-6.  Toggle ''IPTV/VLAN Enable'' checkbox in the router web interface and save+7.  Toggle ''IPTV/VLAN Enable'' checkbox in the router web interface and save
  
-7.  Make sure that telnetd is running:+8.  Make sure that telnetd is running:
 <code bash> <code bash>
 netstat -ltunp | grep 23 netstat -ltunp | grep 23
 </code> </code>
  
-8.  Login via telnet to router IP, port ''23'' (no username and password are required)+9.  Login via telnet to router IP, port ''23'' (no username and password are required)
  
 <code> <code>
Line 142: Line 131:
 </code> </code>
  
-9.  Upload OpenWrt ''initramfs-kernel.bin'' to the ''/tmp'' folder of the router (e.g., using WinSCP and SSH settings from the p.1)+10.  Upload OpenWrt ''initramfs-kernel.bin'' to the ''/tmp'' folder of the router (e.g., using WinSCP and SSH settings from the p.2, or with ''cat initramfs-kernel.bin | ssh -p 20001 root@YOUR_ROUTER_IP "cat > /tmp/initramfs-kernel.bin"'' -- can't simply ''scp'' the file because there's no SFTP on the router)
          
-10.  Stock busybox doesn't contain ''ubiupdatevol'' command. Hence, we need to download and upload the full version of busybox to the router. For example, from here - https://github.com/xerta555/Busybox-Binaries/raw/master/busybox-arm64Upload ''busybox-arm64'' to the ''/tmp'' dir of the router and run in the telnet shell:+11.  Stock busybox doesn't contain ''ubiupdatevol'' command. Hence, we need to download and upload the full version of busybox to the router. For example, from ArchLinux - https://archlinuxarm.org/packages/aarch64/busybox. Dowload the pkg.tar.xz file, unpack it with ''tar xvf busybox-1.36.1-1-aarch64.pkg.tar.xz'', then upload ''usr/bin/busybox'' to the ''/tmp'' dir of the router and run in the telnet shell:
 <code bash> <code bash>
 cd /tmp cd /tmp
-chmod a+x busybox-arm64+chmod a+x busybox
 </code> </code>
  
-11. Check ''initramfs-kernel.bin'' size:+12. Check ''initramfs-kernel.bin'' size:
 <code bash> <code bash>
 du -h initramfs-kernel.bin du -h initramfs-kernel.bin
 </code> </code>
  
-12. Delete old and create a new one ''kernel'' volume with appropriate size (greater than ''initramfs-kernel.bin'' size):+13. Delete old and create a new one ''kernel'' volume with appropriate size (greater than ''initramfs-kernel.bin'' size):
 <code bash> <code bash>
 ubirmvol /dev/ubi0 -N kernel ubirmvol /dev/ubi0 -N kernel
Line 161: Line 150:
 </code> </code>
  
-13. Write OpenWrt ''initramfs-kernel.bin'' to the flash:+14. Write OpenWrt ''initramfs-kernel.bin'' to the flash:
 <code bash> <code bash>
-./busybox-arm64 ubiupdatevol /dev/ubi0_1 /tmp/initramfs-kernel.bin+./busybox ubiupdatevol /dev/ubi0_1 /tmp/initramfs-kernel.bin
 </code> </code>
  
-14Execute all of the following ''fw_setenv'' commands on the telnet prompt. These will create/update data in the ''u-boot-env'' partition to properly boot into OpenWrt at the next steps:+15Reboot to OpenWrt initramfs: 
 +<code bash> 
 +reboot 
 +</code> 
 + 
 +16. Login as root via SSH (IP ''192.168.1.1'', port ''22''
 + 
 +17. Once inside OpenWrt, set (or update) env variables:
 <code bash> <code bash>
 fw_setenv baudrate 115200 fw_setenv baudrate 115200
Line 183: Line 179:
 </code> </code>
  
-15. Reboot to OpenWrt initramfs: +18. Upload OpenWrt ''sysupgrade.bin'' image to the ''/tmp'' dir of the router
-<code bash> +
-reboot +
-</code> +
- +
-16. Login as root via SSH (IP ''192.168.1.1'', port ''22''+
- +
-17. Upload OpenWrt ''sysupgrade.bin'' image to the ''/tmp'' dir of the router+
  
-18. Run sysupgrade:+19. Run sysupgrade:
 <code bash> <code bash>
 sysupgrade -n /tmp/sysupgrade.bin sysupgrade -n /tmp/sysupgrade.bin
Line 228: Line 217:
 5. Run ''sysupgrade -n'' with the sysupgrade OpenWrt image 5. Run ''sysupgrade -n'' with the sysupgrade OpenWrt image
  
 +==== Installation (OpenWrt U-Boot layout) ====
 +
 +1. Download files from //https://downloads.openwrt.org/ -> **Choose release you need** -> targets -> mediatek -> filogic://
 +  openwrt-mediatek-filogic-mercusys_mr90x-v1-ubi-bl31-uboot.fip
 +  openwrt-mediatek-filogic-mercusys_mr90x-v1-ubi-initramfs-recovery.itb
 +  openwrt-mediatek-filogic-mercusys_mr90x-v1-ubi-preloader.bin
 +  openwrt-mediatek-filogic-mercusys_mr90x-v1-ubi-squashfs-sysupgrade.itb
 +
 +2. Connect network cable to the LAN1 port of the router 
 +
 +3. Login as root via SSH (router IP, port ''20001'', password - your web interface password)
 +
 +<code bash>
 +BusyBox v1.19.4 (2022-09-15 21:10:21 CST) built-in shell (ash)
 +Enter 'help' for a list of built-in commands.
 +
 +     MM           NM                    MMMMMMM          M       M
 +   $MMMMM        MMMMM                MMMMMMMMMMM      MMM     MMM
 +  MMMMMMMM     MM MMMMM.              MMMMM:MMMMMM:   MMMM   MMMMM
 +MMMM= MMMMMM  MMM   MMMM       MMMMM   MMMM  MMMMMM   MMMM  MMMMM'
 +MMMM=  MMMMM MMMM    MM       MMMMM    MMMM    MMMM   MMMMNMMMMM
 +MMMM=   MMMM  MMMMM          MMMMM     MMMM    MMMM   MMMMMMMM
 +MMMM=   MMMM   MMMMMM       MMMMM      MMMM    MMMM   MMMMMMMMM
 +MMMM=   MMMM     MMMMM,    NMMMMMMMM   MMMM    MMMM   MMMMMMMMMMM
 +MMMM=   MMMM      MMMMMM   MMMMMMMM    MMMM    MMMM   MMMM  MMMMMM
 +MMMM=   MMMM   MM    MMMM    MMMM      MMMM    MMMM   MMMM    MMMM
 +MMMM$ ,MMMMM  MMMMM  MMMM    MMM       MMMM   MMMMM   MMMM    MMMM
 +  MMMMMMM:      MMMMMMM             MMMMMMMMMMMM  MMMMMMM MMMMMMM
 +    MMMMMM       MMMMN               MMMMMMMMM      MMMM    MMMM
 +     MMMM          M                    MMMMMMM        M       M
 +       M
 + ---------------------------------------------------------------
 +   For those about to rock... (Attitude Adjustment, unknown)
 + ---------------------------------------------------------------
 +admin@Akronite:/root$
 +</code>
 +
 +4. Run the following command: 
 +
 +<code bash>
 +fw_printenv | grep tp_boot_idx
 +</code>
 +
 +If the result is ''tp_boot_idx=1'' then install MERCUSYS stock firmware using web interface and start from the p.2. Otherwise, go to the next step.
 +
 +5. Open for editing ''/etc/hotplug.d/iface/65-iptv'' (e.g., using WinSCP and SSH settings from the p.2)
 +
 +6.  Add a newline after ''#!/bin/sh'':
 +<code bash>
 +telnetd -l /bin/login.sh
 +</code>
 +
 +7.  Save ''65-iptv'' file
 +
 +8.  Toggle ''IPTV/VLAN Enable'' checkbox in the router web interface and save
 +
 +9.  Make sure that telnetd is running:
 +<code bash>
 +netstat -ltunp | grep 23
 +</code>
 +
 +10.  Login via telnet to router IP, port ''23'' (no username and password are required)
 +
 +<code>
 +BusyBox v1.19.4 (2022-09-15 21:10:21 CST) built-in shell (ash)
 +Enter 'help' for a list of built-in commands.
 +
 +     MM           NM                    MMMMMMM          M       M
 +   $MMMMM        MMMMM                MMMMMMMMMMM      MMM     MMM
 +  MMMMMMMM     MM MMMMM.              MMMMM:MMMMMM:   MMMM   MMMMM
 +MMMM= MMMMMM  MMM   MMMM       MMMMM   MMMM  MMMMMM   MMMM  MMMMM'
 +MMMM=  MMMMM MMMM    MM       MMMMM    MMMM    MMMM   MMMMNMMMMM
 +MMMM=   MMMM  MMMMM          MMMMM     MMMM    MMMM   MMMMMMMM
 +MMMM=   MMMM   MMMMMM       MMMMM      MMMM    MMMM   MMMMMMMMM
 +MMMM=   MMMM     MMMMM,    NMMMMMMMM   MMMM    MMMM   MMMMMMMMMMM
 +MMMM=   MMMM      MMMMMM   MMMMMMMM    MMMM    MMMM   MMMM  MMMMMM
 +MMMM=   MMMM   MM    MMMM    MMMM      MMMM    MMMM   MMMM    MMMM
 +MMMM$ ,MMMMM  MMMMM  MMMM    MMM       MMMM   MMMMM   MMMM    MMMM
 +  MMMMMMM:      MMMMMMM             MMMMMMMMMMMM  MMMMMMM MMMMMMM
 +    MMMMMM       MMMMN               MMMMMMMMM      MMMM    MMMM
 +     MMMM          M                    MMMMMMM        M       M
 +       M
 + ---------------------------------------------------------------
 +   For those about to rock... (Attitude Adjustment, unknown)
 + ---------------------------------------------------------------
 +root@Akronite:/#
 +</code>
 +
 +11.  Upload OpenWrt ''openwrt-mediatek-filogic-mercusys_mr90x-v1-ubi-initramfs-recovery.itb'' to the ''/tmp'' folder of the router (e.g., using WinSCP and SSH settings from the p.3, or with ''cat openwrt-mediatek-filogic-mercusys_mr90x-v1-ubi-initramfs-recovery.itb | ssh -p 20001 root@YOUR_ROUTER_IP "cat > /tmp/openwrt-mediatek-filogic-mercusys_mr90x-v1-ubi-initramfs-recovery.itb"'' -- can't simply ''scp'' the file because there's no SFTP on the router)
 +    
 +12.  Stock busybox doesn't contain ''ubiupdatevol'' command. Hence, we need to download and upload the full version of busybox to the router. For example, from ArchLinux - https://archlinuxarm.org/packages/aarch64/busybox. 
 +
 +Download the ''pkg.tar.xz'' file, unpack it with ''tar xvf busybox-1.36.1-1-aarch64.pkg.tar.xz'', then upload ''usr/bin/busybox'' to the ''/tmp'' dir of the router and run in the telnet shell:
 +<code bash>
 +cd /tmp
 +chmod a+x busybox
 +</code>
 +
 +13. Check ''initramfs-kernel.bin'' size:
 +<code bash>
 +du -h openwrt-mediatek-filogic-mercusys_mr90x-v1-ubi-initramfs-recovery.itb
 +</code>
 +
 +14. Delete old and create a new one ''kernel'' volume with appropriate size (greater than ''initramfs-kernel.bin'' size):
 +<code bash>
 +ubirmvol /dev/ubi0 -N kernel
 +ubimkvol /dev/ubi0 -n 1 -N kernel -s 9MiB
 +</code>
 +
 +15. Write OpenWrt ''initramfs-kernel.bin'' to the flash:
 +<code bash>
 +./busybox ubiupdatevol /dev/ubi0_1 /tmp/openwrt-mediatek-filogic-mercusys_mr90x-v1-ubi-initramfs-recovery.itb
 +</code>
 +
 +16. Make backups:
 +<code bash>
 +cat /dev/mtd0 > /tmp/boot.bin
 +cat /dev/mtd5 > /tmp/tp_data.bin
 +</code>
 +Copy ''/tp_data dir'' content, ''/tmp/boot.bin'' and ''/tmp/tp_data.bin'' and to your PC using scp. You can also backup the remaining partititons. Copy backups to a safe place, they are required for the next steps and stock firmware recovery.
 +
 +17. Reboot to OpenWrt initramfs:
 +<code bash>
 +reboot
 +</code>
 +
 +18. Copy OpenWrt ''openwrt-mediatek-filogic-mercusys_mr90x-v1-ubi-bl31-uboot.fip'', ''openwrt-mediatek-filogic-mercusys_mr90x-v1-ubi-preloader.bin'', ''openwrt-mediatek-filogic-mercusys_mr90x-v1-ubi-squashfs-sysupgrade.itb'' and ''MT7986_EEPROM.bin'', ''default-mac'' (from ''/tp_data'' backup) to the ''/tmp'' folder of the router using scp.
 +
 +19. Prepare UBI:
 +<code bash>
 +ubidetach -p /dev/mtd3; ubiformat /dev/mtd3 -y; ubiattach -p /dev/mtd3
 +ubimkvol /dev/ubi0 -N fip -t static -s 1MiB
 +ubiupdatevol /dev/ubi0_0 /tmp/openwrt-mediatek-filogic-mercusys_mr90x-v1-ubi-bl31-uboot.fip
 +ubimkvol /dev/ubi0 -N ubootenv -s 0x1f000
 +ubimkvol /dev/ubi0 -N ubootenv2 -s 0x1f000
 +</code>
 +
 +20.  Install ''kmod-mtd-rw'' and unlock partitions:
 +<code bash>
 +opkg update && opkg install kmod-mtd-rw
 +insmod mtd-rw i_want_a_brick=1
 +mtd unlock boot
 +mtd unlock bl2
 +mtd unlock factory
 +</code>
 +
 +21. Prepare "factory" partition:
 +<code bash>
 +dd if=/dev/zero bs=$((0x8000)) count=1 | tr '\000' '\377' > /tmp/factory.bin
 +dd if=/tmp/MT7986_EEPROM.bin of=/tmp/factory.bin conv=notrunc
 +dd if=/tmp/default-mac >> /tmp/factory.bin
 +</code>
 +
 +22. Write "factory" partition:
 +<code bash>
 +mtd erase factory
 +mtd write /tmp/factory.bin factory
 +</code>
 +
 +23. Write preloader partition:
 +<code bash>
 +mtd erase bl2
 +mtd write /tmp/openwrt-mediatek-filogic-mercusys_mr90x-v1-ubi-preloader.bin bl2
 +</code>
 +
 +24. Write OpenWrt sysupgrade image:
 +<code bash>
 +sysupgrade -n /tmp/openwrt-mediatek-filogic-mercusys_mr90x-v1-ubi-squashfs-sysupgrade.itb
 +</code>
 ==== Flash Layout ==== ==== Flash Layout ====
 <code bash> <code bash>
Line 306: Line 464:
 4. Do what you need (restore partitions from a backup, install OpenWrt etc.) 4. Do what you need (restore partitions from a backup, install OpenWrt etc.)
  
 +===== Debricking (OpenWrt U-Boot layout) =====
 +
 +1. Place OpenWrt ''openwrt-mediatek-filogic-mercusys_mr90x-v1-ubi-initramfs-recovery.itb'' image on the tftp server (IP: ''192.168.1.254'').
 +
 +2. Press "reset" button and power on the router. After ~10 sec release the button.
 +
 +3. Use OpenWrt initramfs system for recovery.
 +
 +==== BL2 and FIP recovery ====
 +
 +Use ''mtk_uartboot'' and UART connetion if BL2 or FIP in UBI is destroyed:
 +
 +https://github.com/981213/mtk_uartboot
 +
 +https://openwrt.org/toh/mercusys/mr90x_v1#serial
 ===== Failsafe mode ===== ===== Failsafe mode =====
 -> [[docs:guide-user:troubleshooting:failsafe_and_factory_reset]] -> [[docs:guide-user:troubleshooting:failsafe_and_factory_reset]]
Line 347: Line 520:
 ==== Info ==== ==== Info ====
  
----- datatemplatelist dttpllist ---- +<!-- ToH: { 
-templatemeta:template_datatemplatelist +  "source""json", 
-cols    BrandModelVersionsDevice TypeAvailabilitySupported Since Commit_gitSupported since RelSupported current RelUnsupportedBootloaderCPUTargetCPU MHzFlash MBsRAM MBSwitchEthernet 100M ports_Ethernet Gbit ports_Comments network ports_ModemVLANWLAN 2.4GHzWLAN 5.0GHzWLAN HardwaresWLAN Comments_Detachable Antennas_USB ports_SATA ports_Comments USB SATA ports_SerialJTAGLED countButton countPower supplyDevice Techdata_pageidForum topic URL_urlwikidevi URL_urlOEM Device Homepage URL_urlFirmware OEM Stock URL_urlFirmware OpenWrt Install URL_urlFirmware OpenWrt Upgrade URL_urlComments_ +  "dom""t", 
-filter  : Brand=MERCUSYS +  "paging"false, 
-filter  Model=MR90X +  "rotate": true, 
-filter  Versions=v1 +  "shownColumns": ["brand""model""version""devicetype""availability""supportedsincecommit""supportedsincerel""supportedcurrentrel""unsupported_functions""bootloader""cpu""target""cpumhz""flashmb""rammb""switch""ethernet100mports""ethernet1gports""commentsnetworkports""modem""vlan""wlan24ghz""wlan50ghz""wlanhardware""wlancomments""detachableantennas""usbports""sataports""commentsusbsataports""serial""jtag""ledcount""buttoncount""powersupply""deviceid""owrt_forum_topic_url""wikideviurl""oemdevicehomepageurl""firmwareoemstockurl", "firmwareopenwrtinstallurl", "firmwareopenwrtupgradeurl", "comments"]
-----+  "filterColumns"{"brand": "^MERCUSYS$", "model""^MR90X$", "version""^v1$"} 
 +-->
  
 ==== Photos ==== ==== Photos ====
Line 360: Line 534:
 /* e.g. {{:media:yourbrand:yourbrand_yourmodel_front.jpg?400|}}                                  */ /* e.g. {{:media:yourbrand:yourbrand_yourmodel_front.jpg?400|}}                                  */
 /* Thanks, your wiki administration - Oct. 2015 */ /* Thanks, your wiki administration - Oct. 2015 */
- 
-[[https://4pda.to/forum/index.php?showtopic=1065359&st=20#entry121828008|Photos]] 
  
 /* /*
Line 381: Line 553:
  
 //Main PCB://\\ //Main PCB://\\
-[[https://4pda.to/forum/index.php?showtopic=1065359&st=20#entry121828008|Photos]]+
 /* /*
 **Insert photo of PCB** **Insert photo of PCB**
  • Last modified: 2024/12/07 20:00
  • by csharper2005