Kernel 5.10 of mt7621 horrible problem that erase u-boot and make device bricked totally

My device is newifi d2, I sysupgrade a custom kernel 5.10 image, the amber light always on and not boot at all. Then I flash a snapshot image download from openwrt.org, it boots ok but when I sysupgrade that custom image from this snapshot image, horrible things happened, no light no boot at all, totally bricked.
I use a programmer to read the 32M flash chip 25q256fv, I found the first page (256 bytes) of every eraseblock(64K) are set to zero, including first page of u-boot, so it dead bricked. To save it , I reprogrammed u-boot ,u-boot-env and factory data. Finally, I found that you can't flash a sysupgrade image with it's size >15M, or it won't boot with amber light always on, because flash memory was eaten 16M by something strange and unknown in overlay partition. Even if you flash a small image and boots ok, you can't use it to sysupgrade a big image, or it will erase u-boot and you'll get a total no light brick. Kernel 5.4 has no problem. Who knows why overlay partition was eaten 16M and by what ?

BusyBox v1.34.1 (2021-12-17 15:16:34 UTC) built-in shell (ash)

  _______                     ________        __
 |       |.-----.-----.-----.|  |  |  |.----.|  |_
 |   -   ||  _  |  -__|     ||  |  |  ||   _||   _|
 |_______||   __|_____|__|__||________||__|  |____|
          |__| W I R E L E S S   F R E E D O M
 -----------------------------------------------------
 OpenWrt SNAPSHOT, r18368-fa3690f8f1
 -----------------------------------------------------
=== 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@OpenWrt:~# df -h
Filesystem                Size      Used Available Use% Mounted on
/dev/root                 3.0M      3.0M         0 100% /rom
tmpfs                   248.7M     68.0K    248.6M   0% /tmp
/dev/mtdblock6           26.0M     16.7M      9.3M  64% /overlay
overlayfs:/overlay       26.0M     16.7M      9.3M  64% /
tmpfs                   512.0K         0    512.0K   0% /dev
root@OpenWrt:~# du -h /overlay
9.5K    /overlay/upper/etc/config
1.5K    /overlay/upper/etc/dropbear
0       /overlay/upper/etc/uci-defaults
12.5K   /overlay/upper/etc
12.5K   /overlay/upper
0       /overlay/work/work
0       /overlay/work
13.0K   /overlay
root@OpenWrt:~# cat /proc/mtd
dev:    size   erasesize  name
mtd0: 00030000 00010000 "u-boot"
mtd1: 00010000 00010000 "u-boot-env"
mtd2: 00010000 00010000 "factory"
mtd3: 01fb0000 00010000 "firmware"
mtd4: 002b2607 00010000 "kernel"
mtd5: 01cfd9f9 00010000 "rootfs"
mtd6: 01a00000 00010000 "rootfs_data"
root@OpenWrt:~# cat /proc/partitions
major minor  #blocks  name

  31        0        192 mtdblock0
  31        1         64 mtdblock1
  31        2         64 mtdblock2
  31        3      32448 mtdblock3
  31        4       2761 mtdblock4
  31        5      29686 mtdblock5
  31        6      26624 mtdblock6
root@OpenWrt:~#
[    0.674651] spi-mt7621 1e000b00.spi: sys_freq: 220000000
[    0.681928] spi-nor spi0.0: enabling reset hack; may not recover from unexpected reboots
[    0.690020] spi-nor spi0.0: w25q256 (32768 Kbytes)
[    0.694882] 4 fixed-partitions partitions found on MTD device spi0.0
[    0.701224] Creating 4 MTD partitions on "spi0.0":
[    0.706001] 0x000000000000-0x000000030000 : "u-boot"
[    0.712315] 0x000000030000-0x000000040000 : "u-boot-env"
[    0.719086] 0x000000040000-0x000000050000 : "factory"
[    0.725598] 0x000000050000-0x000002000000 : "firmware"
[    0.732459] 2 uimage-fw partitions found on MTD device firmware
[    0.738387] Creating 2 MTD partitions on "firmware":
[    0.743380] 0x000000000000-0x0000002b2607 : "kernel"
[    0.748323] mtd: partition "kernel" doesn't end on an erase/write block -- force read-only
[    0.757721] 0x0000002b2607-0x000001fb0000 : "rootfs"
[    0.762720] mtd: partition "rootfs" doesn't start on an erase/write block boundary -- force read-only
[    0.772914] mtd: device 5 (rootfs) set to be root filesystem
[    0.778773] 1 squashfs-split partitions found on MTD device rootfs
[    0.784971] 0x0000005b0000-0x000001fb0000 : "rootfs_data"

For such cases, you need to use a factory image of OpenWrt.

Hi.

  1. There is no factory image for this device. Its vendor firmware is already based on OpenWrt. Nevertheless I agree that starting from scratch using a factory image is a basic solution that solves many issues.

  2. On two R6620, I went from 21.02 (kernel 5.4) to snapshots (kernel 5.10) just by upgrading. It can be done.

I have 4 newifi D2. I built image by myself and the size of my image is 22.5MB.
All of them run steady with kernel 5.4, but as kernel bump to 5.10.88, 2 of my newifi D2 failed to upgrade and fell into dead loop at booting.
Today I build the latest master-branch-pull from github with kernel 5.10.92, but the 2 failed-device can't boot with new image and the 2 succeeded-device upgraded ok。
The serial no. of the 2 failed newifi-D2 of mine are: PND021707008880 / MND021817006647, while the 2 succeeded are: MND021818000945 / MND021818001330. Obviously the 2 failed are older the the 2 succeeded. So I think maybe there are some hardware difference between them and the older 2 need some special patch to finish the boot procedure.
PS, I use breed as bootloader which is more powerful than u-boot.

@eagle-lk
Use this 5.10.92 Test Image I built for newifi d2 to see if your 4 devices would boot correctly, I think they will. Post dmesg output here that including spi chip information like this:

[    0.674651] spi-mt7621 1e000b00.spi: sys_freq: 220000000
[    0.681928] spi-nor spi0.0: enabling reset hack; may not recover from unexpected reboots
[    0.690020] spi-nor spi0.0: w25q256 (32768 Kbytes)
[    0.694882] 4 fixed-partitions partitions found on MTD device spi0.0
[    0.701224] Creating 4 MTD partitions on "spi0.0":
[    0.706001] 0x000000000000-0x000000030000 : "u-boot"
[    0.712315] 0x000000030000-0x000000040000 : "u-boot-env"

1 Like

Great! One of my failed-upgrade D2 boot correctly now. Thanks! what is the key to make it boot OK?

[    0.000000] Linux version 5.10.92 (root@debian) (mipsel-openwrt-linux-gcc (OpenWrt GCC 11.2.0 r18609-266b5c83c3) 11.2.0, GNU ld (GNU Binutils) 2.37) #0 SMP Mon Jan 17 11:47:25 2022
[    0.000000] SoC Type: MediaTek MT7621 ver:1 eco:3
[    0.000000] printk: bootconsole [early0] enabled
[    0.000000] CPU0 revision is: 0001992f (MIPS 1004Kc)
[    0.000000] MIPS: machine is Newifi-D2
[    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  [mem 0x0000000010000000-0x0000000023ffffff]
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000000000000-0x000000001bffffff]
[    0.000000]   node   0: [mem 0x0000000020000000-0x0000000023ffffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x0000000023ffffff]
[    0.000000] On node 0 totalpages: 131072
[    0.000000]   Normal zone: 576 pages used for memmap
[    0.000000]   Normal zone: 0 pages reserved
[    0.000000]   Normal zone: 65536 pages, LIFO batch:15
[    0.000000]   HighMem zone: 65536 pages, LIFO batch:15
[    0.000000] percpu: Embedded 15 pages/cpu s30160 r8192 d23088 u61440
[    0.000000] pcpu-alloc: s30160 r8192 d23088 u61440 alloc=15*4096
[    0.000000] pcpu-alloc: [0] 0 [0] 1 [0] 2 [0] 3 
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 130496
[    0.000000] Kernel command line: console=ttyS0,115200 rootfstype=squashfs,jffs2
[    0.000000] Dentry cache hash table entries: 32768 (order: 5, 131072 bytes, linear)
[    0.000000] Inode-cache hash table entries: 16384 (order: 4, 65536 bytes, linear)
[    0.000000] Writing ErrCtl register=00010000
[    0.000000] Readback ErrCtl register=00010000
[    0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[    0.000000] Memory: 508048K/524288K available (6968K kernel code, 622K rwdata, 1404K rodata, 1296K init, 244K bss, 16240K reserved, 0K cma-reserved, 262144K highmem)
[    0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
[    0.000000] rcu: Hierarchical RCU implementation.
[    0.000000] 	Tracing variant of Tasks RCU enabled.
[    0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 10 jiffies.
[    0.000000] NR_IRQS: 256
[    0.000000] random: get_random_bytes called from start_kernel+0x3cc/0x5e4 with crng_init=0
[    0.000000] CPU Clock: 880MHz
[    0.000000] clocksource: GIC: mask: 0xffffffffffffffff max_cycles: 0xcaf478abb4, max_idle_ns: 440795247997 ns
[    0.000014] sched_clock: 64 bits at 880MHz, resolution 1ns, wraps every 4398046511103ns
[    0.007948] clocksource: MIPS: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 4343773742 ns
[    0.016954] Calibrating delay loop... 586.13 BogoMIPS (lpj=2930688)
[    0.083108] pid_max: default: 32768 minimum: 301
[    0.087881] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.095085] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.105724] rcu: Hierarchical SRCU implementation.
[    0.110748] dyndbg: Ignore empty _ddebug table in a CONFIG_DYNAMIC_DEBUG_CORE build
[    0.118825] smp: Bringing up secondary CPUs ...
[    0.124044] Primary instruction cache 32kB, VIPT, 4-way, linesize 32 bytes.
[    0.124056] Primary data cache 32kB, 4-way, PIPT, no aliases, linesize 32 bytes
[    0.124069] MIPS secondary cache 256kB, 8-way, linesize 32 bytes.
[    0.124151] CPU1 revision is: 0001992f (MIPS 1004Kc)
[    0.178701] Synchronize counters for CPU 1: done.
[    0.211444] Primary instruction cache 32kB, VIPT, 4-way, linesize 32 bytes.
[    0.211455] Primary data cache 32kB, 4-way, PIPT, no aliases, linesize 32 bytes
[    0.211463] MIPS secondary cache 256kB, 8-way, linesize 32 bytes.
[    0.211512] CPU2 revision is: 0001992f (MIPS 1004Kc)
[    0.270200] Synchronize counters for CPU 2: done.
[    0.300671] Primary instruction cache 32kB, VIPT, 4-way, linesize 32 bytes.
[    0.300681] Primary data cache 32kB, 4-way, PIPT, no aliases, linesize 32 bytes
[    0.300689] MIPS secondary cache 256kB, 8-way, linesize 32 bytes.
[    0.300743] CPU3 revision is: 0001992f (MIPS 1004Kc)
[    0.355383] Synchronize counters for CPU 3: done.
[    0.385252] smp: Brought up 1 node, 4 CPUs
[    0.393608] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.403444] futex hash table entries: 1024 (order: 3, 32768 bytes, linear)
[    0.410493] pinctrl core: initialized pinctrl subsystem
[    0.417941] NET: Registered protocol family 16
[    0.423711] thermal_sys: Registered thermal governor 'step_wise'
[    0.424746] cpuidle: using governor teo
[    0.452256] FPU Affinity set after 11720 emulations
[    0.461246] random: fast init done
[    0.480314] clocksource: Switched to clocksource GIC
[    0.487581] NET: Registered protocol family 2
[    0.492153] IP idents hash table entries: 4096 (order: 3, 32768 bytes, linear)
[    0.500616] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 6144 bytes, linear)
[    0.508914] TCP established hash table entries: 2048 (order: 1, 8192 bytes, linear)
[    0.516598] TCP bind hash table entries: 2048 (order: 2, 16384 bytes, linear)
[    0.523681] TCP: Hash tables configured (established 2048 bind 2048)
[    0.530124] UDP hash table entries: 256 (order: 1, 8192 bytes, linear)
[    0.536608] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes, linear)
[    0.543784] NET: Registered protocol family 1
[    0.548081] PCI: CLS 0 bytes, default 32
[    0.554903] workingset: timestamp_bits=14 max_order=17 bucket_order=3
[    0.565543] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.571320] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    0.582199] bounce: pool size: 64 pages
[    0.586066] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 251)
[    0.595503] mt7621_gpio 1e000600.gpio: registering 32 gpios
[    0.601448] mt7621_gpio 1e000600.gpio: registering 32 gpios
[    0.607305] mt7621_gpio 1e000600.gpio: registering 32 gpios
[    0.613903] Serial: 8250/16550 driver, 16 ports, IRQ sharing enabled
[    0.624836] printk: console [ttyS0] disabled
[    0.629215] 1e000c00.uartlite: ttyS0 at MMIO 0x1e000c00 (irq = 19, base_baud = 3125000) is a 16550A
[    0.638235] printk: console [ttyS0] enabled
[    0.646494] printk: bootconsole [early0] disabled
[    0.659288] spi-mt7621 1e000b00.spi: sys_freq: 220000000
[    0.666211] enabling reset hack; may not recover from unexpected reboots
[    0.672979] spi-nor spi0.0: w25q256 (32768 Kbytes)
[    0.677811] 4 fixed-partitions partitions found on MTD device spi0.0
[    0.684277] Creating 4 MTD partitions on "spi0.0":
[    0.689054] 0x000000000000-0x000000030000 : "u-boot"
[    0.695285] 0x000000030000-0x000000040000 : "u-boot-env"
[    0.701990] 0x000000040000-0x000000050000 : "factory"
[    0.708157] 0x000000050000-0x000002000000 : "firmware"
[    0.714578] 2 uimage-fw partitions found on MTD device firmware
[    0.720571] Creating 2 MTD partitions on "firmware":
[    0.725524] 0x000000000000-0x0000002b364d : "kernel"
[    0.730484] mtd: partition "kernel" doesn't end on an erase/write block -- force read-only
[    0.739643] 0x0000002b364d-0x000001fb0000 : "rootfs"
[    0.744653] mtd: partition "rootfs" doesn't start on an erase/write block boundary -- force read-only
[    0.754770] mtd: device 5 (rootfs) set to be root filesystem
[    0.760574] 1 squashfs-split partitions found on MTD device rootfs
[    0.766740] 0x000000610000-0x000001fb0000 : "rootfs_data"
[    0.779610] libphy: Fixed MDIO Bus: probed
[    0.821426] libphy: mdio: probed
[    0.825331] mt7530 mdio-bus:1f: MT7530 adapts as multi-chip module
[    0.835375] mtk_soc_eth 1e100000.ethernet eth0: mediatek frame engine at 0xbe100000, irq 21
[    0.847251] mt7621-pci 1e140000.pcie: host bridge /pcie@1e140000 ranges:
[    0.854007] mt7621-pci 1e140000.pcie:   No bus range found for /pcie@1e140000, using [bus 00-ff]
[    0.862804] mt7621-pci 1e140000.pcie:      MEM 0x0060000000..0x006fffffff -> 0x0000000000
[    0.870975] mt7621-pci 1e140000.pcie:       IO 0x001e160000..0x001e16ffff -> 0x0000000000
[    0.879236] mt7621-pci 1e140000.pcie: Parsing DT failed
[    0.887167] NET: Registered protocol family 10
[    0.893208] Segment Routing with IPv6
[    0.896974] NET: Registered protocol family 17
[    0.901587] bridge: filtering via arp/ip/ip6tables is no longer available by default. Update your scripts to load br_netfilter if you need this.
[    0.914882] 8021q: 802.1Q VLAN Support v1.8
[    0.922952] gpio-export gpio_export: 1 gpio(s) exported
[    0.928406] mt7530 mdio-bus:1f: MT7530 adapts as multi-chip module
[    0.950151] libphy: dsa slave smi: probed
[    0.954668] mt7530 mdio-bus:1f lan4 (uninitialized): PHY [dsa-0.0:00] driver [Generic PHY] (irq=POLL)
[    0.965773] mt7530 mdio-bus:1f lan3 (uninitialized): PHY [dsa-0.0:01] driver [Generic PHY] (irq=POLL)
[    0.976860] mt7530 mdio-bus:1f lan2 (uninitialized): PHY [dsa-0.0:02] driver [Generic PHY] (irq=POLL)
[    0.987915] mt7530 mdio-bus:1f lan1 (uninitialized): PHY [dsa-0.0:03] driver [Generic PHY] (irq=POLL)
[    0.999159] mt7530 mdio-bus:1f wan (uninitialized): PHY [dsa-0.0:04] driver [Generic PHY] (irq=POLL)
[    1.011111] mt7530 mdio-bus:1f: configuring for fixed/rgmii link mode
[    1.021706] DSA: tree 0 setup
[    1.025027] rt2880-pinmux pinctrl: pcie is already enabled
[    1.030622] mt7621-pci 1e140000.pcie: host bridge /pcie@1e140000 ranges:
[    1.037311] mt7621-pci 1e140000.pcie:   No bus range found for /pcie@1e140000, using [bus 00-ff]
[    1.046103] mt7621-pci 1e140000.pcie:      MEM 0x0060000000..0x006fffffff -> 0x0000000000
[    1.054286] mt7621-pci 1e140000.pcie:       IO 0x001e160000..0x001e16ffff -> 0x0000000000
[    1.062560] mt7621-pci-phy 1e149000.pcie-phy: PHY for 0xbe149000 (dual port = 1)
[    1.070384] mt7621-pci-phy 1e14a000.pcie-phy: PHY for 0xbe14a000 (dual port = 0)
[    1.078024] mt7621-pci 1e140000.pcie: failed to parse bus ranges property: -22
[    1.185452] mt7621-pci-phy 1e149000.pcie-phy: Xtal is 40MHz
[    1.191040] mt7621-pci-phy 1e14a000.pcie-phy: Xtal is 40MHz
[    1.296743] mt7621-pci 1e140000.pcie: pcie2 no card, disable it (RST & CLK)
[    1.303699] mt7621-pci 1e140000.pcie: PCIE0 enabled
[    1.308555] mt7621-pci 1e140000.pcie: PCIE1 enabled
[    1.313429] mt7621-pci 1e140000.pcie: PCI coherence region base: 0x60000000, mask/settings: 0xf0000002
[    1.322888] mt7621-pci 1e140000.pcie: PCI host bridge to bus 0000:00
[    1.329234] pci_bus 0000:00: root bus resource [io  0x1e160000-0x1e16ffff]
[    1.336115] pci_bus 0000:00: root bus resource [mem 0x60000000-0x6fffffff]
[    1.342994] pci_bus 0000:00: root bus resource [bus 00-ff]
[    1.348471] pci_bus 0000:00: root bus resource [mem 0x60000000-0x6fffffff] (bus address [0x00000000-0x0fffffff])
[    1.358669] pci 0000:00:00.0: [0e8d:0801] type 01 class 0x060400
[    1.364695] pci 0000:00:00.0: reg 0x10: [mem 0x00000000-0x7fffffff]
[    1.370955] pci 0000:00:00.0: reg 0x14: initial BAR value 0x00000000 invalid
[    1.377973] pci 0000:00:00.0: reg 0x14: [mem size 0x00010000]
[    1.383774] pci 0000:00:00.0: supports D1
[    1.387767] pci 0000:00:00.0: PME# supported from D0 D1 D3hot
[    1.394090] pci 0000:00:01.0: [0e8d:0801] type 01 class 0x060400
[    1.400115] pci 0000:00:01.0: reg 0x10: [mem 0x00000000-0x7fffffff]
[    1.406412] pci 0000:00:01.0: reg 0x14: initial BAR value 0x00000000 invalid
[    1.413446] pci 0000:00:01.0: reg 0x14: [mem size 0x00010000]
[    1.419231] pci 0000:00:01.0: supports D1
[    1.423244] pci 0000:00:01.0: PME# supported from D0 D1 D3hot
[    1.430486] pci 0000:00:00.0: bridge configuration invalid ([bus 00-00]), reconfiguring
[    1.438475] pci 0000:00:01.0: bridge configuration invalid ([bus 00-00]), reconfiguring
[    1.446728] pci 0000:01:00.0: [14c3:7612] type 00 class 0x028000
[    1.452785] pci 0000:01:00.0: reg 0x10: initial BAR value 0x00000000 invalid
[    1.459813] pci 0000:01:00.0: reg 0x10: [mem size 0x00100000 64bit]
[    1.466111] pci 0000:01:00.0: reg 0x30: initial BAR value 0x00000000 invalid
[    1.473145] pci 0000:01:00.0: reg 0x30: [mem size 0x00010000 pref]
[    1.479405] pci 0000:01:00.0: PME# supported from D0 D3hot D3cold
[    1.486999] pci 0000:00:00.0: PCI bridge to [bus 01-ff]
[    1.492246] pci 0000:00:00.0:   bridge window [io  0x0000-0x0fff]
[    1.498316] pci 0000:00:00.0:   bridge window [mem 0x60000000-0x600fffff]
[    1.505087] pci 0000:00:00.0:   bridge window [mem 0x60000000-0x600fffff pref]
[    1.512315] pci_bus 0000:01: busn_res: [bus 01-ff] end is updated to 01
[    1.519165] pci 0000:02:00.0: [14c3:7603] type 00 class 0x028000
[    1.525214] pci 0000:02:00.0: reg 0x10: initial BAR value 0x00000000 invalid
[    1.532253] pci 0000:02:00.0: reg 0x10: [mem size 0x00100000]
[    1.538113] pci 0000:02:00.0: PME# supported from D0 D3hot D3cold
[    1.545710] pci 0000:00:01.0: PCI bridge to [bus 02-ff]
[    1.550962] pci 0000:00:01.0:   bridge window [io  0x0000-0x0fff]
[    1.557030] pci 0000:00:01.0:   bridge window [mem 0x60000000-0x600fffff]
[    1.563804] pci 0000:00:01.0:   bridge window [mem 0x60000000-0x600fffff pref]
[    1.571022] pci_bus 0000:02: busn_res: [bus 02-ff] end is updated to 02
[    1.577666] pci 0000:00:00.0: BAR 0: no space for [mem size 0x80000000]
[    1.584275] pci 0000:00:00.0: BAR 0: failed to assign [mem size 0x80000000]
[    1.591226] pci 0000:00:01.0: BAR 0: no space for [mem size 0x80000000]
[    1.597810] pci 0000:00:01.0: BAR 0: failed to assign [mem size 0x80000000]
[    1.604770] pci 0000:00:00.0: BAR 8: assigned [mem 0x60000000-0x600fffff]
[    1.611549] pci 0000:00:00.0: BAR 9: assigned [mem 0x60100000-0x601fffff pref]
[    1.618740] pci 0000:00:01.0: BAR 8: assigned [mem 0x60200000-0x602fffff]
[    1.625525] pci 0000:00:01.0: BAR 9: assigned [mem 0x60300000-0x603fffff pref]
[    1.632740] pci 0000:00:00.0: BAR 1: assigned [mem 0x60400000-0x6040ffff]
[    1.639504] pci 0000:00:01.0: BAR 1: assigned [mem 0x60410000-0x6041ffff]
[    1.646289] pci 0000:00:00.0: BAR 7: assigned [io  0x1e160000-0x1e160fff]
[    1.653067] pci 0000:00:01.0: BAR 7: assigned [io  0x1e161000-0x1e161fff]
[    1.659833] pci 0000:01:00.0: BAR 0: assigned [mem 0x60000000-0x600fffff 64bit]
[    1.667142] pci 0000:01:00.0: BAR 6: assigned [mem 0x60100000-0x6010ffff pref]
[    1.674350] pci 0000:00:00.0: PCI bridge to [bus 01]
[    1.679294] pci 0000:00:00.0:   bridge window [io  0x1e160000-0x1e160fff]
[    1.686063] pci 0000:00:00.0:   bridge window [mem 0x60000000-0x600fffff]
[    1.692843] pci 0000:00:00.0:   bridge window [mem 0x60100000-0x601fffff pref]
[    1.700043] pci 0000:02:00.0: BAR 0: assigned [mem 0x60200000-0x602fffff]
[    1.706823] pci 0000:00:01.0: PCI bridge to [bus 02]
[    1.711782] pci 0000:00:01.0:   bridge window [io  0x1e161000-0x1e161fff]
[    1.718540] pci 0000:00:01.0:   bridge window [mem 0x60200000-0x602fffff]
[    1.725322] pci 0000:00:01.0:   bridge window [mem 0x60300000-0x603fffff pref]
[    1.737683] mt7530 mdio-bus:1f: Link is Up - 1Gbps/Full - flow control off
[    1.748040] VFS: Mounted root (squashfs filesystem) readonly on device 31:5.
[    1.760110] Freeing unused kernel memory: 1296K
[    1.764689] This architecture does not have kernel memory protection.
[    1.771137] Run /sbin/init as init process
[    1.775212]   with arguments:
[    1.775217]     /sbin/init
[    1.775222]   with environment:
[    1.775227]     HOME=/
[    1.775231]     TERM=linux
[    2.298114] init: Console is alive
[    2.302052] init: - watchdog -
[    3.088131] kmodloader: loading kernel modules from /etc/modules-boot.d/*
[    3.178593] usbcore: registered new interface driver usbfs
[    3.184332] usbcore: registered new interface driver hub
[    3.189798] usbcore: registered new device driver usb
[    3.207378] xhci-mtk 1e1c0000.xhci: supply vbus not found, using dummy regulator
[    3.215101] xhci-mtk 1e1c0000.xhci: supply vusb33 not found, using dummy regulator
[    3.223048] xhci-mtk 1e1c0000.xhci: xHCI Host Controller
[    3.228390] xhci-mtk 1e1c0000.xhci: new USB bus registered, assigned bus number 1
[    3.250469] xhci-mtk 1e1c0000.xhci: hcc params 0x01401198 hci version 0x96 quirks 0x0000000000290010
[    3.259659] xhci-mtk 1e1c0000.xhci: irq 20, io mem 0x1e1c0000
[    3.266577] hub 1-0:1.0: USB hub found
[    3.270493] hub 1-0:1.0: 2 ports detected
[    3.275158] xhci-mtk 1e1c0000.xhci: xHCI Host Controller
[    3.280565] xhci-mtk 1e1c0000.xhci: new USB bus registered, assigned bus number 2
[    3.288042] xhci-mtk 1e1c0000.xhci: Host supports USB 3.0 SuperSpeed
[    3.294532] usb usb2: We don't know the algorithms for LPM for this host, disabling LPM.
[    3.303555] hub 2-0:1.0: USB hub found
[    3.307424] hub 2-0:1.0: 1 port detected
[    3.320928] kmodloader: done loading kernel modules from /etc/modules-boot.d/*
[    3.340771] init: - preinit -
[    4.332008] random: jshn: uninitialized urandom read (4 bytes read)
[    4.477547] random: jshn: uninitialized urandom read (4 bytes read)
[    4.530506] random: jshn: uninitialized urandom read (4 bytes read)
[    4.846305] mtk_soc_eth 1e100000.ethernet eth0: configuring for fixed/rgmii link mode
[    4.855385] mt7530 mdio-bus:1f lan1: configuring for phy/gmii link mode
[    4.855395] mtk_soc_eth 1e100000.ethernet eth0: Link is Up - 1Gbps/Full - flow control rx/tx
[    4.870856] 8021q: adding VLAN 0 to HW filter on device lan1
[    4.879146] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[    9.035917] random: crng init done
[    9.039343] random: 7 urandom warning(s) missed due to ratelimiting
[    9.137723] mount_root: jffs2 not ready yet, using temporary tmpfs overlay
[    9.148797] urandom-seed: Seed file not found (/etc/urandom.seed)
[    9.323918] procd: - early -
[    9.327060] procd: - watchdog -
[    9.970526] procd: - watchdog -
[    9.974634] procd: - ubus -
[   10.158205] procd: - init -
[   10.874973] kmodloader: loading kernel modules from /etc/modules.d/*
[   10.992362] urngd: v1.0.2 started.
[   11.079603] Loading modules backported from Linux version v5.15.8-0-g43e577d7a2cb
[   11.087181] Backport generated by backports.git v5.15.8-1-0-g83f664bb
[   11.131522] xt_time: kernel timezone is -0000
[   11.373874] mt7621-pci 1e140000.pcie: bus=2 slot=1 irq=23
[   11.379350] pci 0000:00:01.0: enabling device (0004 -> 0007)
[   11.385036] mt7603e 0000:02:00.0: enabling device (0000 -> 0002)
[   11.391210] mt7603e 0000:02:00.0: ASIC revision: 76030010
[   12.421786] mt7603e 0000:02:00.0: Firmware Version: ap_pcie
[   12.427368] mt7603e 0000:02:00.0: Build Time: 20160107100755
[   12.470299] mt7603e 0000:02:00.0: firmware init done
[   12.637786] ieee80211 phy0: Selected rate control algorithm 'minstrel_ht'
[   12.652599] mt7621-pci 1e140000.pcie: bus=1 slot=0 irq=22
[   12.658041] pci 0000:00:00.0: enabling device (0004 -> 0007)
[   12.663758] mt76x2e 0000:01:00.0: enabling device (0000 -> 0002)
[   12.669997] mt76x2e 0000:01:00.0: ASIC revision: 76120044
[   13.531547] mt76x2e 0000:01:00.0: ROM patch build: 20141115060606a
[   13.541735] mt76x2e 0000:01:00.0: Firmware Version: 0.0.00
[   13.547225] mt76x2e 0000:01:00.0: Build: 1
[   13.551328] mt76x2e 0000:01:00.0: Build Time: 201507311614____
[   13.580389] mt76x2e 0000:01:00.0: Firmware running!
[   13.587337] ieee80211 phy1: Selected rate control algorithm 'minstrel_ht'
[   13.645772] PPP generic driver version 2.4.2
[   13.652473] NET: Registered protocol family 24
[   13.676977] kmodloader: done loading kernel modules from /etc/modules.d/*
[   71.539982] jffs2_scan_eraseblock(): End of filesystem marker found at 0x0
[   71.547306] jffs2_build_filesystem(): unlocking the mtd device... 
[   71.547324] done.
[   71.555612] jffs2_build_filesystem(): erasing all blocks after the end marker... 
[   72.333701] mtk_soc_eth 1e100000.ethernet eth0: Link is Down
[   72.358078] mtk_soc_eth 1e100000.ethernet eth0: configuring for fixed/rgmii link mode
[   72.366314] mtk_soc_eth 1e100000.ethernet eth0: Link is Up - 1Gbps/Full - flow control rx/tx
[   72.372078] mt7530 mdio-bus:1f lan1: configuring for phy/gmii link mode
[   72.382005] 8021q: adding VLAN 0 to HW filter on device lan1
[   72.391547] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[   72.398967] br-lan: port 1(lan1) entered blocking state
[   72.404313] br-lan: port 1(lan1) entered disabled state
[   72.410577] device lan1 entered promiscuous mode
[   72.415271] device eth0 entered promiscuous mode
[   72.449603] mt7530 mdio-bus:1f lan2: configuring for phy/gmii link mode
[   72.456996] 8021q: adding VLAN 0 to HW filter on device lan2
[   72.466563] br-lan: port 2(lan2) entered blocking state
[   72.472008] br-lan: port 2(lan2) entered disabled state
[   72.478972] device lan2 entered promiscuous mode
[   72.499790] mt7530 mdio-bus:1f lan3: configuring for phy/gmii link mode
[   72.507095] 8021q: adding VLAN 0 to HW filter on device lan3
[   72.517427] br-lan: port 3(lan3) entered blocking state
[   72.522903] br-lan: port 3(lan3) entered disabled state
[   72.530987] device lan3 entered promiscuous mode
[   72.552212] mt7530 mdio-bus:1f lan4: configuring for phy/gmii link mode
[   72.559506] 8021q: adding VLAN 0 to HW filter on device lan4
[   72.570438] br-lan: port 4(lan4) entered blocking state
[   72.575726] br-lan: port 4(lan4) entered disabled state
[   72.584092] device lan4 entered promiscuous mode
[   72.608879] mt7530 mdio-bus:1f wan: configuring for phy/gmii link mode
[   72.616153] 8021q: adding VLAN 0 to HW filter on device wan
[   76.621068] mt7530 mdio-bus:1f lan2: Link is Up - 1Gbps/Full - flow control off
[   76.628436] br-lan: port 2(lan2) entered blocking state
[   76.633909] br-lan: port 2(lan2) entered forwarding state
[   76.640500] IPv6: ADDRCONF(NETDEV_CHANGE): br-lan: link becomes ready
[  151.660571] done.
[  151.662550] jffs2: notice: (1920) jffs2_build_xattr_subsystem: complete building xattr subsystem, 0 of xdatum (0 unchecked, 0 orphan) and 0 of xref (0 dead, 0 orphan) found.
[  151.813840] overlayfs: upper fs does not support tmpfile.
1 Like

All my newifi3 d2 can't boot in 5.10.x kernel, if I delete target/linux/generic/pending-5.10/481-mtd-spi-nor-rework-broken-flash-reset-support.patch, these devices can be normal start up.

1 Like

yes, it's the reason of this horrible issue.
I mention it here https://github.com/openwrt/openwrt/commit/74516f4357d281f093f0daac01c4c5c239acc443#comments
and the author of this patch is unreachable through email and github.
So I propose a pull request https://github.com/openwrt/openwrt/pull/4992 to fix this issue.

2 Likes

@shanpo @dimatto
Thanks a lot! I rebuild the latest pull after delete target/linux/generic/pending-5.10/481-mtd-spi-nor-rework-broken-flash-reset-support.patch. My D2 can start up now.

But I got a warning in the kernel log and some trace info and the call stack. I paste it below.

[    0.000000] Linux version 5.10.92 (eagle@us-2004lts-openwrt) (mipsel-openwrt-linux-musl-gcc (OpenWrt GCC 11.2.0 r18250-6832271ee7) 11.2.0, GNU ld (GNU Binutils) 2.37) #0 SMP Sun Jan 23 20:20:53 2022
[    0.000000] SoC Type: MediaTek MT7621 ver:1 eco:3
[    0.000000] printk: bootconsole [early0] enabled
[    0.000000] CPU0 revision is: 0001992f (MIPS 1004Kc)
[    0.000000] MIPS: machine is Newifi-D2
[    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  [mem 0x0000000010000000-0x0000000023ffffff]
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000000000000-0x000000001bffffff]
[    0.000000]   node   0: [mem 0x0000000020000000-0x0000000023ffffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x0000000023ffffff]
[    0.000000] On node 0 totalpages: 131072
[    0.000000]   Normal zone: 576 pages used for memmap
[    0.000000]   Normal zone: 0 pages reserved
[    0.000000]   Normal zone: 65536 pages, LIFO batch:15
[    0.000000]   HighMem zone: 65536 pages, LIFO batch:15
[    0.000000] percpu: Embedded 15 pages/cpu s30096 r8192 d23152 u61440
[    0.000000] pcpu-alloc: s30096 r8192 d23152 u61440 alloc=15*4096
[    0.000000] pcpu-alloc: [0] 0 [0] 1 [0] 2 [0] 3 
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 130496
[    0.000000] Kernel command line: console=ttyS0,115200 rootfstype=squashfs,jffs2
[    0.000000] Dentry cache hash table entries: 32768 (order: 5, 131072 bytes, linear)
[    0.000000] Inode-cache hash table entries: 16384 (order: 4, 65536 bytes, linear)
[    0.000000] Writing ErrCtl register=00010000
[    0.000000] Readback ErrCtl register=00010000
[    0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[    0.000000] Memory: 508376K/524288K available (6701K kernel code, 620K rwdata, 1356K rodata, 1292K init, 236K bss, 15912K reserved, 0K cma-reserved, 262144K highmem)
[    0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
[    0.000000] rcu: Hierarchical RCU implementation.
[    0.000000] 	Tracing variant of Tasks RCU enabled.
[    0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 10 jiffies.
[    0.000000] NR_IRQS: 256
[    0.000000] random: get_random_bytes called from start_kernel+0x3cc/0x5e4 with crng_init=0
[    0.000000] CPU Clock: 880MHz
[    0.000000] clocksource: GIC: mask: 0xffffffffffffffff max_cycles: 0xcaf478abb4, max_idle_ns: 440795247997 ns
[    0.000013] sched_clock: 64 bits at 880MHz, resolution 1ns, wraps every 4398046511103ns
[    0.007948] clocksource: MIPS: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 4343773742 ns
[    0.016940] Calibrating delay loop... 586.13 BogoMIPS (lpj=2930688)
[    0.083109] pid_max: default: 32768 minimum: 301
[    0.087887] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.095090] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.105721] rcu: Hierarchical SRCU implementation.
[    0.110747] dyndbg: Ignore empty _ddebug table in a CONFIG_DYNAMIC_DEBUG_CORE build
[    0.118828] smp: Bringing up secondary CPUs ...
[    0.124048] Primary instruction cache 32kB, VIPT, 4-way, linesize 32 bytes.
[    0.124059] Primary data cache 32kB, 4-way, PIPT, no aliases, linesize 32 bytes
[    0.124072] MIPS secondary cache 256kB, 8-way, linesize 32 bytes.
[    0.124155] CPU1 revision is: 0001992f (MIPS 1004Kc)
[    0.178702] Synchronize counters for CPU 1: done.
[    0.211457] Primary instruction cache 32kB, VIPT, 4-way, linesize 32 bytes.
[    0.211467] Primary data cache 32kB, 4-way, PIPT, no aliases, linesize 32 bytes
[    0.211474] MIPS secondary cache 256kB, 8-way, linesize 32 bytes.
[    0.211525] CPU2 revision is: 0001992f (MIPS 1004Kc)
[    0.270213] Synchronize counters for CPU 2: done.
[    0.300702] Primary instruction cache 32kB, VIPT, 4-way, linesize 32 bytes.
[    0.300711] Primary data cache 32kB, 4-way, PIPT, no aliases, linesize 32 bytes
[    0.300719] MIPS secondary cache 256kB, 8-way, linesize 32 bytes.
[    0.300774] CPU3 revision is: 0001992f (MIPS 1004Kc)
[    0.355401] Synchronize counters for CPU 3: done.
[    0.385275] smp: Brought up 1 node, 4 CPUs
[    0.393636] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.403474] futex hash table entries: 1024 (order: 3, 32768 bytes, linear)
[    0.410526] pinctrl core: initialized pinctrl subsystem
[    0.417797] NET: Registered protocol family 16
[    0.424684] cpuidle: using governor teo
[    0.446702] FPU Affinity set after 11720 emulations
[    0.454164] random: fast init done
[    0.476068] clocksource: Switched to clocksource GIC
[    0.483205] NET: Registered protocol family 2
[    0.487804] IP idents hash table entries: 4096 (order: 3, 32768 bytes, linear)
[    0.495925] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 6144 bytes, linear)
[    0.504354] TCP established hash table entries: 2048 (order: 1, 8192 bytes, linear)
[    0.511955] TCP bind hash table entries: 2048 (order: 2, 16384 bytes, linear)
[    0.519041] TCP: Hash tables configured (established 2048 bind 2048)
[    0.525473] UDP hash table entries: 256 (order: 1, 8192 bytes, linear)
[    0.531961] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes, linear)
[    0.539133] NET: Registered protocol family 1
[    0.543428] PCI: CLS 0 bytes, default 32
[    0.549888] workingset: timestamp_bits=14 max_order=17 bucket_order=3
[    0.560816] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.566612] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    0.577309] bounce: pool size: 64 pages
[    0.583154] mt7621_gpio 1e000600.gpio: registering 32 gpios
[    0.589139] mt7621_gpio 1e000600.gpio: registering 32 gpios
[    0.595006] mt7621_gpio 1e000600.gpio: registering 32 gpios
[    0.601650] Serial: 8250/16550 driver, 3 ports, IRQ sharing disabled
[    0.609800] printk: console [ttyS0] disabled
[    0.614108] 1e000c00.uartlite: ttyS0 at MMIO 0x1e000c00 (irq = 19, base_baud = 3125000) is a 16550A
[    0.623147] printk: console [ttyS0] enabled
[    0.631410] printk: bootconsole [early0] disabled
[    0.643734] spi-mt7621 1e000b00.spi: sys_freq: 220000000
[    0.650697] ------------[ cut here ]------------
[    0.655356] WARNING: CPU: 1 PID: 1 at drivers/mtd/spi-nor/core.c:2987 spi_nor_init+0x1b8/0x1c0
[    0.663983] enabling reset hack; may not recover from unexpected reboots
[    0.670695] Modules linked in:
[    0.673762] CPU: 1 PID: 1 Comm: swapper/0 Not tainted 5.10.92 #0
[    0.679743] Stack : 809e0000 8157c800 80f12b68 80083234 80870000 80760ab0 00000000 00000000
[    0.688096]         814419cc 809c0000 8072f1f0 814383c8 807f6e27 00000001 81441970 0f9ee78a
[    0.696446]         00000000 00000000 8072f1f0 81441810 ffffefff 00000000 ffffffea 00000000
[    0.704792]         8144181c 00000067 807fc7f8 ffffffff 00000000 00000001 00000000 80730000
[    0.713136]         00000009 809f0000 80f12b68 8157c800 00000018 803fa6ec 00000004 809c0004
[    0.721484]         ...
[    0.723927] Call Trace:
[    0.726389] [<800080e0>] show_stack+0x30/0x100
[    0.730826] [<80377f48>] dump_stack+0x9c/0xcc
[    0.735186] [<8002ff1c>] __warn+0xc0/0x12c
[    0.739272] [<80030014>] warn_slowpath_fmt+0x8c/0xac
[    0.744221] [<8044cf98>] spi_nor_init+0x1b8/0x1c0
[    0.748909] [<8044d6c4>] spi_nor_scan+0x6e0/0xb18
[    0.753593] [<8044db90>] spi_nor_probe+0x94/0x314
[    0.758299] [<8040abb8>] really_probe+0x108/0x4d8
[    0.762987] [<8040862c>] bus_for_each_drv+0x70/0xb0
[    0.767848] [<8040b190>] __device_attach+0xe8/0x160
[    0.772706] [<80409ac0>] bus_probe_device+0xa0/0xbc
[    0.777568] [<80405530>] device_add+0x390/0x7a8
[    0.782083] [<8046b140>] spi_add_device+0xc0/0x1c8
[    0.786858] [<8046bbc0>] spi_register_controller+0x83c/0xb7c
[    0.792498] [<8046e1ec>] mt7621_spi_probe+0x168/0x218
[    0.797543] [<8040cf10>] platform_drv_probe+0x40/0x94
[    0.802574] [<8040abb8>] really_probe+0x108/0x4d8
[    0.807261] [<8040b674>] device_driver_attach+0x124/0x134
[    0.812638] [<8040b700>] __driver_attach+0x7c/0x13c
[    0.817500] [<80408580>] bus_for_each_dev+0x68/0xa4
[    0.822359] [<80409d78>] bus_add_driver+0x134/0x214
[    0.827221] [<8040beec>] driver_register+0x98/0x154
[    0.832078] [<80001644>] do_one_initcall+0x50/0x1a8
[    0.836943] [<8087e05c>] kernel_init_freeable+0x27c/0x314
[    0.842333] [<80685b80>] kernel_init+0x10/0x100
[    0.846848] [<80002ff8>] ret_from_kernel_thread+0x14/0x1c
[    0.852226] 
[    0.853855] ---[ end trace 132bc0865ae70871 ]---
[    0.858617] spi-nor spi0.0: w25q256 (32768 Kbytes)
[    0.863465] 4 fixed-partitions partitions found on MTD device spi0.0
[    0.869838] Creating 4 MTD partitions on "spi0.0":
[    0.874615] 0x000000000000-0x000000030000 : "u-boot"
[    0.880728] 0x000000030000-0x000000040000 : "u-boot-env"
[    0.887244] 0x000000040000-0x000000050000 : "factory"
[    0.893426] 0x000000050000-0x000002000000 : "firmware"
[    0.900116] 2 uimage-fw partitions found on MTD device firmware
[    0.906108] Creating 2 MTD partitions on "firmware":
[    0.911071] 0x000000000000-0x00000029a46d : "kernel"
[    0.916031] mtd: partition "kernel" doesn't end on an erase/write block -- force read-only
[    0.925396] 0x00000029a46d-0x000001fb0000 : "rootfs"
[    0.930413] mtd: partition "rootfs" doesn't start on an erase/write block boundary -- force read-only
[    0.940571] mtd: device 5 (rootfs) set to be root filesystem
[    0.946382] 1 squashfs-split partitions found on MTD device rootfs
[    0.952550] 0x000001600000-0x000001fb0000 : "rootfs_data"
[    0.965718] libphy: Fixed MDIO Bus: probed
[    1.007202] libphy: mdio: probed
[    1.011189] mt7530 mdio-bus:1f: MT7530 adapts as multi-chip module
[    1.021172] mtk_soc_eth 1e100000.ethernet eth0: mediatek frame engine at 0xbe100000, irq 21
[    1.032998] mt7621-pci 1e140000.pcie: host bridge /pcie@1e140000 ranges:
[    1.039750] mt7621-pci 1e140000.pcie:   No bus range found for /pcie@1e140000, using [bus 00-ff]
[    1.048554] mt7621-pci 1e140000.pcie:      MEM 0x0060000000..0x006fffffff -> 0x0000000000
[    1.056732] mt7621-pci 1e140000.pcie:       IO 0x001e160000..0x001e16ffff -> 0x0000000000
[    1.064990] mt7621-pci 1e140000.pcie: Parsing DT failed
[    1.072548] NET: Registered protocol family 10
[    1.078563] Segment Routing with IPv6
[    1.082321] NET: Registered protocol family 17
[    1.087259] 8021q: 802.1Q VLAN Support v1.8
[    1.095339] gpio-export gpio_export: 1 gpio(s) exported
[    1.100911] mt7530 mdio-bus:1f: MT7530 adapts as multi-chip module
[    1.126428] libphy: dsa slave smi: probed
[    1.130804] mt7530 mdio-bus:1f lan4 (uninitialized): PHY [dsa-0.0:00] driver [Generic PHY] (irq=POLL)
[    1.141922] mt7530 mdio-bus:1f lan3 (uninitialized): PHY [dsa-0.0:01] driver [Generic PHY] (irq=POLL)
[    1.153038] mt7530 mdio-bus:1f lan2 (uninitialized): PHY [dsa-0.0:02] driver [Generic PHY] (irq=POLL)
[    1.164101] mt7530 mdio-bus:1f lan1 (uninitialized): PHY [dsa-0.0:03] driver [Generic PHY] (irq=POLL)
[    1.175311] mt7530 mdio-bus:1f wan (uninitialized): PHY [dsa-0.0:04] driver [Generic PHY] (irq=POLL)
[    1.187220] mt7530 mdio-bus:1f: configuring for fixed/rgmii link mode
[    1.197867] DSA: tree 0 setup
[    1.201261] rt2880-pinmux pinctrl: pcie is already enabled
[    1.206849] mt7621-pci 1e140000.pcie: host bridge /pcie@1e140000 ranges:
[    1.213537] mt7621-pci 1e140000.pcie:   No bus range found for /pcie@1e140000, using [bus 00-ff]
[    1.222337] mt7621-pci 1e140000.pcie:      MEM 0x0060000000..0x006fffffff -> 0x0000000000
[    1.230511] mt7621-pci 1e140000.pcie:       IO 0x001e160000..0x001e16ffff -> 0x0000000000
[    1.238794] mt7621-pci-phy 1e149000.pcie-phy: PHY for 0xbe149000 (dual port = 1)
[    1.246624] mt7621-pci-phy 1e14a000.pcie-phy: PHY for 0xbe14a000 (dual port = 0)
[    1.254307] mt7621-pci 1e140000.pcie: failed to parse bus ranges property: -22
[    1.361775] mt7621-pci-phy 1e149000.pcie-phy: Xtal is 40MHz
[    1.367365] mt7621-pci-phy 1e14a000.pcie-phy: Xtal is 40MHz
[    1.473126] mt7621-pci 1e140000.pcie: pcie2 no card, disable it (RST & CLK)
[    1.480084] mt7621-pci 1e140000.pcie: PCIE0 enabled
[    1.484940] mt7621-pci 1e140000.pcie: PCIE1 enabled
[    1.489817] mt7621-pci 1e140000.pcie: PCI coherence region base: 0x60000000, mask/settings: 0xf0000002
[    1.499320] mt7621-pci 1e140000.pcie: PCI host bridge to bus 0000:00
[    1.505683] pci_bus 0000:00: root bus resource [io  0x1e160000-0x1e16ffff]
[    1.512560] pci_bus 0000:00: root bus resource [mem 0x60000000-0x6fffffff]
[    1.519433] pci_bus 0000:00: root bus resource [bus 00-ff]
[    1.524901] pci_bus 0000:00: root bus resource [mem 0x60000000-0x6fffffff] (bus address [0x00000000-0x0fffffff])
[    1.535101] pci 0000:00:00.0: [0e8d:0801] type 01 class 0x060400
[    1.541131] pci 0000:00:00.0: reg 0x10: [mem 0x00000000-0x7fffffff]
[    1.547393] pci 0000:00:00.0: reg 0x14: initial BAR value 0x00000000 invalid
[    1.554412] pci 0000:00:00.0: reg 0x14: [mem size 0x00010000]
[    1.560233] pci 0000:00:00.0: supports D1
[    1.564229] pci 0000:00:00.0: PME# supported from D0 D1 D3hot
[    1.570627] pci 0000:00:01.0: [0e8d:0801] type 01 class 0x060400
[    1.576690] pci 0000:00:01.0: reg 0x10: [mem 0x00000000-0x7fffffff]
[    1.582934] pci 0000:00:01.0: reg 0x14: initial BAR value 0x00000000 invalid
[    1.589967] pci 0000:00:01.0: reg 0x14: [mem size 0x00010000]
[    1.595754] pci 0000:00:01.0: supports D1
[    1.599766] pci 0000:00:01.0: PME# supported from D0 D1 D3hot
[    1.607063] pci 0000:00:00.0: bridge configuration invalid ([bus 00-00]), reconfiguring
[    1.615059] pci 0000:00:01.0: bridge configuration invalid ([bus 00-00]), reconfiguring
[    1.623363] pci 0000:01:00.0: [14c3:7612] type 00 class 0x028000
[    1.629422] pci 0000:01:00.0: reg 0x10: initial BAR value 0x00000000 invalid
[    1.636476] pci 0000:01:00.0: reg 0x10: [mem size 0x00100000 64bit]
[    1.642752] pci 0000:01:00.0: reg 0x30: initial BAR value 0x00000000 invalid
[    1.649785] pci 0000:01:00.0: reg 0x30: [mem size 0x00010000 pref]
[    1.656087] pci 0000:01:00.0: PME# supported from D0 D3hot D3cold
[    1.663734] pci 0000:00:00.0: PCI bridge to [bus 01-ff]
[    1.668991] pci 0000:00:00.0:   bridge window [io  0x0000-0x0fff]
[    1.675061] pci 0000:00:00.0:   bridge window [mem 0x60000000-0x600fffff]
[    1.681852] pci 0000:00:00.0:   bridge window [mem 0x60000000-0x600fffff pref]
[    1.689071] pci_bus 0000:01: busn_res: [bus 01-ff] end is updated to 01
[    1.695939] pci 0000:02:00.0: [14c3:7603] type 00 class 0x028000
[    1.702013] pci 0000:02:00.0: reg 0x10: initial BAR value 0x00000000 invalid
[    1.709062] pci 0000:02:00.0: reg 0x10: [mem size 0x00100000]
[    1.714923] pci 0000:02:00.0: PME# supported from D0 D3hot D3cold
[    1.722566] pci 0000:00:01.0: PCI bridge to [bus 02-ff]
[    1.727822] pci 0000:00:01.0:   bridge window [io  0x0000-0x0fff]
[    1.733891] pci 0000:00:01.0:   bridge window [mem 0x60000000-0x600fffff]
[    1.740685] pci 0000:00:01.0:   bridge window [mem 0x60000000-0x600fffff pref]
[    1.747902] pci_bus 0000:02: busn_res: [bus 02-ff] end is updated to 02
[    1.754568] pci 0000:00:00.0: BAR 0: no space for [mem size 0x80000000]
[    1.761178] pci 0000:00:00.0: BAR 0: failed to assign [mem size 0x80000000]
[    1.768133] pci 0000:00:01.0: BAR 0: no space for [mem size 0x80000000]
[    1.774718] pci 0000:00:01.0: BAR 0: failed to assign [mem size 0x80000000]
[    1.781681] pci 0000:00:00.0: BAR 8: assigned [mem 0x60000000-0x600fffff]
[    1.788463] pci 0000:00:00.0: BAR 9: assigned [mem 0x60100000-0x601fffff pref]
[    1.795656] pci 0000:00:01.0: BAR 8: assigned [mem 0x60200000-0x602fffff]
[    1.802447] pci 0000:00:01.0: BAR 9: assigned [mem 0x60300000-0x603fffff pref]
[    1.809661] pci 0000:00:00.0: BAR 1: assigned [mem 0x60400000-0x6040ffff]
[    1.816452] pci 0000:00:01.0: BAR 1: assigned [mem 0x60410000-0x6041ffff]
[    1.823214] pci 0000:00:00.0: BAR 7: assigned [io  0x1e160000-0x1e160fff]
[    1.829991] pci 0000:00:01.0: BAR 7: assigned [io  0x1e161000-0x1e161fff]
[    1.836789] pci 0000:01:00.0: BAR 0: assigned [mem 0x60000000-0x600fffff 64bit]
[    1.844079] pci 0000:01:00.0: BAR 6: assigned [mem 0x60100000-0x6010ffff pref]
[    1.851288] pci 0000:00:00.0: PCI bridge to [bus 01]
[    1.856263] pci 0000:00:00.0:   bridge window [io  0x1e160000-0x1e160fff]
[    1.863025] pci 0000:00:00.0:   bridge window [mem 0x60000000-0x600fffff]
[    1.869800] pci 0000:00:00.0:   bridge window [mem 0x60100000-0x601fffff pref]
[    1.877023] pci 0000:02:00.0: BAR 0: assigned [mem 0x60200000-0x602fffff]
[    1.883786] pci 0000:00:01.0: PCI bridge to [bus 02]
[    1.888745] pci 0000:00:01.0:   bridge window [io  0x1e161000-0x1e161fff]
[    1.895505] pci 0000:00:01.0:   bridge window [mem 0x60200000-0x602fffff]
[    1.902289] pci 0000:00:01.0:   bridge window [mem 0x60300000-0x603fffff pref]
[    1.918500] VFS: Mounted root (squashfs filesystem) readonly on device 31:5.
[    1.930652] Freeing unused kernel memory: 1292K
[    1.935194] This architecture does not have kernel memory protection.
[    1.941657] Run /sbin/init as init process
[    1.945736]   with arguments:
[    1.945742]     /sbin/init
[    1.945746]   with environment:
[    1.945752]     HOME=/
[    1.945756]     TERM=linux
[    1.946220] mt7530 mdio-bus:1f: Link is Up - 1Gbps/Full - flow control off
[    2.489147] init: Console is alive
[    2.492921] init: - watchdog -
[    3.877202] kmodloader: loading kernel modules from /etc/modules-boot.d/*
[    4.004508] usbcore: registered new interface driver usbfs
[    4.010192] usbcore: registered new interface driver hub
[    4.015618] usbcore: registered new device driver usb
[    4.062200] SCSI subsystem initialized
[    4.078181] xhci-mtk 1e1c0000.xhci: supply vbus not found, using dummy regulator
[    4.085839] xhci-mtk 1e1c0000.xhci: supply vusb33 not found, using dummy regulator
[    4.093691] xhci-mtk 1e1c0000.xhci: xHCI Host Controller
[    4.099061] xhci-mtk 1e1c0000.xhci: new USB bus registered, assigned bus number 1
[    4.116223] xhci-mtk 1e1c0000.xhci: hcc params 0x01401198 hci version 0x96 quirks 0x0000000000290010
[    4.125403] xhci-mtk 1e1c0000.xhci: irq 20, io mem 0x1e1c0000
[    4.132346] hub 1-0:1.0: USB hub found
[    4.136361] hub 1-0:1.0: 2 ports detected
[    4.140975] xhci-mtk 1e1c0000.xhci: xHCI Host Controller
[    4.146382] xhci-mtk 1e1c0000.xhci: new USB bus registered, assigned bus number 2
[    4.153871] xhci-mtk 1e1c0000.xhci: Host supports USB 3.0 SuperSpeed
[    4.160371] usb usb2: We don't know the algorithms for LPM for this host, disabling LPM.
[    4.169431] hub 2-0:1.0: USB hub found
[    4.173294] hub 2-0:1.0: 1 port detected
[    4.189557] usbcore: registered new interface driver usb-storage
[    4.196338] kmodloader: done loading kernel modules from /etc/modules-boot.d/*
[    4.216536] init: - preinit -
[    5.218129] random: jshn: uninitialized urandom read (4 bytes read)
[    5.370716] random: jshn: uninitialized urandom read (4 bytes read)
[    5.423568] random: jshn: uninitialized urandom read (4 bytes read)
[    5.746576] mtk_soc_eth 1e100000.ethernet eth0: configuring for fixed/rgmii link mode
[    5.754941] mtk_soc_eth 1e100000.ethernet eth0: Link is Up - 1Gbps/Full - flow control rx/tx
[    5.756595] mt7530 mdio-bus:1f lan1: configuring for phy/gmii link mode
[    5.770350] 8021q: adding VLAN 0 to HW filter on device lan1
[    5.778679] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[    5.835324] random: crng init done
[    5.840014] random: 7 urandom warning(s) missed due to ratelimiting
[   10.058708] mount_root: loading kmods from internal overlay
[   10.090252] kmodloader: loading kernel modules from //etc/modules-boot.d/*
[   10.104775] kmodloader: done loading kernel modules from //etc/modules-boot.d/*
[   10.648894] block: attempting to load /etc/config/fstab
[   10.660731] block: unable to load configuration (fstab: Entry not found)
[   10.667744] block: no usable configuration
[   10.672949] mount_root: jffs2 not ready yet, using temporary tmpfs overlay
[   10.692630] urandom-seed: Seed file not found (/etc/urandom.seed)
[   10.798429] procd: - early -
[   10.801581] procd: - watchdog -
[   11.436300] procd: - watchdog -
[   11.447529] procd: - ubus -
[   11.624754] procd: - init -
[   12.562542] kmodloader: loading kernel modules from /etc/modules.d/*
[   12.780016] urngd: v1.0.2 started.
[   12.841898] videodev: Linux video capture interface: v2.00
[   12.857952] Loading modules backported from Linux version v5.15.8-0-g43e577d7a2cb
[   12.865435] Backport generated by backports.git v5.15.8-1-0-g83f664bb
[   12.895270] usbcore: registered new interface driver ums-alauda
[   12.903213] usbcore: registered new interface driver ums-cypress
[   12.911301] usbcore: registered new interface driver ums-datafab
[   12.919216] usbcore: registered new interface driver ums-freecom
[   12.927234] usbcore: registered new interface driver ums-isd200
[   12.935230] usbcore: registered new interface driver ums-jumpshot
[   12.943280] usbcore: registered new interface driver ums-karma
[   12.951449] usbcore: registered new interface driver ums-sddr09
[   12.959436] usbcore: registered new interface driver ums-sddr55
[   12.967635] usbcore: registered new interface driver ums-usbat
[   12.991777] xt_time: kernel timezone is -0000
[   13.243513] mt7621-pci 1e140000.pcie: bus=2 slot=1 irq=23
[   13.249027] pci 0000:00:01.0: enabling device (0004 -> 0007)
[   13.254698] mt7603e 0000:02:00.0: enabling device (0000 -> 0002)
[   13.260874] mt7603e 0000:02:00.0: ASIC revision: 76030010
[   14.297494] mt7603e 0000:02:00.0: Firmware Version: ap_pcie
[   14.303079] mt7603e 0000:02:00.0: Build Time: 20160107100755
[   14.346017] mt7603e 0000:02:00.0: firmware init done
[   14.513222] ieee80211 phy0: Selected rate control algorithm 'minstrel_ht'
[   14.529560] mt7621-pci 1e140000.pcie: bus=1 slot=0 irq=22
[   14.535014] pci 0000:00:00.0: enabling device (0004 -> 0007)
[   14.540732] mt76x2e 0000:01:00.0: enabling device (0000 -> 0002)
[   14.547009] mt76x2e 0000:01:00.0: ASIC revision: 76120044
[   15.311549] mt76x2e 0000:01:00.0: ROM patch build: 20141115060606a
[   15.324451] mt76x2e 0000:01:00.0: Firmware Version: 0.0.00
[   15.330114] mt76x2e 0000:01:00.0: Build: 1
[   15.334283] mt76x2e 0000:01:00.0: Build Time: 201507311614____
[   15.356060] mt76x2e 0000:01:00.0: Firmware running!
[   15.362857] ieee80211 phy1: Selected rate control algorithm 'minstrel_ht'
[   15.400537] PPP generic driver version 2.4.2
[   15.407261] NET: Registered protocol family 24
[   15.418574] usbcore: registered new interface driver uvcvideo
[   15.424349] USB Video Class driver (1.1.1)
[   15.444363] kmodloader: done loading kernel modules from /etc/modules.d/*
[   36.231163] mtk_soc_eth 1e100000.ethernet eth0: Link is Down
[   36.246990] mtk_soc_eth 1e100000.ethernet eth0: configuring for fixed/rgmii link mode
[   36.255257] mtk_soc_eth 1e100000.ethernet eth0: Link is Up - 1Gbps/Full - flow control rx/tx
[   36.259283] mt7530 mdio-bus:1f lan1: configuring for phy/gmii link mode
[   36.270876] 8021q: adding VLAN 0 to HW filter on device lan1
[   36.279756] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[   36.287489] br-lan: port 1(lan1) entered blocking state
[   36.292839] br-lan: port 1(lan1) entered disabled state
[   36.298982] device lan1 entered promiscuous mode
[   36.303642] device eth0 entered promiscuous mode
[   36.342189] mt7530 mdio-bus:1f lan2: configuring for phy/gmii link mode
[   36.349731] 8021q: adding VLAN 0 to HW filter on device lan2
[   36.358786] br-lan: port 2(lan2) entered blocking state
[   36.364063] br-lan: port 2(lan2) entered disabled state
[   36.370850] device lan2 entered promiscuous mode
[   36.391679] mt7530 mdio-bus:1f lan3: configuring for phy/gmii link mode
[   36.399116] 8021q: adding VLAN 0 to HW filter on device lan3
[   36.409629] br-lan: port 3(lan3) entered blocking state
[   36.414914] br-lan: port 3(lan3) entered disabled state
[   36.422822] device lan3 entered promiscuous mode
[   36.442821] mt7530 mdio-bus:1f lan4: configuring for phy/gmii link mode
[   36.450232] 8021q: adding VLAN 0 to HW filter on device lan4
[   36.460114] br-lan: port 4(lan4) entered blocking state
[   36.465443] br-lan: port 4(lan4) entered disabled state
[   36.472634] device lan4 entered promiscuous mode
[   36.495282] mt7530 mdio-bus:1f wan: configuring for phy/gmii link mode
[   36.502567] 8021q: adding VLAN 0 to HW filter on device wan
[   38.977924] jffs2_scan_eraseblock(): End of filesystem marker found at 0x0
[   38.984834] jffs2_build_filesystem(): unlocking the mtd device... 
[   38.984840] done.
[   38.993051] jffs2_build_filesystem(): erasing all blocks after the end marker... 
[   40.537003] mt7530 mdio-bus:1f lan3: Link is Up - 1Gbps/Full - flow control off
[   40.551858] br-lan: port 3(lan3) entered blocking state
[   40.557126] br-lan: port 3(lan3) entered forwarding state
[   40.565182] IPv6: ADDRCONF(NETDEV_CHANGE): br-lan: link becomes ready
[   69.091194] done.
[   69.093243] jffs2: notice: (2861) jffs2_build_xattr_subsystem: complete building xattr subsystem, 0 of xdatum (0 unchecked, 0 orphan) and 0 of xref (0 dead, 0 orphan) found.
[   69.367383] overlayfs: upper fs does not support tmpfile.
1 Like

If you open target/linux/generic/pending-5.10/481-mtd-spi-nor-rework-broken-flash-reset-support.patch, you will understand that these warning messages are harmless but annoying, if this patch is available , will just print a message:

spi-nor spi0.0: enabling reset hack; may not recover from unexpected reboots

dimatto在他提交的补丁里也做了同样的事。

@shanpo
:grinning: 是的,我在Patch中看到了关于这个Warning的指令。我只是好奇,为什么我的另外两台D2可以正常工作,而这两台却不行。删除这个patch,对运行还没有看到实质的影响。另外这个patch似乎也不是针对华邦的存储芯片的特定型号的。非常感谢您的答复。