Xiaomi mi wifi 3 support

I already tried to include & before nand and put it outside but then it wont compile for MT7620.
Tried again and yeah fails with:
Error: ../dts/MIWIFI-R3.dts:54.1-6 Label or path nand not found
FATAL ERROR: Syntax error parsing input tree

I ordered a second router just for testing. At the moment i have no (writing) access to the console nor the command line.
How does the tftp method word? I already tried the usb stick+reset key, however there was no reaction to the reset key.

Have you renamed stock fw into miwifi.bin when copying into USB drive?

Hmm, that's because nand is not set in mt7620.dtsi (check mt7621.dtsi as an example)

Ok,I think this is first MT7620a device that is using NAND.

Yes. Put dev firmware on a fat32 stick and renamed it to miwifi.bin. Saw no reaction in rhe read-only console.

The stick should be 16gb or less, you can also try another stick, may be a compatibility issue

I think that we could enable write to serial using environmental variables while in SSH.
Those should be accesible over SSH
That way recovery would be much easier.

Also,I tried to port NAND support to M7620a.
Now image builds with NAND but I dont know does it work.

Hey, i was a little bit desperade and bored. My reset button did not work, so i tried to shortcut some places at the pcb below the cpu. Somehow i got write access to console, so i can execute now commands in uboot :wink:

Update: i can confirm that lede-ramips-mt7620-miwifi-r3-initramfs-kernel.bin boots via tftpd successfully, however, no nand support...

Total memory: 128 MBytes
Flash component: NAND Flash
Date:Apr 15 2016  Time:17:46:32
============================================
icache: sets:512, ways:4, linesz:32 ,total:65536
dcache: sets:256, ways:4, linesz:32 ,total:32768

 ##### The CPU freq = 580 MHZ ####
 estimate memory size =128 Mbytes

Please choose the operation:
   1: Load system code to SDRAM via TFTP.
   2: Load system code then write to Flash via TFTP.
   3: Boot system code via Flash (default).
   4: Entr boot command line interface.
   9: Load Boot Loader code then write to Flash via TFTP.

You choosed 4
                                                                                                                                                           0


4: System Enter Boot Command Line Interface.

U-Boot 1.1.3 (Apr 15 2016 - 17:46:32)
MT7620 # help
?       - alias for 'help'
bootm   - boot application image from memory
intena   - intena
intena   - intena
go      - start application at address 'addr'
help    - print online help
md      - memory display
mdio   - Ralink PHY register R/W command !!
mm      - memory modify (auto-incrementing)
nand    - nand command
nm      - memory modify (constant address)
printenv- print environment variables
readcnt   - readcnt
reset   - Perform RESET of the CPU
rf      - read/write rf register
saveenv - save environment variables to persistent storage
setenv  - set environment variables
tftpboot- boot image via network using TFTP protocol
trap_init   - trap_init
version - print monitor version
MT7620 #
MT7620 # printenv

flag_try_sys1_failed=1
flag_try_sys2_failed=1
flag_ota_reboot=0
uart_en=1
flag_boot_rootfs=1
stdin=serial
stdout=serial
stderr=serial

Environment size: 136/4092 bytes
3 Likes

Have you tried new images that I posted?

Hi,
i used the initramfs image from here: https://drive.google.com/drive/folders/0B1VOQQ-_EIXKcmVHOEJpbmFKNGs

I can boot it via Uboot, however /proc/mtd shows no partitions. There is also no block device in /dev/
(could you compile in the support for usb sticks?

U-Boot 1.1.3 (Apr 15 2016 - 17:46:32)

Board: Ralink APSoC DRAM:  128 MB
Power on memory test. Memory size= 128 MB...OK!
relocate_code Pointer at: 87fb8000
enable ephy clock...done. rf reg 29 = 5
SSC disabled.
******************************
Software System Reset Occurred
******************************
!!! nand page size = 2048, addr len=4
..============================================
Ralink UBoot Version: 4.2.S.1
--------------------------------------------
ASIC 7620_MP (Port5<->None)
DRAM_CONF_FROM: Auto-detection
DRAM_TYPE: DDR2
DRAM component: 1024 Mbits
DRAM bus: 16 bit
Total memory: 128 MBytes
Flash component: NAND Flash
Date:Apr 15 2016  Time:17:46:32
============================================
icache: sets:512, ways:4, linesz:32 ,total:65536
dcache: sets:256, ways:4, linesz:32 ,total:32768

 ##### The CPU freq = 580 MHZ ####
 estimate memory size =128 Mbytes

Please choose the operation:
   1: Load system code to SDRAM via TFTP.
   2: Load system code then write to Flash via TFTP.
   3: Boot system code via Flash (default).
   4: Entr boot command line interface.
   9: Load Boot Loader code then write to Flash via TFTP.

You choosed 1
                                                                                                                                                           0


1: System Load Linux to SDRAM via TFTP.
 Please Input new ones /or Ctrl-C to discard
        Input device IP (192.168.31.2) ==:192.168.31.2
        Input server IP (192.168.31.1) ==:192.168.31.1
        Input Linux Kernel filename (lede-ramips-mt7620-miwifi-r3-initramfs-kernel.bin) ==:lede-ramips-mt7620-miwifi-r3-initramfs-kernel.bin

 netboot_common, argc= 3

 NetTxPacket = 0x87FE6380

 KSEG1ADDR(NetTxPacket) = 0xA7FE6380

 NetLoop,call eth_halt !

 NetLoop,call eth_init !
Trying Eth0 (10/100-M)

 Waitting for RX_DMA_BUSY status Start... done


 ETH_STATE_ACTIVE!!
TFTP from server 192.168.31.1; our IP address is 192.168.31.2
Filename 'lede-ramips-mt7620-miwifi-r3-initramfs-kernel.bin'.

 TIMEOUT_COUNT=10,Load address: 0x80a00000
Loading: T Got ARP REPLY, set server/gtwy eth addr (f0:de:f1:07:39:17)
Got it
#################################################################
         #################################################################
         #################################################################
         #############################################checksum bad
####################
         #################################################################
         ###################################################checksum bad
##############
         #################################################################
         #################################################################
         #################################################################
         #################################################################
done
Bytes transferred = 3324247 (32b957 hex)
NetBootFileXferSize= 0032b957
Automatic boot of image at addr 0x80A00000 ...
## Booting image at 80a00000 ...
   Image Name:   MIPS LEDE Linux-4.9.44
   Image Type:   MIPS Linux Kernel Image (lzma compressed)
   Data Size:    3324183 Bytes =  3.2 MB
   Load Address: 80000000
   Entry Point:  80000000
   Verifying Checksum ... OK
   Uncompressing Kernel Image ... OK
commandline uart_en=1 factory_mode=0 mem=128m
No initrd
## Transferring control to Linux (at address 80000000) ...
## Giving linux memsize in MB, 128

Starting kernel ...

[    0.000000] Linux version 4.9.44 (robimarko@Builder) (gcc version 5.4.0 (LEDE GCC 5.4.0 r4710-34b5230) ) #0 Fri Aug 18 13:02:29 2017
[    0.000000] Board has DDR2
[    0.000000] Analog PMU set to hw control
[    0.000000] Digital PMU set to hw control
[    0.000000] SoC Type: MediaTek MT7620A ver:2 eco:6
[    0.000000] bootconsole [early0] enabled
[    0.000000] CPU0 revision is: 00019650 (MIPS 24KEc)
[    0.000000] MIPS: machine is Xiaomi MiWiFi R3
[    0.000000] Determined physical RAM map:
[    0.000000]  memory: 08000000 @ 00000000 (usable)
[    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, PIPT, no 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 in Zone order, mobility grouping on.  Total pages: 32512
[    0.000000] Kernel command line: console=ttyS0,115200 rootfstype=squashfs,jffs2
[    0.000000] PID hash table entries: 512 (order: -1, 2048 bytes)
[    0.000000] Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
[    0.000000] Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
[    0.000000] Writing ErrCtl register=0007ffd0
[    0.000000] Readback ErrCtl register=0007ffd0
[    0.000000] Memory: 123484K/131072K available (3139K kernel code, 157K rwdata, 752K rodata, 2088K init, 216K bss, 7588K reserved, 0K cma-reserved)
[    0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] NR_IRQS:256
[    0.000000] CPU Clock: 580MHz
[    0.000000] clocksource: systick: mask: 0xffff max_cycles: 0xffff, max_idle_ns: 583261500 ns
[    0.000000] systick: enable autosleep mode
[    0.000000] systick: running - mult: 214748, shift: 32
[    0.000000] clocksource: MIPS: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 6590553264 ns
[    0.000012] sched_clock: 32 bits at 290MHz, resolution 3ns, wraps every 7405115902ns
[    0.007577] Calibrating delay loop... 385.84 BogoMIPS (lpj=1929216)
[    0.070064] pid_max: default: 32768 minimum: 301
[    0.074684] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.081058] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.094817] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.104365] futex hash table entries: 256 (order: -1, 3072 bytes)
[    0.110323] pinctrl core: initialized pinctrl subsystem
[    0.116031] NET: Registered protocol family 16
[    0.381804] PCI host bridge /pcie@10140000 ranges:
[    0.386419]  MEM 0x0000000020000000..0x000000002fffffff
[    0.391470]   IO 0x0000000010160000..0x000000001016ffff
[    0.410116] rt2880_gpio 10000600.gpio: registering 24 gpios
[    0.415510] rt2880_gpio 10000600.gpio: registering 24 irq handlers
[    0.421921] rt2880_gpio 10000638.gpio: registering 16 gpios
[    0.427297] rt2880_gpio 10000638.gpio: registering 16 irq handlers
[    0.433631] rt2880_gpio 10000660.gpio: registering 32 gpios
[    0.439005] rt2880_gpio 10000660.gpio: registering 32 irq handlers
[    0.445888] PCI host bridge to bus 0000:00
[    0.449813] pci_bus 0000:00: root bus resource [mem 0x20000000-0x2fffffff]
[    0.456525] pci_bus 0000:00: root bus resource [io  0xffffffff]
[    0.462231] pci_bus 0000:00: root bus resource [??? 0x00000000 flags 0x0]
[    0.468835] pci_bus 0000:00: No busn resource found for root bus, will use [bus 00-ff]
[    0.476970] pci 0000:00:00.0: bridge configuration invalid ([bus 00-00]), reconfiguring
[    0.485493] pci 0000:00:00.0: BAR 0: no space for [mem size 0x80000000]
[    0.491860] pci 0000:00:00.0: BAR 0: failed to assign [mem size 0x80000000]
[    0.498668] pci 0000:00:00.0: BAR 8: assigned [mem 0x20000000-0x200fffff]
[    0.505217] pci 0000:00:00.0: BAR 9: assigned [mem 0x20100000-0x201fffff pref]
[    0.512244] pci 0000:00:00.0: BAR 1: assigned [mem 0x20200000-0x2020ffff]
[    0.518831] pci 0000:01:00.0: BAR 0: assigned [mem 0x20000000-0x200fffff 64bit]
[    0.525951] pci 0000:01:00.0: BAR 6: assigned [mem 0x20100000-0x2010ffff pref]
[    0.532938] pci 0000:00:00.0: PCI bridge to [bus 01]
[    0.537769] pci 0000:00:00.0:   bridge window [mem 0x20000000-0x200fffff]
[    0.544350] pci 0000:00:00.0:   bridge window [mem 0x20100000-0x201fffff pref]
[    0.551393] pci 0000:00:00.0: card - bus=0x0, slot = 0x0 irq=0
[    0.557033] pci 0000:01:00.0: card - bus=0x1, slot = 0x0 irq=4
[    0.566396] clocksource: Switched to clocksource systick
[    0.572855] NET: Registered protocol family 2
[    0.577963] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[    0.584687] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[    0.590913] TCP: Hash tables configured (established 1024 bind 1024)
[    0.597145] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.602773] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.609142] NET: Registered protocol family 1
[    2.596393] random: fast init done
[    3.360360] rt-timer 10000100.timer: maximum frequency is 1220Hz
[    3.367053] Crashlog allocated RAM at address 0x3f00000
[    3.373236] workingset: timestamp_bits=30 max_order=15 bucket_order=0
[    3.387756] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    3.393358] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    3.488191] io scheduler noop registered
[    3.491938] io scheduler deadline registered (default)
[    3.497218] ralink-usb-phy usbphy: invalid resource
[    3.502507] Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
[    3.509774] console [ttyS0] disabled
[    3.513228] 10000c00.uartlite: ttyS0 at MMIO 0x10000c00 (irq = 20, base_baud = 2500000) is a Palmchip BK-3103
[    3.522904] console [ttyS0] enabled
[    3.522904] console [ttyS0] enabled
[    3.529936] bootconsole [early0] disabled
[    3.529936] bootconsole [early0] disabled
[    3.539883] libphy: Fixed MDIO Bus: probed
[    3.549895] gsw: setting port4 to ephy mode
[    3.554213] mtk_soc_eth 10100000.ethernet eth0 (uninitialized): port 4 link up (100Mbps/Full duplex)
[    3.563613] mtk_soc_eth 10100000.ethernet: generated random MAC address c2:21:84:49:15:0c
[    3.572048] mtk_soc_eth 10100000.ethernet: loaded mt7620 driver
[    3.578964] mtk_soc_eth 10100000.ethernet eth0: mediatek frame engine at 0xb0100000, irq 5
[    3.587997] rt2880_wdt 10000120.watchdog: Initialized
[    3.594275] NET: Registered protocol family 10
[    3.601990] NET: Registered protocol family 17
[    3.606666] 8021q: 802.1Q VLAN Support v1.8
[    3.624628] Freeing unused kernel memory: 2088K
[    3.629290] This architecture does not have kernel memory protection.
[    3.648836] init: Console is alive
[    3.652539] init: - watchdog -
[    3.681630] kmodloader: loading kernel modules from /etc/modules-boot.d/*
[    3.700229] usbcore: registered new interface driver usbfs
[    3.705942] usbcore: registered new interface driver hub
[    3.711573] usbcore: registered new device driver usb
[    3.722540] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    3.731017] ehci-platform: EHCI generic platform driver
[    3.746744] phy phy-usbphy.0: remote usb device wakeup disabled
[    3.752792] phy phy-usbphy.0: UTMI 16bit 30MHz
[    3.757369] ehci-platform 101c0000.ehci: EHCI Host Controller
[    3.763271] ehci-platform 101c0000.ehci: new USB bus registered, assigned bus number 1
[    3.771497] ehci-platform 101c0000.ehci: irq 26, io mem 0x101c0000
[    3.787710] ehci-platform 101c0000.ehci: USB 2.0 started, EHCI 1.00
[    3.795222] hub 1-0:1.0: USB hub found
[    3.799501] hub 1-0:1.0: 1 port detected
[    3.806537] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[    3.814377] ohci-platform: OHCI generic platform driver
[    3.820069] ohci-platform 101c1000.ohci: Generic Platform OHCI controller
[    3.827031] ohci-platform 101c1000.ohci: new USB bus registered, assigned bus number 2
[    3.835234] ohci-platform 101c1000.ohci: irq 26, io mem 0x101c1000
[    3.869247] hub 2-0:1.0: USB hub found
[    3.873457] hub 2-0:1.0: 1 port detected
[    3.881016] kmodloader: done loading kernel modules from /etc/modules-boot.d/*
[    3.889619] init: - preinit -
[    4.051434] 8021q: adding VLAN 0 to HW filter on device eth0
[    4.113442] usb 1-1: new high-speed USB device number 2 using ehci-platform
Press the [f] key and hit [enter] to enter failsafe mode
Press the [1], [2], [3] or [4] key and hit [enter] to select the debug level
4
[    4.572891] procd: - early -
[    4.575967] procd: - watchdog -
[    4.862486] procd: - watchdog -
[    4.866298] procd: - ubus -
[    4.893413] procd: - init -
Please press Enter to activate this console.
[    5.068589] kmodloader: loading kernel modules from /etc/modules.d/*
[    5.081596] ip6_tables: (C) 2000-2006 Netfilter Core Team
[    5.098641] Loading modules backported from Linux version wt-2017-01-31-0-ge882dff19e7f
[    5.106818] Backport generated by backports.git backports-20160324-13-g24da7d3c
[    5.175419] mt76x2e 0000:01:00.0: ASIC revision: 76120044
[    5.182311] mt76x2e 0000:01:00.0: Invalid MAC address, using random address 8a:e8:ce:ce:15:a8
[    5.195508] mt76x2e 0000:01:00.0: ROM patch already applied
[    5.202180] mt76x2e 0000:01:00.0: Firmware Version: 0.0.00
[    5.207832] mt76x2e 0000:01:00.0: Build: 1
[    5.212012] mt76x2e 0000:01:00.0: Build Time: 201507311614____
[    5.228971] mt76x2e 0000:01:00.0: Firmware running!
[    5.264675] ip_tables: (C) 2000-2006 Netfilter Core Team
[    5.282085] nf_conntrack version 0.5.0 (2048 buckets, 8192 max)
[    5.457547] xt_time: kernel timezone is -0000
[    5.487395] PPP generic driver version 2.4.2
[    5.509264] NET: Registered protocol family 24
[    5.561247] rt2800_wmac 10180000.wmac: failed to get mtd device "Factory"
[    5.568198] ieee80211 phy1: rt2x00lib_request_eeprom_file: Info - Loading EEPROM data from 'soc_wmac.eeprom'.
[    5.598393] rt2800_wmac 10180000.wmac: Direct firmware load for soc_wmac.eeprom failed with error -2
[    5.607787] rt2800_wmac 10180000.wmac: Falling back to user helper
rt2x00 eeprom:  Please define mtd-eeprom in miwi[    5.698448] firmware soc_wmac.eeprom: firmware_loading_store: map pages failed
[    5.707471] ieee80211 phy1: rt2x00lib_request_eeprom_file: Error - Failed to request EEPROM.

[    5.717332] rt2800_wmac: probe of 10180000.wmac failed with error -11
[    5.747972] kmodloader: done loading kernel modules from /etc/modules.d/*
rt2x00 eeprom:  Please define mtd-eeprom in miwifi-r3 DTS file!
[   12.183104] 8021q: adding VLAN 0 to HW filter on device eth0
[   12.216242] br-lan: port 1(eth0.1) entered blocking state
[   12.222016] br-lan: port 1(eth0.1) entered disabled state
[   12.227990] device eth0.1 entered promiscuous mode
[   12.232950] device eth0 entered promiscuous mode
[   12.303808] br-lan: port 1(eth0.1) entered blocking state
[   12.309400] br-lan: port 1(eth0.1) entered forwarding state
udhcpc: started, v1.26.2
udhcpc: sending discover
udhcpc: no lease, failing



BusyBox v1.26.2 () built-in shell (ash)

     _________
    /        /\      _    ___ ___  ___
   /  LE    /  \    | |  | __|   \| __|
  /    DE  /    \   | |__| _|| |) | _|
 /________/  LE  \  |____|___|___/|___|                      lede-project.org
 \        \   DE /
  \    LE  \    /  -----------------------------------------------------------
   \  DE    \  /    Reboot (SNAPSHOT, r4720-f4ec167)
    \________\/    -----------------------------------------------------------

=== WARNING! =====================================
There is no root password defined on this device!
Use the "passwd" command to set up a new password
in order to prevent unauthorized SSH logins.
--------------------------------------------------


root@LEDE:/# ls -la /dev
drwxr-xr-x    4 root     root           560 Aug 20 09:16 .
drwxr-xr-x   16 root     root             0 Jan  1  1970 ..
drwxr-xr-x    3 root     root            60 Jan  1  1970 bus
crw-------    1 root     root        5,   1 Aug 20 09:16 console
crw-------    1 root     root       10,  63 Jan  1  1970 cpu_dma_latency
crw-rw-rw-    1 root     root        1,   7 Jan  1  1970 full
crw-------    1 root     root      254,   0 Jan  1  1970 gpiochip0
crw-------    1 root     root      254,   1 Jan  1  1970 gpiochip1
crw-------    1 root     root      254,   2 Jan  1  1970 gpiochip2
crw-------    1 root     root        1,  11 Jan  1  1970 kmsg
srw-rw-rw-    1 root     root             0 Aug 20 09:16 log
crw-------    1 root     root       10,  60 Jan  1  1970 memory_bandwidth
crw-------    1 root     root       10,  62 Jan  1  1970 network_latency
crw-------    1 root     root       10,  61 Jan  1  1970 network_throughput
crw-rw-rw-    1 root     root        1,   3 Jan  1  1970 null
crw-------    1 root     root        1,   4 Jan  1  1970 port
crw-------    1 root     root      108,   0 Aug 20 09:16 ppp
crw-rw-rw-    1 root     root        5,   2 Jan  1  1970 ptmx
drwxr-xr-x    2 root     root             0 Jan  1  1970 pts
crw-rw-rw-    1 root     root        1,   8 Jan  1  1970 random
lrwxrwxrwx    1 root     root             8 Jan  1  1970 shm -> /tmp/shm
crw-rw-rw-    1 root     root        5,   0 Jan  1  1970 tty
crw-rw----    1 root     tty         4,  64 Aug 20 09:19 ttyS0
crw-rw----    1 root     tty         4,  65 Jan  1  1970 ttyS1
crw-rw-rw-    1 root     root        1,   9 Jan  1  1970 urandom
crw-------    1 root     root       10, 130 Jan  1  1970 watchdog
crw-------    1 root     root      253,   0 Jan  1  1970 watchdog0
crw-rw-rw-    1 root     root        1,   5 Jan  1  1970 zero


root@LEDE:/# cat /proc/device-tree/nand@1e003000/
#address-cells      partition@0/        partition@200000/   reg
#size-cells         partition@0xc0000/  partition@40000/    status
bank-width          partition@100000/   partition@600000/
compatible          partition@140000/   partition@80000/
name                partition@180000/   partition@a00000/

When did you download the image because today at 11:19 I deleted old images since NAND was broken in them and uploaded new ones that should fix NAND(I hope so)

It should work over USB as well

nope, have the new image. I edited my previous post and added the log + some console commands. The weird thing is, that under /sys i see the partitions, however they are not listed in /dev.

Hm,that is weird.
Can you try to sysupgrade -n while running kernel image?

root@LEDE:/tmp# sysupgrade lede-ramips-mt7620-miwifi-r3-squashfs-sysupgrade.tar
Invalid image type.
Image check 'platform_check_image' failed.

Note: The internal lan (br-lan) is connected to the wrong interface. The router has 2 lan ports and 1 wan port. At the moment, br-lan is linked to the wan port.

Most likely board name or model are set wrong.
What does cat /proc/cpuinfo return?
I did not check how ports were connected because I assumed that they are same as is Mi Wifi Mini,but that can be solved.
First we need to get it working at all

Update (cpuinfo + sysupgrade -F)

root@LEDE:/tmp# cat /proc/cpuinfo
system type             : MediaTek MT7620A ver:2 eco:6
machine                 : Xiaomi MiWiFi R3
processor               : 0
cpu model               : MIPS 24KEc V5.0
BogoMIPS                : 385.84
wait instruction        : yes
microsecond timers      : yes
tlb_entries             : 32
extra interrupt vector  : yes
hardware watchpoint     : yes, count: 4, address/irw mask: [0x0ffc, 0x0ffc, 0x0ffb, 0x0ffb]
isa                     : mips1 mips2 mips32r1 mips32r2
ASEs implemented        : mips16 dsp
shadow register sets    : 1
kscratch registers      : 0
package                 : 0
core                    : 0
VCED exceptions         : not available
VCEI exceptions         : not available

root@LEDE:/tmp# sysupgrade -n -F lede-ramips-mt7620-miwifi-r3-squashfs-sysupgrad
e.tar
Invalid image type.
Image check 'platform_check_image' failed but --force given - will update anyway!
killall: watchdog: no process killed
Commencing upgrade. All shell sessions will be closed now.
Watchdog handover: fd=3
- watchdog -
killall: telnetd: no process killed
Sending TERM to remaining processes ... ubusd logd netifd odhcpd ntpd dnsmasq
Sending KILL to remaining processes ...
Performing system upgrade...
Could not open mtd device: firmware
Can't open device for writing!
Upgrade completed
Rebooting system...
umount: can't unmount /dev: Resource busy
umount: can't unmount /tmp: Resource [   65.851351] reboot: Restarting system
busy
umount: can't unmount /: Invalid argument

I have a feeling that sysupgrade is being denied because partitions do not match ones in sysupgrade.
Can you try following instructions for manual flash posted earlier in this thread?

I should get one R3 tommorow so I can also test

I guess sysupgrade fails, because there are no mtd-devices in /dev. Even the block-device for the nand flash is not visible.

It is most likely due to my bad port of NAND support from MT7621.
Problem is that patch that had NAND driver for MT7620 was dropped when kernel was updated to 4.9

We really need someone who knows more than me.

@dissent1 Any time to help?

1 Like