Phicomm K2P stuck on bootup

Router stucks after this message.
random: crng init done
router bootup logs (captured by serial console)

Upgrade completed
Rebooting system...
umount: can't unmount /dev: Resource busy
[ 4400.680192] reboot: Restarting system

Boot and Recovery Environment for Embedded Devices
Copyright (C) 2017 HackPascal <hackpascal@gmail.com>
Build date 2017-07-31 [git-5838a64]
Version 1.1 (r1033)

DRAM: 256MB
Platform: MediaTek MT7621A ver 1, eco 3
Board: Phicomm K2P
Clocks: CPU: 880MHz, DDR: 1200MHz, Bus: 293MHz, Ref: 40MHz
Flash: Winbond W25Q256 (32MB) on rt6855a-spi
rt2880-eth: MAC address from EEPROM is invalid, using default settings.
rt2880-eth: Using MAC address 00:0c:43:00:00:01
eth0: MediaTek MT7530 Gigabit switch

Network started on eth0, inet addr 192.168.1.1, netmask 255.255.255.0

Press any key to interrupt autoboot ... 0

Trying to boot firmware from 0x000a0000 in flash bank 0 ...
Reading data into memory ...
U-Boot firmware image header detected.
    Image Name:   MIPS OpenWrt Linux-4.14.151
    Data Size:    1923429 Bytes
    Load Address: 80001000
    Entry Point:  80001000
Uncompressing data (LZMA) ... done.
Flushing cache ... done.

Starting kernel at 0x80001000...

[    0.000000] Linux version 4.14.151 (root@ip-10-200-11-77) (gcc version 7.3.0                                                                                                                 (OpenWrt GCC 7.3.0 r7897-9d401013fc)) #0 SMP Tue Nov 5 14:12:18 2019
[    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 Phicomm K2P
[    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 byt                                                                                                                es
[    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+0x94/0x4a8 with                                                                                                                 crng_init=0
[    0.000000] percpu: Embedded 14 pages/cpu s26224 r8192 d22928 u57344
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 65024
[    0.000000] Kernel command line: console=ttyS0,57600 rootfstype=squashfs,jffs                                                                                                                2
[    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=000062c0
[    0.000000] Readback ErrCtl register=000062c0
[    0.000000] Memory: 253304K/262144K available (4541K kernel code, 233K rwdata                                                                                                                , 996K rodata, 232K init, 249K bss, 8840K 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: 0xcaf478ab                                                                                                                b4, max_idle_ns: 440795247997 ns
[    0.000000] clocksource: MIPS: mask: 0xffffffff max_cycles: 0xffffffff, max_i                                                                                                                dle_ns: 4343773742 ns
[    0.000010] sched_clock: 32 bits at 440MHz, resolution 2ns, wraps every 48806                                                                                                                45118ns
[    0.015496] Calibrating delay loop... 586.13 BogoMIPS (lpj=2930688)
[    0.087826] pid_max: default: 32768 minimum: 301
[    0.097141] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.110162] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.125919] Hierarchical SRCU implementation.
[    0.135395] smp: Bringing up secondary CPUs ...
[    7.268810] Primary instruction cache 32kB, VIPT, 4-way, linesize 32 bytes.
[    7.268819] Primary data cache 32kB, 4-way, PIPT, no aliases, linesize 32 byt                                                                                                                es
[    7.268830] MIPS secondary cache 256kB, 8-way, linesize 32 bytes.
[    7.268969] CPU1 revision is: 0001992f (MIPS 1004Kc)
[    0.204767] Synchronize counters for CPU 1: done.
[    7.017138] Primary instruction cache 32kB, VIPT, 4-way, linesize 32 bytes.
[    7.017146] Primary data cache 32kB, 4-way, PIPT, no aliases, linesize 32 byt                                                                                                                es
[    7.017154] MIPS secondary cache 256kB, 8-way, linesize 32 bytes.
[    7.017225] CPU2 revision is: 0001992f (MIPS 1004Kc)
[    0.325592] Synchronize counters for CPU 2: done.
[    7.136157] Primary instruction cache 32kB, VIPT, 4-way, linesize 32 bytes.
[    7.136165] Primary data cache 32kB, 4-way, PIPT, no aliases, linesize 32 byt                                                                                                                es
[    7.136172] MIPS secondary cache 256kB, 8-way, linesize 32 bytes.
[    7.136251] CPU3 revision is: 0001992f (MIPS 1004Kc)
[    0.445156] Synchronize counters for CPU 3: done.
[    0.504756] smp: Brought up 1 node, 4 CPUs
[    0.516175] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, ma                                                                                                                x_idle_ns: 19112604462750000 ns
[    0.535638] futex hash table entries: 1024 (order: 3, 32768 bytes)
[    0.548080] pinctrl core: initialized pinctrl subsystem
[    0.558917] NET: Registered protocol family 16
[    0.578156] pull PCIe RST: RALINK_RSTCTRL = 4000000
[    0.888103] release PCIe RST: RALINK_RSTCTRL = 7000000
[    0.898168] ***** Xtal 40MHz *****
[    0.904900] release PCIe RST: RALINK_RSTCTRL = 7000000
[    0.915104] Port 0 N_FTS = 1b102800
[    0.922005] Port 1 N_FTS = 1b102800
[    0.928930] Port 2 N_FTS = 1b102800
[    2.087397] PCIE0 no card, disable it(RST&CLK)
[    2.096085] PCIE1 no card, disable it(RST&CLK)
[    2.104885] PCIE2 no card, disable it(RST&CLK)
[    2.122519] mt7621_gpio 1e000600.gpio: registering 32 gpios
[    2.133842] mt7621_gpio 1e000600.gpio: registering 32 gpios
[    2.145059] mt7621_gpio 1e000600.gpio: registering 32 gpios
[    2.158665] clocksource: Switched to clocksource GIC
[    2.170254] NET: Registered protocol family 2
[    2.179596] TCP established hash table entries: 2048 (order: 1, 8192 bytes)
[    2.193350] TCP bind hash table entries: 2048 (order: 2, 16384 bytes)
[    2.206128] TCP: Hash tables configured (established 2048 bind 2048)
[    2.218860] UDP hash table entries: 256 (order: 1, 8192 bytes)
[    2.230362] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes)
[    2.243001] NET: Registered protocol family 1
[    2.488596] 4 CPUs re-calibrate udelay(lpj = 2924544)
[    2.499989] Crashlog allocated RAM at address 0x3f00000
[    2.510533] workingset: timestamp_bits=30 max_order=16 bucket_order=0
[    2.530675] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    2.542177] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORIT                                                                                                                Y) (c) 2001-2006 Red Hat, Inc.
[    2.563624] random: fast init done
[    2.570236] io scheduler noop registered
[    2.570304] io scheduler deadline registered (default)
[    2.589266] Serial: 8250/16550 driver, 3 ports, IRQ sharing disabled
[    2.603128] console [ttyS0] disabled
[    2.610178] 1e000c00.uartlite: ttyS0 at MMIO 0x1e000c00 (irq = 18, base_baud                                                                                                                 = 3125000) is a 16550A
[    2.628109] console [ttyS0] enabled
[    2.628109] console [ttyS0] enabled
[    2.641903] bootconsole [early0] disabled
[    2.641903] bootconsole [early0] disabled
[    2.659663] MediaTek Nand driver init, version v2.1 Fix AHB virt2phys error
[    2.673976] spi-mt7621 1e000b00.spi: sys_freq: 50000000
[    2.694483] m25p80 spi0.0: w25q256 (32768 Kbytes)
[    2.703930] 5 fixed-partitions partitions found on MTD device spi0.0
[    2.716576] Creating 5 MTD partitions on "spi0.0":
[    2.726122] 0x000000000000-0x000000030000 : "u-boot"
[    2.737123] 0x000000030000-0x000000040000 : "u-boot-env"
[    2.748790] 0x000000040000-0x000000050000 : "factory"
[    2.759912] 0x000000050000-0x0000000a0000 : "permanent_config"
[    2.772553] 0x0000000a0000-0x000002000000 : "firmware"
[    2.853892] 2 uimage-fw partitions found on MTD device firmware
[    2.865708] 0x0000000a0000-0x0000002759a5 : "kernel"
[    2.876649] 0x0000002759a5-0x000002000000 : "rootfs"
[    2.887500] mtd: device 6 (rootfs) set to be root filesystem
[    2.898903] 1 squashfs-split partitions found on MTD device rootfs
[    2.911240] 0x000001090000-0x000002000000 : "rootfs_data"
[    2.923679] libphy: Fixed MDIO Bus: probed
[    2.948953] mtk_soc_eth 1e100000.ethernet eth0 (uninitialized): port 1 link u                                                                                                                p
[    3.611080] mtk_soc_eth 1e100000.ethernet eth0 (uninitialized): port 1 link d                                                                                                                own
[    4.318626] random: crng init done
[    6.002728] mtk_soc_eth 1e100000.ethernet eth0 (uninitialized): port 1 link u                                                                                                                p

[   62.938745] INFO: rcu_sched self-detected stall on CPU
[   62.948975]  0-...: (5999 ticks this GP) idle=86a/140000000000002/0 softirq=29/29 fqs=2253
[   62.965575]   (t=6000 jiffies g=-286 c=-287 q=134)
[   62.975102] NMI backtrace for cpu 0
[   62.982033] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.14.151 #0
[   62.994142] Stack : 00000000 80580000 00000000 8006ffe8 805a0000 80545280 00000000 00000000
[   63.010768]         80512380 8fc09bec 8fc3837c 8057e907 8050d3f8 00000001 8fc09b90 53261676
[   63.027394]         00000000 00000000 805e0000 00002348 00000000 00000082 00000007 00000000
[   63.044020]         00000000 80580000 000efc11 00000000 00000000 00000000 805a0000 00000000
[   63.060644]         80584400 8057c0ac 000000e0 80580000 00000000 80288e00 00000000 805e0000
[   63.077270]         ...
[   63.082125] Call Trace:
[   63.087007] [<800106a0>] show_stack+0x58/0x100
[   63.095851] [<80451d8c>] dump_stack+0x9c/0xe0
[   63.104524] [<80458c84>] nmi_cpu_backtrace+0xe4/0x108
[   63.114566] [<80458d70>] nmi_trigger_cpumask_backtrace+0xc8/0x168
[   63.126690] [<80084a78>] rcu_dump_cpu_stacks+0xc4/0x13c
[   63.137077] [<80083ed0>] rcu_check_callbacks+0x3b4/0x8b8
[   63.147646] [<80087448>] update_process_times+0x34/0x7c
[   63.158053] [<8009805c>] tick_handle_periodic+0x34/0xd0
[   63.168449] [<80308ca0>] gic_compare_interrupt+0x70/0x80
[   63.179016] [<80077808>] handle_percpu_devid_irq+0xbc/0x1a8
[   63.190112] [<80071ac0>] generic_handle_irq+0x40/0x58
[   63.200163] [<80245cfc>] gic_handle_local_int+0x9c/0xe8
[   63.210550] [<80245ebc>] gic_irq_dispatch+0x10/0x20
[   63.220246] [<80071ac0>] generic_handle_irq+0x40/0x58
[   63.230302] [<8046f25c>] do_IRQ+0x1c/0x2c
[   63.238267] [<80244e8c>] plat_irq_dispatch+0xfc/0x138
[   63.248308] [<8000b5e8>] except_vec_vi_end+0xb8/0xc4
[   63.258190] [<80033094>] irq_exit+0xac/0xc8

That is often the last log message from the boot sequence. Have you tried to log in or otherwise see if the device is running?

3 Likes

yes device is running. only sometime it stuck on bootup see the log file which i have recently updated

1 Like

Leaving comments past "good luck" with what looks to be Breed's closed-source and arguably GPL-violating bootloader at that...

Is that an official OpenWrt build, or something else?

Some of those issues appear to have been resolved in current OpenWrt.

See, for pointers, https://www.google.com/search?q=rcu_sched+self-detected+stall+MT7621

2 Likes

yes its an official OpwnWRT 18.06.05 build made by image builder.

You might want to try v19 (presently at RC2) to get the newer MTK drivers.

https://downloads.openwrt.org/releases/19.07.0-rc2/

2 Likes

i will try and let you know. thank you so much

1 Like

You are using a Phikom K2P with hardware and software modifications...
This device has only 128 MB ram and 16 MB flash by default.
And the breed bootloader is also not default.
I think your problem with non maskable interrupts is coming from one of this three modifications.

is there any solution.

Hasn't the newer OpenWRT version solved the problem?

Do you know what interrupts are?
Non maskable interrupts mean, there is fireing a interrupt all the time that can't be disabled, because the system does not know how to disable it.

I would first proceed according to the exclusion procedure and test everything that is easy to undo...
I suggest trying the original bootloader first, because probably the non original one does enable something that fires this interrupts and the Linux kernel isn't aware of it...

1 Like

this issue is also coming in the newer version of openwrt.

i don't know about interrupts i have't got the original bootloader from simple google search. thanks juppin for the help. i will find the bootloader and upload it and let you know

You do not have a backup of your original bootloader?
Probably you have the original 16 M flash chip, which has the original bootloader on it?

no i don't have a backup of original bootloader. i will find the bootloader and upload it and let you know

Which hw revision do you have?
You should find it on the bottom label.

atually its a custom build hardware.

Nice to know that now :grimacing:
Why this thread is called Phicomm K2P stuck on bootup?

1 Like

someone edited it. we are using phicomm k2p board with some custom hardware changes