Xiaomi mi wifi 3 support

That is weird.
I really have no idea what could it be,could easily be error in NAND driver patch.
Maybe @dissent1 has a idea?

Would you please share how you got write access to console

Can you try images that use 4.4 kernel?
They are here:https://drive.google.com/drive/folders/0B1VOQQ-_EIXKbFIxY1UyT3FlUFk

That way NAND driver rebase for 4.9 can be ruled out

Provide the full log please

Sorry but I am still trying to debrick it.
This is the log from 4.9 test

Starting kernel ...

[    0.000000] Linux version 4.9.44 (robimarko@Builder-temp) (gcc version 5.4.0 (LEDE GCC 5.4.0 r4771-244f81d) ) #0 Thu Aug 24 22:09:10 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=0001c150
[    0.000000] Readback ErrCtl register=0001c150
[    0.000000] Memory: 125404K/131072K available (3139K kernel code, 157K rwdata, 752K rodata, 168K init, 216K bss, 5668K 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.000011] sched_clock: 32 bits at 290MHz, resolution 3ns, wraps every 7405115902ns
[    0.007577] Calibrating delay loop... 385.84 BogoMIPS (lpj=1929216)
[    0.070078] pid_max: default: 32768 minimum: 301
[    0.074695] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.081069] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.094803] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.104353] futex hash table entries: 256 (order: -1, 3072 bytes)
[    0.110308] pinctrl core: initialized pinctrl subsystem
[    0.116010] NET: Registered protocol family 16
[    0.381771] PCI host bridge /pcie@10140000 ranges:
[    0.386386]  MEM 0x0000000020000000..0x000000002fffffff
[    0.391438]   IO 0x0000000010160000..0x000000001016ffff
[    0.410095] rt2880_gpio 10000600.gpio: registering 24 gpios
[    0.415491] rt2880_gpio 10000600.gpio: registering 24 irq handlers
[    0.421899] rt2880_gpio 10000638.gpio: registering 16 gpios
[    0.427276] rt2880_gpio 10000638.gpio: registering 16 irq handlers
[    0.433612] rt2880_gpio 10000660.gpio: registering 32 gpios
[    0.438987] rt2880_gpio 10000660.gpio: registering 32 irq handlers
[    0.445842] PCI host bridge to bus 0000:00
[    0.449768] pci_bus 0000:00: root bus resource [mem 0x20000000-0x2fffffff]
[    0.456479] pci_bus 0000:00: root bus resource [io  0xffffffff]
[    0.462185] pci_bus 0000:00: root bus resource [??? 0x00000000 flags 0x0]
[    0.468789] pci_bus 0000:00: No busn resource found for root bus, will use [bus 00-ff]
[    0.476940] pci 0000:00:00.0: bridge configuration invalid ([bus 00-00]), reconfiguring
[    0.485465] pci 0000:00:00.0: BAR 0: no space for [mem size 0x80000000]
[    0.491832] pci 0000:00:00.0: BAR 0: failed to assign [mem size 0x80000000]
[    0.498640] pci 0000:00:00.0: BAR 8: assigned [mem 0x20000000-0x200fffff]
[    0.505188] pci 0000:00:00.0: BAR 9: assigned [mem 0x20100000-0x201fffff pref]
[    0.512216] pci 0000:00:00.0: BAR 1: assigned [mem 0x20200000-0x2020ffff]
[    0.518803] pci 0000:01:00.0: BAR 0: assigned [mem 0x20000000-0x200fffff 64bit]
[    0.525924] pci 0000:01:00.0: BAR 6: assigned [mem 0x20100000-0x2010ffff pref]
[    0.532910] pci 0000:00:00.0: PCI bridge to [bus 01]
[    0.537742] pci 0000:00:00.0:   bridge window [mem 0x20000000-0x200fffff]
[    0.544322] pci 0000:00:00.0:   bridge window [mem 0x20100000-0x201fffff pref]
[    0.551366] pci 0000:00:00.0: card - bus=0x0, slot = 0x0 irq=0
[    0.557005] pci 0000:01:00.0: card - bus=0x1, slot = 0x0 irq=4
[    0.566367] clocksource: Switched to clocksource systick
[    0.572827] NET: Registered protocol family 2
[    0.577924] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[    0.584650] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[    0.590874] TCP: Hash tables configured (established 1024 bind 1024)
[    0.597108] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.602732] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.609122] NET: Registered protocol family 1
[    0.615648] rt-timer 10000100.timer: maximum frequency is 1220Hz
[    0.622336] Crashlog allocated RAM at address 0x3f00000
[    0.628702] workingset: timestamp_bits=30 max_order=15 bucket_order=0
[    0.643150] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.648797] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    0.667117] io scheduler noop registered
[    0.670863] io scheduler deadline registered (default)
[    0.676070] ralink-usb-phy usbphy: invalid resource
[    0.681433] Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
[    0.688703] console [ttyS0] disabled
[    0.692158] 10000c00.uartlite: ttyS0 at MMIO 0x10000c00 (irq = 20, base_baud = 2500000) is a Palmchip BK-3103
[    0.701833] console [ttyS0] enabled
[    0.701833] console [ttyS0] enabled
[    0.708865] bootconsole [early0] disabled
[    0.708865] bootconsole [early0] disabled
[    0.718834] libphy: Fixed MDIO Bus: probed
[    0.728858] gsw: setting port4 to ephy mode
[    0.733219] mtk_soc_eth 10100000.ethernet: generated random MAC address 1a:02:a7:4a:74:d0
[    0.741678] mtk_soc_eth 10100000.ethernet: loaded mt7620 driver
[    0.748595] mtk_soc_eth 10100000.ethernet eth0: mediatek frame engine at 0xb0100000, irq 5
[    0.757633] rt2880_wdt 10000120.watchdog: Initialized
[    0.763929] NET: Registered protocol family 10
[    0.771612] NET: Registered protocol family 17
[    0.776212] 8021q: 802.1Q VLAN Support v1.8
[    0.783255] VFS: Cannot open root device "(null)" or unknown-block(0,0): error -6
[    0.790962] Please append a correct "root=" boot option; here are the available partitions:
[    0.799498] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
[    0.809141] Rebooting in 1 seconds..

USB recovery should work.
You have instructions few post higher

No, usb recovery does not work.

@dgiese has the same problem,but managed to solve it.

Update: Ignore my idea below, at the moment i look for a different, safe approach...

Hi, to be honest, i dont know exactly the bridge, that solved the problem. I shorted a lot of pads with a small screwdriver, before i noticed that the console write works again. It could be some random fault state or some bitflip.

As you do not have too much to lose (technically the device is bricked, if you do not have a nand flash writer), i would start to short pads like C49 under the cpu (the one with the heatsink) or the pads next to the heatsink.

No warranty or something like that, but try the places on the pictures, while the router is running. If i remember correctlly, i tried them. It would be great, if you would use a more systematic way, so we would know exactly, which pad is the correct one.

Sorry but already damaged the board while trying to unsolder the nand chip.

@dgiese @dissent1 I have finally caught some time to try and make LEDE work.
4.4 kernel loads via TFT without issues and I have configured switch this time properly,unfortunately now my partition table is changed so It would be helpfull to return to stock and then test if images work.

Thankfully I had all partition dumps so I flashed kernel0 back to restore using USB

Unfortunately still the same issue.
But this time it just bootloops,I cant even select option to load from tftp.

I have now really exhausted my knowledge.
It could easily be NAND driver issue since I triple checked my partition layout which shows up completely fine in initframs image.
Also sysupgrade still outputs:

Invalid image type.
Image check 'platform_check_image' failed.

can you give the url to your current firmware? will try it out tomorrow...

btw: flashing back the orignal kernel sets at some point the uart_en=0 flag, if i remember correctly

Sure, here it is:
https://drive.google.com/drive/folders/0B1VOQQ-_EIXKcmVHOEJpbmFKNGs

You have kernel 4.4 and 4.9 builds from today.
Yes I know about uart_en=0 flag, thats why after immediatelly after stock was booted I set it to 1 and saved it.
Its not like I cant write to console but instead it auto reboots and goes straight to loading from flash instead of having 5 seconds to chose method.

You tried to keep the corresponding number pressed while boot? Or press "c" or "s" while boot (unplug router, replug it again)

Yes,tried holding number.
C or S also makes no difference, it auto jumps to load from flash.
I cant believe that it is stuck in this loop, any idea to recover?

@dgiese Still giving me the same error.
I really dont understand why is boot menu selection time of 5 secunds just skipped altough boot menu is displayed.
No buttons pressed really help.
I am out of ideas to recover

My R3 is still bricked so I have no way of testing, but I added @dissent1 uboot mod to enable preserving kernel0 for future recovery.
If someone wants to test here it is:
https://drive.google.com/drive/folders/0B1VOQQ-_EIXKekpaa3d6bERUZ2s?usp=sharing
Instructions are here:
https://github.com/robimarko/source/commit/4cc61e14fbb0239353bae2818227c7aa354d34e8

Can somebody who has stock firmware installed check if kmod-softdog is used in stock?

Hello,

I'd like to help getting lede on this router.
I've gotten ssh on it, it's running the stock firmware.

I will be able to check for the kmod-softdog kernel module in 16 hours. - Can I check it simply using lsmod?

I dont know since mine is currently bricked.