您尚未登录。

楼主 #1 2019-05-04 08:29:21

晕哥
管理员
注册时间: 2017-09-06
已发帖子: 9,342
积分: 9202

解决 V3s / F1C100s Linux 显示 starting kernel ... 就没有然后的问题 (earlyprintk)

链接1: https://whycan.cn/t_1725.html
链接2: https://whycan.cn/t_728.html


解决 V3s Linux 显示 starting kernel ...  就没有然后的问题



Kernel hacking  --->

[ *] Kernel debugging

[ *] Kernel low-level debugging functions (read help!)                                               
                      Kernel low-level debugging port (Kernel low-level debugging messages via sunXi UART0)  --->   
                         (0x01c28000) Physical base address of debug UART                                                   
                         (0xf1c28000) Virtual base address of debug UART





离线

楼主 #2 2019-05-04 08:32:11

晕哥
管理员
注册时间: 2017-09-06
已发帖子: 9,342
积分: 9202

Re: 解决 V3s / F1C100s Linux 显示 starting kernel ... 就没有然后的问题 (earlyprintk)

QQ20190504083059.png

QQ20190504082758.png





离线

#3 2019-05-13 15:17:34

Jmhh247
会员
注册时间: 2018-12-21
已发帖子: 262
积分: 262

Re: 解决 V3s / F1C100s Linux 显示 starting kernel ... 就没有然后的问题 (earlyprintk)

占位,学习

离线

#4 2019-05-13 17:12:03

还能这么玩
会员
注册时间: 2019-04-14
已发帖子: 119
积分: 119

Re: 解决 V3s / F1C100s Linux 显示 starting kernel ... 就没有然后的问题 (earlyprintk)

2019-05-13_170940.png


2019-05-13_170716.png

CONFIG_DEBUG_UART_PHYS=0x01c25000
CONFIG_DEBUG_UART_VIRT=0xf1c25000

改成:

CONFIG_DEBUG_UART_PHYS=0x01c28000
CONFIG_DEBUG_UART_VIRT=0xf1c28000

握草, 终于搞定f1c100s 这个恼人的 earlyprintk 了,

只是基地址与 V3s 有点不同而已,

其他一模一样

离线

#5 2022-01-27 14:10:55

CHSHIQING
会员
注册时间: 2020-11-27
已发帖子: 47
积分: 2

Re: 解决 V3s / F1C100s Linux 显示 starting kernel ... 就没有然后的问题 (earlyprintk)

请问下大佬,earlyprintk打开怎么定位内核启动卡在starting kernel...这里,偶尔会启动不了,但是按钮重启后又能起来

离线

#6 2022-02-11 13:50:35

dnkrs
会员
注册时间: 2021-03-15
已发帖子: 10
积分: 29.5

Re: 解决 V3s / F1C100s Linux 显示 starting kernel ... 就没有然后的问题 (earlyprintk)

补充一下,我自己遇到的情况,我的板子也出现这个问题,刚买荔枝派nano的时候运行也出现这个问题,我用官网的镜像和其他镜像都一样,当时没有注意,只是把日志发给了客服,他们说正常没毛病,我就没有在意,一直都以为是我手里的镜像问题,由于一直无果,所以就放弃了,研究别的去了,直到前段时间,我又得到一块板子,随便一试竟然能进系统。随后我又从朋友那找来了另一个厂家的板子,一样都能进入系统。真坑啊!就这事我又联想到之前买的荔枝派zero板子能进系统,但i2s始终不好用,但我的i2s是被在其他单片机上都正常使用,看来我要买个别家的板子再试试,看看到底是不是板子问题。

最近编辑记录 dnkrs (2022-02-11 13:51:07)

离线

#7 2022-03-06 07:27:04

simakeng
会员
注册时间: 2020-03-26
已发帖子: 2
积分: 2

Re: 解决 V3s / F1C100s Linux 显示 starting kernel ... 就没有然后的问题 (earlyprintk)

这个坑踩了两天
来这里回复记录一下:
如果你是F1C100s,这里的地址配置应该是

(0x01c25000) Physical base address of debug UART
(0xf1c25000) Virtual base address of debug UART

如果不输出内核解压的信息,看看这个选项有没有开

 [*] Enable decompressor debugging via DEBUG_LL output

如果你的设备不是F1C100s,最好参考手册确定寄存器基地址

F1C100s的UART寄存器与8250是一样的,所以基本都不用改可以直接用,但不排除你的芯片有改动,所以最好一切以手册为准

贴一下我的配置

[ ] Export kernel pagetable layout to userspace via debugfs                                         
[ ] Warn on W+X mappings at boot                                                                    
    Choose kernel unwinder (Frame pointer unwinder)  --->                                           
[ ] Verbose user fault messages                                                                     
[*] Kernel low-level debugging functions (read help!)                                               
      Kernel low-level debugging port (Kernel low-level debugging messages via sunXi UART0)  --->   
[ ] Enable flow control (CTS) for the debug UART                                                    
(0x01c25000) Physical base address of debug UART                                                    
(0xf1c25000) Virtual base address of debug UART                                                     
(2) Register offset shift for the 8250 debug UART                                                   
[ ]   Use 32-bit accesses for 8250 UART                                                             
[ ] 8250 UART is Palmchip BK-310x                                                                   
[*] Enable decompressor debugging via DEBUG_LL output                                               
[*] Early printk                                                                                    
< > CoreSight Tracing Support  ----                  

我这里安装上面说的把地址配置成了0x01c28000,但是没有成功进系统,卡在了Starting kernel ... 结合汇编排查应该是putc函数尝试向0x01c28000写入数据但是这里并不是UART0的寄存器,导致内部硬件出错程序跑飞了,改成0x01c25000现在正常了.....

离线

#8 2023-11-09 09:57:48

JerryShuuei
会员
注册时间: 2023-10-13
已发帖子: 5
积分: 8

Re: 解决 V3s / F1C100s Linux 显示 starting kernel ... 就没有然后的问题 (earlyprintk)

@simakeng

好艰难, 跟着moyun和同志们做的小板子(f1c200s)

之前用leechipi镜像卡在starting kernel
后面自己编译uboot移植是ok的

然后到了移植kernel的时, 一直重启
调试后又像leechipi镜像一样卡在了starting kernel

目前终于starting kernel有下一步了
又卡在了Uncompressing Linux...

orz...
求助...
uncompressing.jpg

最近编辑记录 JerryShuuei (2023-11-09 10:02:39)

离线

#9 2023-11-09 10:30:04

muxi01
会员
注册时间: 2020-10-24
已发帖子: 62
积分: 144

Re: 解决 V3s / F1C100s Linux 显示 starting kernel ... 就没有然后的问题 (earlyprintk)

设备树不被支持,或者设备ID不被支持。

离线

#10 2023-11-09 13:36:59

JerryShuuei
会员
注册时间: 2023-10-13
已发帖子: 5
积分: 8

Re: 解决 V3s / F1C100s Linux 显示 starting kernel ... 就没有然后的问题 (earlyprintk)

muxi01 说:

设备树不被支持,或者设备ID不被支持。

是设备树配置错了吗? 我单独把leechipi的dtb文件替换了boot分区里的自己编译生成的dtb
但还是卡在了uncompressing linux...

是因为f1c200s不能直接用f1c100s的配置吗?

离线

#11 2023-11-15 08:07:52

JerryShuuei
会员
注册时间: 2023-10-13
已发帖子: 5
积分: 8

Re: 解决 V3s / F1C100s Linux 显示 starting kernel ... 就没有然后的问题 (earlyprintk)

muxi01 说:

设备树不被支持,或者设备ID不被支持。

可以运行了. 但是后面重新制作一张sd卡时又出现了如下的情况...

不能写入, fsck修复过也不行. 不知道是不是文件系统制作出现了问题..
而且df显示磁盘空间都满了... 就很奇怪...


U-Boot 2018.01 (Nov 10 2023 - 14:40:04 +0800) Allwinner Technology

CPU:   Allwinner F Series (SUNIV)
Model: Lichee Pi Nano
DRAM:  64 MiB
MMC:   SUNXI SD/MMC: 0
*** Warning - bad CRC, using default environment

In:    serial@1c25000
Out:   serial@1c25000
Err:   serial@1c25000
Net:   No ethernet found.
starting USB...
No controllers found
Hit any key to stop autoboot:  0 
reading zImage
5103592 bytes read in 257 ms (18.9 MiB/s)
reading suniv-f1c100s-licheepi-nano.dtb
6767 bytes read in 25 ms (263.7 KiB/s)
## Flattened Device Tree blob at 80c08000
   Booting using the fdt blob at 0x80c08000
   Loading Device Tree to 816fb000, end 816ffa6e ... OK

Starting kernel ...

ÿ[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 6.6.1-licheepi-nano (shuuei@H8) (arm-linux-gnueabi-gcc (Linaro GCC 7.2-2017.11) 7.2.1 20171011, GNU ld (Linaro_Binutils-2017.11) 2.28.2.20170706) #1 Tue Nov 14 12:13:41 CST 2023
[    0.000000] CPU: ARM926EJ-S [41069265] revision 5 (ARMv5TEJ), cr=0005317f
[    0.000000] CPU: VIVT data cache, VIVT instruction cache
[    0.000000] OF: fdt: Machine model: Lichee Pi Nano
[    0.000000] Memory policy: Data cache writeback
[    0.000000] Zone ranges:
[    0.000000]   Normal   [mem 0x0000000080000000-0x0000000083ffffff]
[    0.000000]   HighMem  empty
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000080000000-0x0000000083ffffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000080000000-0x0000000083ffffff]
[    0.000000] Kernel command line: console=tty0 console=ttyS0,115200 panic=5 rootwait root=/dev/mmcblk0p2 rw
[    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] Built 1 zonelists, mobility grouping on.  Total pages: 16256
[    0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[    0.000000] Memory: 51708K/65536K available (8192K kernel code, 610K rwdata, 1944K rodata, 1024K init, 262K bss, 13828K reserved, 0K cma-reserved, 0K highmem)
[    0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
[    0.000010] sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 89478484971ns
[    0.000128] clocksource: timer: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns
[    0.000885] Console: colour dummy device 80x30
[    0.000945] printk: console [tty0] enabled
[    0.001957] Calibrating delay loop... 203.16 BogoMIPS (lpj=1015808)
[    0.070338] CPU: Testing write buffer coherency: ok
[    0.070703] pid_max: default: 32768 minimum: 301
[    0.071329] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.071509] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.078361] Setting up static identity map for 0x80100000 - 0x80100058
[    0.080948] devtmpfs: initialized
[    0.087473] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.087702] futex hash table entries: 256 (order: -1, 3072 bytes, linear)
[    0.088070] pinctrl core: initialized pinctrl subsystem
[    0.093524] NET: Registered PF_NETLINK/PF_ROUTE protocol family
[    0.095236] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.097866] thermal_sys: Registered thermal governor 'step_wise'
[    0.097976] cpuidle: using governor menu
[    0.116400] SCSI subsystem initialized
[    0.116915] usbcore: registered new interface driver usbfs
[    0.117171] usbcore: registered new interface driver hub
[    0.117427] usbcore: registered new device driver usb
[    0.118155] pps_core: LinuxPPS API ver. 1 registered
[    0.118278] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    0.118472] PTP clock support registered
[    0.119182] Advanced Linux Sound Architecture Driver Initialized.
[    0.122858] clocksource: Switched to clocksource timer
[    0.172690] NET: Registered PF_INET protocol family
[    0.173630] IP idents hash table entries: 2048 (order: 2, 16384 bytes, linear)
[    0.175738] tcp_listen_portaddr_hash hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.175971] Table-perturb hash table entries: 65536 (order: 6, 262144 bytes, linear)
[    0.176105] TCP established hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.176243] TCP bind hash table entries: 1024 (order: 1, 8192 bytes, linear)
[    0.176364] TCP: Hash tables configured (established 1024 bind 1024)
[    0.176674] UDP hash table entries: 256 (order: 0, 4096 bytes, linear)
[    0.176830] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes, linear)
[    0.177541] NET: Registered PF_UNIX/PF_LOCAL protocol family
[    0.179659] RPC: Registered named UNIX socket transport module.
[    0.179828] RPC: Registered udp transport module.
[    0.179896] RPC: Registered tcp transport module.
[    0.179952] RPC: Registered tcp-with-tls transport module.
[    0.180008] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    0.187319] NetWinder Floating Point Emulator V0.97 (double precision)
[    0.189386] Initialise system trusted keyrings
[    0.191243] workingset: timestamp_bits=30 max_order=14 bucket_order=0
[    0.194152] NFS: Registering the id_resolver key type
[    0.194564] Key type id_resolver registered
[    0.194663] Key type id_legacy registered
[    0.779017] Key type asymmetric registered
[    0.779160] Asymmetric key parser 'x509' registered
[    0.779532] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 251)
[    0.779677] io scheduler mq-deadline registered
[    0.779750] io scheduler kyber registered
[    1.080610] Serial: 8250/16550 driver, 8 ports, IRQ sharing disabled
[    1.102231] SCSI Media Changer driver v0.25 
[    1.104916] usbcore: registered new interface driver usb-storage
[    1.105995] UDC core: g_cdc: couldn't find an available UDC
[    1.106472] i2c_dev: i2c /dev entries driver
[    1.110250] usbcore: registered new interface driver usbhid
[    1.110399] usbhid: USB HID core driver
[    1.128556] NET: Registered PF_PACKET protocol family
[    1.129058] Key type dns_resolver registered
[    1.147625] Loading compiled-in X.509 certificates
[    1.178502] gpio gpiochip0: Static allocation of GPIO base is deprecated, use dynamic allocation.
[    1.191950] suniv-f1c100s-pinctrl 1c20800.pinctrl: initialized sunXi PIO driver
[    1.193846] suniv-f1c100s-pinctrl 1c20800.pinctrl: supply vcc-pe not found, using dummy regulator
[    1.197290] printk: console [ttyS0] disabled
[    1.218992] 1c25000.serial: ttyS0 at MMIO 0x1c25000 (irq = 116, base_baud = 6250000) is a 16550A
[    1.219293] printk: console [ttyS0] enabled
[    1.765950] suniv-f1c100s-pinctrl 1c20800.pinctrl: supply vcc-pc not found, using dummy regulator
[    1.776093] sun6i-spi 1c05000.spi: Failed to request TX DMA channel
[    1.782522] sun6i-spi 1c05000.spi: Failed to request RX DMA channel
[    1.791978] spi-nor spi0.0: unrecognized JEDEC id bytes: 00 00 00 00 00 00
[    1.805859] usb_phy_generic usb_phy_generic.0.auto: dummy supplies not allowed for exclusive requests
[    1.816803] musb-hdrc musb-hdrc.1.auto: MUSB HDRC host driver
[    1.822787] musb-hdrc musb-hdrc.1.auto: new USB bus registered, assigned bus number 1
[    1.833133] suniv-f1c100s-pinctrl 1c20800.pinctrl: supply vcc-pf not found, using dummy regulator
[    1.848884] hub 1-0:1.0: USB hub found
[    1.853009] hub 1-0:1.0: 1 port detected
[    1.862986] g_cdc gadget.0: HOST MAC 2a:94:65:ec:bc:00
[    1.868293] g_cdc gadget.0: MAC 4e:28:99:a6:0f:da
[    1.873399] g_cdc gadget.0: CDC Composite Gadget, version: King Kamehameha Day 2008
[    1.881175] g_cdc gadget.0: g_cdc ready
[    1.886983] sunxi-mmc 1c0f000.mmc: initialized, max. request size: 16384 KB
[    1.895319] cfg80211: Loading compiled-in X.509 certificates for regulatory database
[    1.916665] Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7'
[    1.922555] clk: Disabling unused clocks
[    1.926871] ALSA device list:
[    1.929930]   #0: Loopback 1
[    1.934108] platform regulatory.0: Direct firmware load for regulatory.db failed with error -2
[    1.943015] cfg80211: failed to load regulatory.db
[    1.948955] Waiting for root device /dev/mmcblk0p2...
[    1.978682] mmc0: new high speed SDHC card at address 1234
[    1.986969] mmcblk0: mmc0:1234 SA32G 28.9 GiB
[    1.997897]  mmcblk0: p1 p2
[    2.038375] EXT4-fs (mmcblk0p2): warning: mounting fs with errors, running e2fsck is recommended
[    2.050929] EXT4-fs (mmcblk0p2): mounted filesystem 3e7efd13-1cec-4308-8ab8-1ad307ad6d13 r/w with ordered data mode. Quota mode: disabled.
[    2.063813] VFS: Mounted root (ext4 filesystem) on device 179:2.
[    2.071887] devtmpfs: mounted
[    2.079475] Freeing unused kernel image (initmem) memory: 1024K
[    2.085777] Run /sbin/init as init process
[    2.198287] sunxi-mmc 1c0f000.mmc: data error, sending stop command
[    2.205439] sunxi-mmc 1c0f000.mmc: data error, sending stop command
[    2.212448] sunxi-mmc 1c0f000.mmc: data error, sending stop command
[    2.219544] sunxi-mmc 1c0f000.mmc: data error, sending stop command
[    2.226644] sunxi-mmc 1c0f000.mmc: data error, sending stop command
[    2.285823] sunxi-mmc 1c0f000.mmc: data error, sending stop command
[    2.292397] I/O error, dev mmcblk0, sector 67776 op 0x0:(READ) flags 0x3000 phys_seg 1 prio class 2
[    2.301839] EXT4-fs error (device mmcblk0p2): ext4_read_inode_bitmap:203: comm init: Cannot read inode bitmap - block_group = 0, inode_bitmap = 24
[    2.328921] EXT4-fs (mmcblk0p2): re-mounted 3e7efd13-1cec-4308-8ab8-1ad307ad6d13 r/w. Quota mode: disabled.
Starting syslogd: OK
Starting klogd: OK
Running sysctl: OK
seedrng: can't create directory '/var/lib/seedrng': No space left on device
Starting network: OK

Welcome Aboard!
1F login: [    4.003972] sunxi-mmc 1c0f000.mmc: data error, sending stop command
[    4.011036] sunxi-mmc 1c0f000.mmc: data error, sending stop command
[    4.018751] sunxi-mmc 1c0f000.mmc: data error, sending stop command
[    4.026051] sunxi-mmc 1c0f000.mmc: data error, sending stop command
[    4.033112] sunxi-mmc 1c0f000.mmc: data error, sending stop command
[    4.092060] sunxi-mmc 1c0f000.mmc: data error, sending stop command
[    4.098742] I/O error, dev mmcblk0, sector 67648 op 0x0:(READ) flags 0x83700 phys_seg 1 prio class 2
[    4.109124] sunxi-mmc 1c0f000.mmc: data error, sending stop command
[    4.116416] sunxi-mmc 1c0f000.mmc: data error, sending stop command
[    4.123790] sunxi-mmc 1c0f000.mmc: data error, sending stop command
[    4.130956] sunxi-mmc 1c0f000.mmc: data error, sending stop command
[    4.138238] sunxi-mmc 1c0f000.mmc: data error, sending stop command
[    4.145464] sunxi-mmc 1c0f000.mmc: data error, sending stop command
[    4.152077] I/O error, dev mmcblk0, sector 67648 op 0x0:(READ) flags 0x3000 phys_seg 1 prio class 2
[    4.164063] EXT4-fs error (device mmcblk0p2): ext4_wait_block_bitmap:576: comm ext4lazyinit: Cannot read block bitmap - block_group = 0, block_bitmap = 8
[  305.122899] EXT4-fs (mmcblk0p2): error count since last fsck: 12
[  305.129078] EXT4-fs (mmcblk0p2): initial error at time 2: ext4_read_inode_bitmap:203
[  305.136913] EXT4-fs (mmcblk0p2): last error at time 4: ext4_wait_block_bitmap:576
[  324.093005] random: crng init done

Welcome Aboard!
1F login: root
Password: 
# df
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/root                91864     91864         0 100% /
devtmpfs                 25852         0     25852   0% /dev
tmpfs                    26364         0     26364   0% /dev/shm
tmpfs                    26364        20     26344   0% /tmp
tmpfs                    26364        16     26348   0% /run
# poweroff 
# Stopping network: OK
seedrng: can't create directory '/var/lib/seedrng': No space left on device
Stopping klogd: OK
Stopping syslogd: OK
umount: devtmpfs busy - remounted read-only
[  870.855436] EXT4-fs (mmcblk0p2): re-mounted 3e7efd13-1cec-4308-8ab8-1ad307ad6d13 ro. Quota mode: disabled.
The system is going down NOW!
Sent SIGTERM to all processes
Sent SIGKILL to all processes
Requesting system poweroff
[  872.879692] reboot: System halted

最近编辑记录 JerryShuuei (2023-11-15 09:06:10)

离线

#12 2023-12-22 11:45:54

fxx
会员
注册时间: 2023-11-13
已发帖子: 8
积分: 23

Re: 解决 V3s / F1C100s Linux 显示 starting kernel ... 就没有然后的问题 (earlyprintk)

也有可能是uboot串口和内核串口不是同一个,所以start kernel转移控制权之后console去了新串口,修改一下dtb就可以

离线

#13 2024-01-23 16:26:32

wl989898
会员
注册时间: 2024-01-15
已发帖子: 35
积分: 3

Re: 解决 V3s / F1C100s Linux 显示 starting kernel ... 就没有然后的问题 (earlyprintk)

卡在 starting kernel 应是没有进入内核,和机器ID有关系

离线

#14 2024-10-05 19:06:25

人才就是我
会员
注册时间: 2024-10-05
已发帖子: 18
积分: 13

Re: 解决 V3s / F1C100s Linux 显示 starting kernel ... 就没有然后的问题 (earlyprintk)

uboot正常,开机也启动成功了,但画面卡在starting kernel,是关闭了串口输出吗

离线

页脚

工信部备案:粤ICP备20025096号 Powered by FluxBB

感谢为中文互联网持续输出优质内容的各位老铁们。 QQ: 516333132, 微信(wechat): whycan_cn (哇酷网/挖坑网/填坑网) service@whycan.cn