Cześć,
podczas próby wgrania openwrt na Xiaomi Router 3G napotykam na dziwny błąd. Nie jest to mój pierwszy R3G, któremu wgrywam openwrt. Z poprzednimi nie miałem problemów. Robię wszystko wg instrukcji z oficjalnej wiki dla tego routera: https://wiki.openwrt.org/toh/xiaomi/mir3g.
Po wykonaniu kroków (wykonują się bez żadnych błędów):
mtd write openwrt-ramips-mt7621-mir3g-squashfs-kernel1.bin kernel1
mtd write openwrt-ramips-mt7621-mir3g-squashfs-rootfs0.bin rootfs0
nvram set flag_try_sys1_failed=1
nvram commit
reboot
Router nie wstaje. Cały czas ma pomarańczową diodę.
Poniżej wyciąg z konsoli UART:
3: System Boot system code via Flash.
## Booting image at bc600000 ...
Image Name: MIPS OpenWrt Linux-4.14.53
Image Type: MIPS Linux Kernel Image (lzma compressed)
Data Size: 1960118 Bytes = 1.9 MB
Load Address: 80001000
Entry Point: 80001000
.............................. Verifying Checksum ... OK
Uncompressing Kernel Image ... OK
commandline uart_en=0 factory_mode=0 usb_u3=0
No initrd
## Transferring control to Linux (at address 80001000) ...
## Giving linux memsize in MB, 256
Starting kernel ...
[ 0.000000] Linux version 4.14.53 (buildbot@slashdirt-02) (gcc version 7.3.0 (OpenWrt GCC 7.3.0 r7444-e204717)) #0 SMP Sun Jul 8 12:22:54 2018
[ 0.000000] SoC Type: MediaTek MT7621 ver:1 eco:3
[ 0.000000] bootconsole [early0] enabled
[ 0.000000] CPU0 revision is: 0001992f (MIPS 1004Kc)
[ 0.000000] MIPS: machine is Xiaomi Mi Router 3G
[ 0.000000] Determined physical RAM map:
[ 0.000000] memory: 10000000 @ 00000000 (usable)
[ 0.000000] Initrd not found or empty - disabling initrd
[ 0.000000] VPE topology {2,2} total 4
[ 0.000000] Primary instruction cache 32kB, VIPT, 4-way, linesize 32 bytes.
[ 0.000000] Primary data cache 32kB, 4-way, PIPT, no aliases, linesize 32 bytes
[ 0.000000] MIPS secondary cache 256kB, 8-way, linesize 32 bytes.
[ 0.000000] Zone ranges:
[ 0.000000] Normal [mem 0x0000000000000000-0x000000000fffffff]
[ 0.000000] HighMem empty
[ 0.000000] Movable zone start for each node
[ 0.000000] Early memory node ranges
[ 0.000000] node 0: [mem 0x0000000000000000-0x000000000fffffff]
[ 0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x000000000fffffff]
[ 0.000000] random: get_random_bytes called from start_kernel+0x90/0x4ac with crng_init=0
[ 0.000000] percpu: Embedded 14 pages/cpu @81210000 s26256 r8192 d22896 u57344
[ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 65024
[ 0.000000] Kernel command line: console=ttyS0,115200n8 rootfstype=squashfs,jffs2
[ 0.000000] PID hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.000000] Dentry cache hash table entries: 32768 (order: 5, 131072 bytes)
[ 0.000000] Inode-cache hash table entries: 16384 (order: 4, 65536 bytes)
[ 0.000000] Writing ErrCtl register=00002a40
[ 0.000000] Readback ErrCtl register=00002a40
[ 0.000000] Memory: 253148K/262144K available (4634K kernel code, 241K rwdata, 1028K rodata, 228K init, 275K bss, 8996K reserved, 0K cma-reserved, 0K highmem)
[ 0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
[ 0.000000] Hierarchical RCU implementation.
[ 0.000000] NR_IRQS: 256
[ 0.000000] clocksource: GIC: mask: 0xffffffffffffffff max_cycles: 0xcaf478abb4, max_idle_ns: 440795247997 ns
[ 0.000000] clocksource: MIPS: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 4343773742 ns
[ 0.000010] sched_clock: 32 bits at 440MHz, resolution 2ns, wraps every 4880645118ns
[ 0.007812] Calibrating delay loop... 586.13 BogoMIPS (lpj=2930688)
[ 0.073975] pid_max: default: 32768 minimum: 301
[ 0.078742] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.085249] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.093952] Hierarchical SRCU implementation.
[ 0.099011] smp: Bringing up secondary CPUs ...
[ 0.105519] Primary instruction cache 32kB, VIPT, 4-way, linesize 32 bytes.
[ 0.105529] Primary data cache 32kB, 4-way, PIPT, no aliases, linesize 32 bytes
[ 0.105541] MIPS secondary cache 256kB, 8-way, linesize 32 bytes.
[ 0.105680] CPU1 revision is: 0001992f (MIPS 1004Kc)
[ 0.163763] Synchronize counters for CPU 1: done.
[ 0.199664] Primary instruction cache 32kB, VIPT, 4-way, linesize 32 bytes.
[ 0.199673] Primary data cache 32kB, 4-way, PIPT, no aliases, linesize 32 bytes
[ 0.199681] MIPS secondary cache 256kB, 8-way, linesize 32 bytes.
[ 0.199753] CPU2 revision is: 0001992f (MIPS 1004Kc)
[ 0.254845] Synchronize counters for CPU 2: done.
[ 0.286615] Primary instruction cache 32kB, VIPT, 4-way, linesize 32 bytes.
[ 0.286623] Primary data cache 32kB, 4-way, PIPT, no aliases, linesize 32 bytes
[ 0.286630] MIPS secondary cache 256kB, 8-way, linesize 32 bytes.
[ 0.286707] CPU3 revision is: 0001992f (MIPS 1004Kc)
[ 0.340028] Synchronize counters for CPU 3: done.
[ 0.369883] smp: Brought up 1 node, 4 CPUs
[ 0.377615] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[ 0.387402] futex hash table entries: 1024 (order: 3, 32768 bytes)
[ 0.393702] pinctrl core: initialized pinctrl subsystem
[ 0.400251] NET: Registered protocol family 16
[ 0.414745] pull PCIe RST: RALINK_RSTCTRL = 4000000
[ 0.719969] release PCIe RST: RALINK_RSTCTRL = 7000000
[ 0.725017] ***** Xtal 40MHz *****
[ 0.728372] release PCIe RST: RALINK_RSTCTRL = 7000000
[ 0.733470] Port 0 N_FTS = 1b105000
[ 0.736938] Port 1 N_FTS = 1b105000
[ 0.740383] Port 2 N_FTS = 1b102800
[ 1.895624] PCIE2 no card, disable it(RST&CLK)
[ 1.899986] -> 21007f2
[ 1.902390] PCIE0 enabled
[ 1.904979] PCIE1 enabled
[ 1.907583] PCI host bridge /pcie@1e140000 ranges:
[ 1.912358] MEM 0x0000000060000000..0x000000006fffffff
[ 1.917512] IO 0x000000001e160000..0x000000001e16ffff
[ 1.922716] PCI coherence region base: 0xbfbf8000, mask/settings: 0x60000000
[ 1.937985] mt7621_gpio 1e000600.gpio: registering 32 gpios
[ 1.943830] mt7621_gpio 1e000600.gpio: registering 32 gpios
[ 1.949563] mt7621_gpio 1e000600.gpio: registering 32 gpios
[ 1.957232] PCI host bridge to bus 0000:00
[ 1.961254] pci_bus 0000:00: root bus resource [mem 0x60000000-0x6fffffff]
[ 1.968117] pci_bus 0000:00: root bus resource [io 0xffffffff]
[ 1.973946] pci_bus 0000:00: root bus resource [??? 0x00000000 flags 0x0]
[ 1.980704] pci_bus 0000:00: No busn resource found for root bus, will use [bus 00-ff]
[ 1.990430] pci 0000:00:00.0: BAR 0: no space for [mem size 0x80000000]
[ 1.996975] pci 0000:00:00.0: BAR 0: failed to assign [mem size 0x80000000]
[ 2.003854] pci 0000:00:01.0: BAR 0: no space for [mem size 0x80000000]
[ 2.010435] pci 0000:00:01.0: BAR 0: failed to assign [mem size 0x80000000]
[ 2.017340] pci 0000:00:00.0: BAR 8: assigned [mem 0x60000000-0x600fffff]
[ 2.024090] pci 0000:00:01.0: BAR 8: assigned [mem 0x60100000-0x601fffff]
[ 2.030809] pci 0000:00:01.0: BAR 9: assigned [mem 0x60200000-0x602fffff pref]
[ 2.038000] pci 0000:00:00.0: BAR 1: assigned [mem 0x60300000-0x6030ffff]
[ 2.044732] pci 0000:00:01.0: BAR 1: assigned [mem 0x60310000-0x6031ffff]
[ 2.051492] pci 0000:01:00.0: BAR 0: assigned [mem 0x60000000-0x600fffff]
[ 2.058202] pci 0000:00:00.0: PCI bridge to [bus 01]
[ 2.063148] pci 0000:00:00.0: bridge window [mem 0x60000000-0x600fffff]
[ 2.069876] pci 0000:02:00.0: BAR 0: assigned [mem 0x60100000-0x601fffff 64bit]
[ 2.077151] pci 0000:02:00.0: BAR 6: assigned [mem 0x60200000-0x6020ffff pref]
[ 2.084289] pci 0000:00:01.0: PCI bridge to [bus 02]
[ 2.089242] pci 0000:00:01.0: bridge window [mem 0x60100000-0x601fffff]
[ 2.095959] pci 0000:00:01.0: bridge window [mem 0x60200000-0x602fffff pref]
[ 2.104440] clocksource: Switched to clocksource GIC
[ 2.110798] NET: Registered protocol family 2
[ 2.115949] TCP established hash table entries: 2048 (order: 1, 8192 bytes)
[ 2.122833] TCP bind hash table entries: 2048 (order: 2, 16384 bytes)
[ 2.129282] TCP: Hash tables configured (established 2048 bind 2048)
[ 2.135698] UDP hash table entries: 256 (order: 1, 8192 bytes)
[ 2.141459] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes)
[ 2.147960] NET: Registered protocol family 1
[ 2.384396] 4 CPUs re-calibrate udelay(lpj = 2924544)
[ 2.390776] Crashlog allocated RAM at address 0x3f00000
[ 2.396115] workingset: timestamp_bits=30 max_order=16 bucket_order=0
[ 2.408450] random: fast init done
[ 2.409286] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[ 2.409296] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[ 2.413025] io scheduler noop registered
[ 2.413033] io scheduler deadline registered (default)
[ 2.437474] Serial: 8250/16550 driver, 16 ports, IRQ sharing enabled
[ 2.447264] console [ttyS0] disabled
[ 2.450813] 1e000c00.uartlite: ttyS0 at MMIO 0x1e000c00 (irq = 18, base_baud = 3125000) is a 16550A
[ 2.459831] console [ttyS0] enabled
[ 2.459831] console [ttyS0] enabled
[ 2.466709] bootconsole [early0] disabled
[ 2.466709] bootconsole [early0] disabled
[ 2.475480] cacheinfo: Unable to detect cache hierarchy for CPU 0
[ 2.482306] MediaTek Nand driver init, version v2.1 Fix AHB virt2phys error
[ 2.489559] Allocate 16 byte aligned buffer: 80638010
[ 2.494615] Enable NFI Clock
[ 2.497482] # MTK NAND # : Use HW ECC
[ 2.501141] Device not found, ID: c8d1
[ 2.504903] Not Support this Device!
[ 2.508637] chip_mode=00000001
[ 2.511686] Support this Device in MTK table! c8d1
[ 2.516646] [NAND]select ecc bit:4, sparesize :64 spare_per_sector=16
[ 2.523104] nand: device found, Manufacturer ID: 0xc8, Chip ID: 0xd1
[ 2.529439] nand: ESMT NAND 128MiB 3,3V 8-bit
[ 2.533776] nand: 128 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64
[ 2.541342] Scanning device for bad blocks
[ 2.648218] Bad eraseblock 721 at 0x000005a20000
[ 2.658646] Bad eraseblock 762 at 0x000005f40000
[ 2.663381] Bad eraseblock 763 at 0x000005f60000
[ 2.672684] Bad eraseblock 796 at 0x000006380000
[ 2.678857] Bad eraseblock 807 at 0x0000064e0000
[ 2.694847] Bad eraseblock 887 at 0x000006ee0000
[ 2.700720] Bad eraseblock 896 at 0x000007000000
[ 2.712439] Bad eraseblock 946 at 0x000007640000
[ 2.721595] Bad eraseblock 978 at 0x000007a40000
[ 2.728908] Bad eraseblock 997 at 0x000007ca0000
[ 2.737314] 10 fixed-partitions partitions found on MTD device MT7621-NAND
[ 2.744156] Creating 10 MTD partitions on "MT7621-NAND":
[ 2.749468] 0x000000000000-0x000000080000 : "Bootloader"
[ 2.755883] 0x000000080000-0x0000000c0000 : "Config"
[ 2.761767] 0x0000000c0000-0x000000100000 : "Bdata"
[ 2.767645] 0x000000100000-0x000000140000 : "Factory"
[ 2.773633] 0x000000140000-0x000000180000 : "crash"
[ 2.779507] 0x000000180000-0x0000001c0000 : "crash_syslog"
[ 2.786014] 0x0000001c0000-0x000000200000 : "reserved0"
[ 2.792205] 0x000000200000-0x000000600000 : "kernel_stock"
[ 2.798712] 0x000000600000-0x000000a00000 : "kernel"
[ 2.804745] 0x000000a00000-0x000007f80000 : "ubi"
[ 2.811363] [mtk_nand] probe successfully!
[ 2.816198] Signature matched and data read!
[ 2.820445] load_fact_bbt success 1023
[ 2.824983] libphy: Fixed MDIO Bus: probed
[ 2.897007] libphy: mdio: probed
[ 4.300612] mtk_soc_eth 1e100000.ethernet: loaded mt7530 driver
[ 4.307253] mtk_soc_eth 1e100000.ethernet eth0: mediatek frame engine at 0xbe100000, irq 20
[ 4.317973] NET: Registered protocol family 10
[ 4.323999] Segment Routing with IPv6
[ 4.327819] NET: Registered protocol family 17
[ 4.332313] bridge: filtering via arp/ip/ip6tables is no longer available by default. Update your scripts to load br_netfilter if you need this.
[ 4.345229] 8021q: 802.1Q VLAN Support v1.8
[ 4.352368] UBI: auto-attach mtd9
[ 4.355730] ubi0: attaching mtd9
[ 4.382347] UBI: EOF marker found, PEBs from 20 will be erased
[ 4.389408] ubi0: scanning is finished
[ 4.409077] ubi0 warning: do_sync_erase.part.4: error -5 while erasing PEB 939, retry
[ 4.416954] ubi0 warning: do_sync_erase.part.4: error -5 while erasing PEB 939, retry
[ 4.424837] ubi0 warning: do_sync_erase.part.4: error -5 while erasing PEB 939, retry
[ 4.432667] ubi0 error: do_sync_erase.part.4: cannot erase PEB 939, error -5
[ 4.439705] CPU: 1 PID: 1 Comm: swapper/0 Not tainted 4.14.53 #0
[ 4.445685] Stack : 00000000 00000000 00000000 00000000 80607ad2 00000034 00000000 00000000
[ 4.454021] 8fc40374 8059e947 8052863c 00000001 00000001 00000001 8fc35838 1cc282d5
[ 4.462352] 00000000 00000000 80600000 00003d88 00000000 000000d0 00000007 00000000
[ 4.470687] 00000000 805a0000 0006b599 00000000 00000000 00000000 805c0000 802ee120
[ 4.479023] 80550000 80600000 fffffffb 8f475d00 00000003 8029a238 00000004 80600004
[ 4.487358] ...
[ 4.489796] Call Trace:
[ 4.492252] [<80010598>] show_stack+0x58/0x100
[ 4.496694] [<8046915c>] dump_stack+0x9c/0xe0
[ 4.501031] [<802efb78>] do_sync_erase.part.4+0x118/0x2ac
[ 4.506411] [<802f0058>] ubi_io_sync_erase+0x2ac/0x2e4
[ 4.511527] [<802f0918>] sync_erase.isra.4+0x150/0x25c
[ 4.516644] [<802f0f4c>] __erase_worker+0x4c/0x4b0
[ 4.521412] [<802f1414>] erase_worker+0x64/0x8c
[ 4.525927] [<802f0470>] do_work+0xf8/0x13c
[ 4.530091] [<802f2d10>] ubi_wl_get_peb+0xcc/0x26c
[ 4.534862] [<802eb7d8>] try_write_vid_and_data+0x54/0x200
[ 4.540322] [<802ed058>] ubi_eba_atomic_leb_change+0x208/0x314
[ 4.546132] [<802e3620>] ubi_update_layout_vol+0x40/0x74
[ 4.551417] [<802e3cdc>] ubi_change_vtbl_record+0xb0/0x104
[ 4.556879] [<802e5c14>] ubi_resize_volume+0x254/0x4c4
[ 4.561991] [<802e6fe0>] autoresize+0x144/0x1cc
[ 4.566506] [<802e8188>] ubi_attach_mtd_dev+0x730/0xbe8
[ 4.571731] [<805df504>] ubi_init+0x2a8/0x360
[ 4.576070] [<80005650>] do_one_initcall+0xd0/0x1a0
[ 4.580945] [<805c7d80>] kernel_init_freeable+0x168/0x228
[ 4.586342] [<8048021c>] kernel_init+0x10/0x10c
[ 4.590852] [<8000b0d8>] ret_from_kernel_thread+0x14/0x1c
[ 4.596314] ubi0 error: __erase_worker: failed to erase PEB 939, error -5
[ 4.603070] ubi0: mark PEB 939 as bad
[ 6.175182] mtk_soc_eth 1e100000.ethernet eth0: port 2 link up
[ 113.048729] mtk_soc_eth 1e100000.ethernet eth0: port 2 link down
Moją uwagę zwróciły wpisy:
[ 2.501141] Device not found, ID: c8d1
[ 2.504903] Not Support this Device!
oraz:
[ 4.596314] ubi0 error: __erase_worker: failed to erase PEB 939, error -5
[ 4.603070] ubi0: mark PEB 939 as bad
używałem snapshotów z kilku różnych dni, ze strony: https://downloads.openwrt.org/snapshots … ps/mt7621/ - na każdym to samo.
W internecie mało wiedzy na temat takiego konkretnie błędu.
Może macie jakiekolwiek pomysły co zrobić w takim wypadku?
PS. Router bez problemu mogę przywrócić do oryginalnego softu Xiaomi, jednak moim celem jest openwrt.