Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FS#3960 - Xiaomi MiWifi Nano 3C/ R3C/ R3L dts mismatch causes the device not to boot #8954

Closed
openwrt-bot opened this issue Aug 1, 2021 · 1 comment
Labels
flyspray release/19.07 pull request/issue targeted (also) for OpenWrt 19.07 release

Comments

@openwrt-bot
Copy link

vamanea:

Supply the following if possible:

  • Device problem occurs on
    Xiaomi MiWifi R3L
  • Software versions of OpenWrt/LEDE release, packages, etc.
    OpenWrt v19.07.7
  • Steps to reproduce
  1. From the Wiki at https://openwrt.org/toh/xiaomi/mir3c flash the sysupgrade image: http://downloads.openwrt.org/releases/19.07.7/targets/ramips/mt76x8/openwrt-19.07.7-ramips-mt76x8-miwifi-nano-squashfs-sysupgrade.bin
  2. Device does not boot anymore

The problem is the dts MIWIFI-NANO.dts defines a incompatible layout of the flash, which ends up flashing OpenWrt to the wrong part of the flash.
The OEM partition layout is:

[ 1.510000] 0x000000000000-0x000001000000 : "ALL"
[ 1.510000] 0x000000000000-0x000000030000 : "Bootloader"
[ 1.520000] 0x000000030000-0x000000040000 : "Config"
[ 1.530000] 0x000000040000-0x000000050000 : "Bdata"
[ 1.530000] 0x000000050000-0x000000060000 : "Factory"
[ 1.540000] 0x000000060000-0x000000070000 : "crash"
[ 1.550000] 0x000000070000-0x000000080000 : "cfg_bak"
[ 1.550000] 0x000000080000-0x000000140000 : "overlay"
[ 1.560000] 0x000000140000-0x0000008a0000 : "OS1"
[ 1.610000] 0x0000002a0000-0x0000008a0000 : "rootfs"
[ 1.610000] 0x0000008a0000-0x000001000000 : "OS2"

with emphasis on OS1 and OS2.

However MIWIFI-NANO.dts defines firmware partition as:

partition@50000 {
compatible = "denx,uimage";
label = "firmware";
reg = <0x50000 0xfb0000>;

                    };

The bootloader will boot either OS1 or OS2 -> we get an unbootable device.

Now we have two similar devices, MiWifi Nano R1 and R3L/R3C with different partition layout but the wiki proposes to flash the same image: https://openwrt.org/toh/xiaomi/mir3c https://openwrt.org/toh/xiaomi/miwifi_nano I personally still use my R3L so I would propose we add a new device type that could cover R3L.

@aparcar aparcar added the release/19.07 pull request/issue targeted (also) for OpenWrt 19.07 release label Feb 22, 2022
@ynezz
Copy link
Member

ynezz commented May 24, 2022

OpenWrt 19.07 release is EOL, try to reproduce the issue with latest supported release and feel free to ask for issue reopening if the problem is still present, thanks.

@ynezz ynezz closed this as completed May 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
flyspray release/19.07 pull request/issue targeted (also) for OpenWrt 19.07 release
Projects
None yet
Development

No branches or pull requests

3 participants