Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision Next revisionBoth sides next revision | ||
| toh:xiaomi:mir3c [2021/11/05 23:42] – [OEM(?) bootlog] eduardo010174 | toh:xiaomi:mir3c [2021/11/17 21:44] – [U-Boot Stock Recovery] s.farid | ||
|---|---|---|---|
| Line 41: | Line 41: | ||
| filter | filter | ||
| ---- | ---- | ||
| + | 1. Use OpenWRTInvasion method to gain telnet access. | ||
| + | https:// | ||
| + | (IP: 192.168.31.1 - Username: root - Password: root) | ||
| + | |||
| + | 2. Connect to router using telnet. | ||
| + | |||
| + | 3. Backup all partitions using command: | ||
| + | < | ||
| + | dd if=/ | ||
| + | </ | ||
| + | |||
| + | Copy /tmp/mtd0 to computer using ftp. | ||
| + | |||
| + | 4. Copy openwrt-ramips-mt76x8-xiaomi_miwifi-3c-squashfs-sysupgrade.bin | ||
| + | to /tmp in router using ftp. | ||
| + | |||
| + | 5. İnstall Openwrt to OS1 and free OS2. | ||
| + | |||
| + | < | ||
| + | mtd erase OS1 | ||
| + | |||
| + | mtd erase OS2 | ||
| + | |||
| + | mtd -r write / | ||
| + | </ | ||
| + | |||
| + | Limitations: | ||
| + | than 7733248 bits. | ||
| - | See [[commit> | + | Commit page:[[commit> |
| Line 83: | Line 111: | ||
| ^ Serial connection parameters\\ for Xiaomi Mi WiFi 3C | 115200, 8N1 | | ^ Serial connection parameters\\ for Xiaomi Mi WiFi 3C | 115200, 8N1 | | ||
| + | |||
| + | ===== Unbrick ===== | ||
| + | ==== U-Boot Stock Recovery ==== | ||
| + | Recovery mode only works with offical Xiaomi firmware' | ||
| + | |||
| + | - Download stock firmware: http:// | ||
| + | - Config static ip on your computer: | ||
| + | < | ||
| + | IP address: 192.168.31.2 | ||
| + | Subnet mask: 255.255.255.0 | ||
| + | Default gateway: 192.168.31.1 | ||
| + | </ | ||
| + | - Remove power cable from router. | ||
| + | - Connect ethernet cable on Computer and Wan port (Blue Port). | ||
| + | - Press continuously reset button and re-connect power cable. | ||
| + | - Continue to hold down the Reset button until the front LED colour changes from static orange to blinking orange. | ||
| + | - Open browser and enter http:// | ||
| + | - Select firmware file and click on upload button. | ||
| + | - Wait until router restart (5 minutes). | ||
| + | |||
| + | More info and credits: https:// | ||
| + | |||
| + | ==== SPI Programmer ==== | ||
| + | |||
| + | On step 3 of installation of Openwrt, gets file mtd0 with contains all flash backup. | ||
| + | Write this file directly to flash. | ||
| ===== Bootlogs ===== | ===== Bootlogs ===== | ||
| Line 499: | Line 553: | ||
| </ | </ | ||
| + | ==== Openwrt Log ==== | ||
| + | |||
| + | <WRAP bootlog> | ||
| + | < | ||
| + | [04050C0A][04050C0C] | ||
| + | DDR Calibration DQS reg = 00008887 | ||
| + | |||
| + | |||
| + | U-Boot 1.1.3 (Sep 6 2018 - 11:44:39) | ||
| + | |||
| + | Board: Ralink APSoC DRAM: 64 MB | ||
| + | Power on memory test. Memory size= 64 MB...OK! | ||
| + | relocate_code Pointer at: 83fa8000 | ||
| + | RT2880_RSTSTAT_REG 0xc0030000 | ||
| + | *************************** | ||
| + | Board power on Occurred | ||
| + | *************************** | ||
| + | flash manufacture id: c8, device id 40 18 | ||
| + | find flash: GD25Q128C | ||
| + | env is right! | ||
| + | ============================================ | ||
| + | Ralink UBoot Version: 4.3.0.0 | ||
| + | -------------------------------------------- | ||
| + | ASIC 7628_MP (Port5< | ||
| + | DRAM component: 512 Mbits DDR, width 16 | ||
| + | DRAM bus: 16 bit | ||
| + | Total memory: 64 MBytes | ||
| + | Flash component: SPI Flash | ||
| + | Date: | ||
| + | ============================================ | ||
| + | icache: sets:512, ways:4, linesz:32 , | ||
| + | dcache: sets:256, ways:4, linesz:32 , | ||
| + | |||
| + | ##### The CPU freq = 575 MHZ #### | ||
| + | | ||
| + | RESET MT7628 PHY!!!!!! | ||
| + | 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. | ||
| + | 5: Load system2 code then write to Flash via TFTP. | ||
| + | 7: Load system code via web. | ||
| + | 9: Load Boot Loader code then write to Flash via TFTP. | ||
| + | | ||
| + | n3: System Boot system code via Flash. | ||
| + | Booting System 1 | ||
| + | Erasing SPI Flash... | ||
| + | raspi_erase: | ||
| + | . | ||
| + | Writing to SPI Flash... | ||
| + | . | ||
| + | done | ||
| + | ## Booting image at bc140000 ... | ||
| + | Image Name: MIPS OpenWrt Linux-5.4.155 | ||
| + | Image Type: MIPS Linux Kernel Image (lzma compressed) | ||
| + | Data Size: 2145791 Bytes = 2 MB | ||
| + | Load Address: 80000000 | ||
| + | Entry Point: | ||
| + | | ||
| + | | ||
| + | commandline uart_en=1 factory_mode=0 mem=64m root=/ | ||
| + | No initrd | ||
| + | ## Transferring control to Linux (at address 80000000) ... | ||
| + | ## Giving linux memsize in MB, 64 | ||
| + | |||
| + | Starting kernel ... | ||
| + | |||
| + | [ 0.000000] Linux version 5.4.155 (builder@buildhost) (gcc version 11.2.0 (OpenWrt GCC 11.2.0 r18014-15e55a2190)) #0 Sat Nov 6 05:18:48 2021 | ||
| + | [ 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 MT7628AN ver:1 eco:2 | ||
| + | [ 0.000000] printk: bootconsole [early0] enabled | ||
| + | [ 0.000000] CPU0 revision is: 00019655 (MIPS 24KEc) | ||
| + | [ 0.000000] MIPS: machine is Xiaomi MiWiFi 3C | ||
| + | [ 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] | ||
| + | [ 0.000000] Movable zone start for each node | ||
| + | [ 0.000000] Early memory node ranges | ||
| + | [ 0.000000] | ||
| + | [ 0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x0000000003ffffff] | ||
| + | [ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 16240 | ||
| + | [ 0.000000] Kernel command line: console=ttyS0, | ||
| + | [ 0.000000] Dentry cache hash table entries: 8192 (order: 3, 32768 bytes, linear) | ||
| + | [ 0.000000] Inode-cache hash table entries: 4096 (order: 2, 16384 bytes, linear) | ||
| + | [ 0.000000] Writing ErrCtl register=00057ff9 | ||
| + | [ 0.000000] Readback ErrCtl register=00057ff9 | ||
| + | [ 0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off | ||
| + | [ 0.000000] Memory: 56932K/ | ||
| + | [ 0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, | ||
| + | [ 0.000000] NR_IRQS: 256 | ||
| + | [ 0.000000] intc: using register map from devicetree | ||
| + | [ 0.000000] random: get_random_bytes called from start_kernel+0x354/ | ||
| + | [ 0.000000] CPU Clock: 580MHz | ||
| + | [ 0.000000] timer_probe: | ||
| + | [ 0.000000] clocksource: | ||
| + | [ 0.000009] sched_clock: | ||
| + | [ 0.007569] Calibrating delay loop... 385.84 BogoMIPS (lpj=1929216) | ||
| + | [ 0.073494] pid_max: default: 32768 minimum: 301 | ||
| + | [ 0.078119] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes, linear) | ||
| + | [ 0.085137] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes, linear) | ||
| + | [ 0.098318] clocksource: | ||
| + | [ 0.107820] futex hash table entries: 256 (order: -1, 3072 bytes, linear) | ||
| + | [ 0.114459] pinctrl core: initialized pinctrl subsystem | ||
| + | [ 0.122397] NET: Registered protocol family 16 | ||
| + | [ 0.156468] workqueue: max_active 576 requested for napi_workq is out of range, clamping between 1 and 512 | ||
| + | [ 0.169652] clocksource: | ||
| + | [ 0.175498] thermal_sys: | ||
| + | [ 0.175962] NET: Registered protocol family 2 | ||
| + | [ 0.186084] IP idents hash table entries: 2048 (order: 2, 16384 bytes, linear) | ||
| + | [ 0.193868] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 4096 bytes, linear) | ||
| + | [ 0.201979] TCP established hash table entries: 1024 (order: 0, 4096 bytes, linear) | ||
| + | [ 0.209330] TCP bind hash table entries: 1024 (order: 0, 4096 bytes, linear) | ||
| + | [ 0.216152] TCP: Hash tables configured (established 1024 bind 1024) | ||
| + | [ 0.222419] UDP hash table entries: 256 (order: 0, 4096 bytes, linear) | ||
| + | [ 0.228691] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes, linear) | ||
| + | [ 0.235775] NET: Registered protocol family 1 | ||
| + | [ 0.240018] PCI: CLS 0 bytes, default 32 | ||
| + | [ 0.248559] workingset: timestamp_bits=14 max_order=14 bucket_order=0 | ||
| + | [ 0.262677] squashfs: version 4.0 (2009/ | ||
| + | [ 0.268252] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc. | ||
| + | [ 0.293111] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 252) | ||
| + | [ 0.303509] mt7621_gpio 10000600.gpio: | ||
| + | [ 0.309098] mt7621_gpio 10000600.gpio: | ||
| + | [ 0.314755] mt7621_gpio 10000600.gpio: | ||
| + | [ 0.320420] Serial: 8250/16550 driver, 16 ports, IRQ sharing enabled | ||
| + | [ 0.329111] printk: console [ttyS0] disabled | ||
| + | [ 0.333308] 10000c00.uartlite: | ||
| + | [ 0.342028] printk: console [ttyS0] enabled | ||
| + | [ 0.342028] printk: console [ttyS0] enabled | ||
| + | [ 0.350442] printk: bootconsole [early0] disabled | ||
| + | [ 0.350442] printk: bootconsole [early0] disabled | ||
| + | [ 0.361272] spi-mt7621 10000b00.spi: | ||
| + | [ 0.377728] spi-nor spi0.0: gd25q128 (16384 Kbytes) | ||
| + | [ 0.382810] 8 fixed-partitions partitions found on MTD device spi0.0 | ||
| + | [ 0.389248] Creating 8 MTD partitions on " | ||
| + | [ 0.394142] 0x000000000000-0x000000030000 : " | ||
| + | [ 0.400650] 0x000000030000-0x000000040000 : " | ||
| + | [ 0.406655] 0x000000040000-0x000000050000 : " | ||
| + | [ 0.412727] 0x000000050000-0x000000060000 : " | ||
| + | [ 0.418862] 0x000000060000-0x000000070000 : " | ||
| + | [ 0.424896] 0x000000070000-0x000000080000 : " | ||
| + | [ 0.431151] 0x000000080000-0x000000140000 : " | ||
| + | [ 0.437279] 0x000000140000-0x000001000000 : " | ||
| + | [ 0.451083] 2 uimage-fw partitions found on MTD device firmware | ||
| + | [ 0.457094] Creating 2 MTD partitions on " | ||
| + | [ 0.462201] 0x000000000000-0x00000020be3f : " | ||
| + | [ 0.468283] 0x00000020be3f-0x000000ec0000 : " | ||
| + | [ 0.474402] mtd: device 9 (rootfs) set to be root filesystem | ||
| + | [ 0.482303] 1 squashfs-split partitions found on MTD device rootfs | ||
| + | [ 0.488594] 0x0000004c0000-0x000000ec0000 : " | ||
| + | [ 0.495912] libphy: Fixed MDIO Bus: probed | ||
| + | [ 0.538220] rt3050-esw 10110000.esw: | ||
| + | [ 0.546828] mtk_soc_eth 10100000.ethernet eth0: mediatek frame engine at 0xb0100000, irq 5 | ||
| + | [ 0.557234] NET: Registered protocol family 10 | ||
| + | [ 0.566108] Segment Routing with IPv6 | ||
| + | [ 0.570021] NET: Registered protocol family 17 | ||
| + | [ 0.574590] bridge: filtering via arp/ | ||
| + | [ 0.587754] 8021q: 802.1Q VLAN Support v1.8 | ||
| + | [ 0.598251] VFS: Mounted root (squashfs filesystem) readonly on device 31:9. | ||
| + | [ 0.612257] Freeing unused kernel memory: 1204K | ||
| + | [ 0.616850] This architecture does not have kernel memory protection. | ||
| + | [ 0.623408] Run /sbin/init as init process | ||
| + | [ 1.298370] init: Console is alive | ||
| + | [ 1.302501] init: - watchdog - | ||
| + | [ 2.161888] kmodloader: loading kernel modules from / | ||
| + | [ 2.239664] random: fast init done | ||
| + | [ 2.318149] kmodloader: done loading kernel modules from / | ||
| + | [ 2.336152] init: - preinit - | ||
| + | [ 3.435443] random: jshn: uninitialized urandom read (4 bytes read) | ||
| + | [ 3.543589] random: jshn: uninitialized urandom read (4 bytes read) | ||
| + | [ 3.686252] random: jshn: uninitialized urandom read (4 bytes read) | ||
| + | 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 | ||
| + | [ 7.937994] rt3050-esw 10110000.esw: | ||
| + | [ 7.943018] IPv6: ADDRCONF(NETDEV_CHANGE): | ||
| + | [ 7.949970] IPv6: ADDRCONF(NETDEV_CHANGE): | ||
| + | [ 8.613426] jffs2: notice: (463) jffs2_build_xattr_subsystem: | ||
| + | [ 8.631098] mount_root: switching to jffs2 overlay | ||
| + | [ 8.638872] overlayfs: upper fs does not support tmpfile. | ||
| + | [ 8.650243] urandom-seed: | ||
| + | [ 8.722891] rt3050-esw 10110000.esw: | ||
| + | [ 8.806715] procd: - early - | ||
| + | [ 8.810485] procd: - watchdog - | ||
| + | [ 9.581379] procd: - watchdog - | ||
| + | [ 9.585253] procd: - ubus - | ||
| + | [ 9.621658] urandom_read: | ||
| + | [ 9.621667] random: ubusd: uninitialized urandom read (4 bytes read) | ||
| + | [ 9.640475] random: ubusd: uninitialized urandom read (4 bytes read) | ||
| + | [ 9.647610] random: ubusd: uninitialized urandom read (4 bytes read) | ||
| + | [ 9.660144] procd: - init - | ||
| + | Please press Enter to activate this console. | ||
| + | [ | ||
| + | [ | ||
| + | [ | ||
| + | [ | ||
| + | [ | ||
| + | [ | ||
| + | [ | ||
| + | [ | ||
| + | [ | ||
| + | [ | ||
| + | [ | ||
| + | [ | ||
| + | [ | ||
| + | [ | ||
| + | [ | ||
| + | [ | ||
| + | [ | ||
| + | [ | ||
| + | [ | ||
| + | [ | ||
| + | [ | ||
| + | [ | ||
| + | [ | ||
| + | [ | ||
| + | [ | ||
| + | </ | ||
| + | </ | ||
| ===== Software Mods ===== | ===== Software Mods ===== | ||
| Line 527: | Line 804: | ||
| djStolen: Unfortunatelly, | djStolen: Unfortunatelly, | ||
| - | ==== Dump SPI Flash ==== | ||
| - | Alternatively to installing OpenWRT via SSH you can also use a programmer. | ||
| - | |||
| - | |||
| - | {{https:// | ||
| ===== Tags ===== | ===== Tags ===== | ||
| [[meta: | [[meta: | ||
| {{tag> | {{tag> | ||