为 VisionFive V2 更新 uboot

本文最后更新于 2024年10月16日 晚上

最近根据这个帖子的说明更新了我的 rv 板子的固件,但是更新之后系统起不来了,具体表现为开机一秒钟左右就卡死了,具体日志如下。

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
Starting kernel ...

[ 0.000000] Linux version 6.6.20-cwt-5.12.0-3 (cwt@VF2-B) (gcc (GCC) 14.1.1 20240522, GNU ld (GNU Binutils) 2.42.0) #1 SMP PREEMPT_DYNAMIC Mon May 27 18:59:29 +07 2024
[ 0.000000] Machine model: StarFive VisionFive 2 v1.2A
[ 0.000000] SBI specification v1.0 detected
[ 0.000000] SBI implementation ID=0x1 Version=0x10002
[ 0.000000] SBI TIME extension detected
[ 0.000000] SBI IPI extension detected
[ 0.000000] SBI RFENCE extension detected
[ 0.000000] SBI SRST extension detected
[ 0.000000] earlycon: uart0 at MMIO32 0x0000000010000000 (options '115200n8')
[ 0.000000] printk: bootconsole [uart0] enabled
[ 0.000000] efi: UEFI not found.
[ 0.000000] OF: reserved mem: 0x0000000040000000..0x000000004003ffff (256 KiB) map non-reusable mmode_resv0@40000000
[ 0.000000] OF: reserved mem: 0x0000000040040000..0x000000004007ffff (256 KiB) map non-reusable mmode_resv1@40040000
[ 0.000000] cma: Reserved 16 MiB at 0x00000000ff000000 on node -1
[ 0.000000] Zone ranges:
[ 0.000000] DMA32 [mem 0x0000000040000000-0x00000000ffffffff]
[ 0.000000] Normal [mem 0x0000000100000000-0x000000023fffffff]
[ 0.000000] Movable zone start for each node
[ 0.000000] Early memory node ranges
[ 0.000000] node 0: [mem 0x0000000040000000-0x000000023fffffff]
[ 0.000000] Initmem setup node 0 [mem 0x0000000040000000-0x000000023fffffff]
[ 0.000000] SBI HSM extension detected
[ 0.000000] CPU with hartid=0 is not available
[ 0.000000] Falling back to deprecated "riscv,isa"
[ 0.000000] riscv: base ISA extensions acdfim
[ 0.000000] riscv: ELF capabilities acdfim
[ 0.000000] percpu: Embedded 20 pages/cpu s44920 r8192 d28808 u81920
[ 0.000000] Kernel command line: root="LABEL=VF2" rw console=tty1 console=ttyS0,115200 earlycon rootwait stmmaceth=chain_mode:1 selinux=0 rootflags=defaults,discard=async,compress=lzo,user_subvol_rm_allowed,subvol=@
[ 0.000000] Unknown kernel command line parameters "stmmaceth=chain_mode:1", will be passed to user space.
[ 0.000000] Dentry cache hash table entries: 1048576 (order: 11, 8388608 bytes, linear)
[ 0.000000] Inode-cache hash table entries: 524288 (order: 10, 4194304 bytes, linear)
[ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 2064384
[ 0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[ 0.000000] software IO TLB: area num 4.
[ 0.000000] software IO TLB: mapped [mem 0x00000000f9f33000-0x00000000fdf33000] (64MB)
[ 0.000000] Memory: 8124988K/8388608K available (11861K kernel code, 5119K rwdata, 6144K rodata, 2219K init, 862K bss, 247236K reserved, 16384K cma-reserved)
[ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
[ 0.000000] Dynamic Preempt: full
[ 0.000000] rcu: Preemptible hierarchical RCU implementation.
[ 0.000000] rcu: RCU restricting CPUs from NR_CPUS=8 to nr_cpu_ids=4.
[ 0.000000] rcu: RCU priority boosting: priority 1 delay 500 ms.
[ 0.000000] rcu: RCU debug extended QS entry/exit.
[ 0.000000] Trampoline variant of Tasks RCU enabled.
[ 0.000000] Tracing variant of Tasks RCU enabled.
[ 0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 100 jiffies.
[ 0.000000] rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=4
[ 0.000000] NR_IRQS: 64, nr_irqs: 64, preallocated irqs: 0
[ 0.000000] riscv-intc: 64 local interrupts mapped
[ 0.000000] plic: interrupt-controller@c000000: mapped 136 interrupts with 4 handlers for 9 contexts.
[ 0.000000] riscv: providing IPIs using SBI IPI extension
[ 0.000000] rcu: srcu_init: Setting srcu_struct sizes based on contention.
[ 0.000000] clocksource: riscv_clocksource: mask: 0xffffffffffffffff max_cycles: 0x1d854df40, max_idle_ns: 881590404240 ns
[ 0.000001] sched_clock: 64 bits at 4MHz, resolution 250ns, wraps every 2199023255500ns
[ 0.009281] Console: colour dummy device 80x25
[ 0.014187] printk: console [tty1] enabled
[ 0.019291] Calibrating delay loop (skipped), value calculated using timer frequency.. 8.00 BogoMIPS (lpj=4000)
[ 0.030400] pid_max: default: 32768 minimum: 301
[ 0.038575] LSM: initializing lsm=capability,landlock,lockdown,yama,safesetid,apparmor,integrity
[ 0.049068] landlock: Up and running.
[ 0.053107] Yama: becoming mindful.
[ 0.057031] AppArmor: AppArmor initialized
[ 0.062768] Mount-cache hash table entries: 16384 (order: 5, 131072 bytes, linear)
[ 0.071266] Mountpoint-cache hash table entries: 16384 (order: 5, 131072 bytes, linear)
[ 0.084861] CPU node for /cpus/cpu@0 exist but the possible cpu range is :0-3
[ 0.094218] RCU Tasks: Setting shift to 2 and lim to 1 rcu_task_cb_adjust=1.
[ 0.102107] RCU Tasks Trace: Setting shift to 2 and lim to 1 rcu_task_cb_adjust=1.
[ 0.110584] riscv: ELF compat mode unsupported
[ 0.110595] ASID allocator disabled (0 bits)
[ 0.120342] rcu: Hierarchical SRCU implementation.
[ 0.125624] rcu: Max phase no-delay instances is 400.
[ 0.132057] EFI services will not be available.
[ 0.137574] smp: Bringing up secondary CPUs ...
[ 0.150620] cpu1: Ratio of byte access time to unaligned word access is 0.01, unaligned accesses are slow
[ 0.168732] cpu2: Ratio of byte access time to unaligned word access is 0.01, unaligned accesses are slow
[ 0.186840] cpu3: Ratio of byte access time to unaligned word access is 0.01, unaligned accesses are slow
[ 0.197491] smp: Brought up 1 node, 4 CPUs
[ 0.205345] devtmpfs: initialized
[ 0.214943] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 1911260446275000 ns
[ 0.225685] futex hash table entries: 1024 (order: 4, 65536 bytes, linear)
[ 0.235250] pinctrl core: initialized pinctrl subsystem
[ 0.246689] NET: Registered PF_NETLINK/PF_ROUTE protocol family
[ 0.254181] DMA: preallocated 1024 KiB GFP_KERNEL pool for atomic allocations
[ 0.262176] DMA: preallocated 1024 KiB GFP_KERNEL|GFP_DMA32 pool for atomic allocations
[ 0.271071] audit: initializing netlink subsys (disabled)
[ 0.277271] audit: type=2000 audit(0.106:1): state=initialized audit_enabled=0 res=1
[ 0.277791] thermal_sys: Registered thermal governor 'step_wise'
[ 0.285852] cpuidle: using governor menu
[ 0.303823] cpu0: Ratio of byte access time to unaligned word access is 0.01, unaligned accesses are slow
[ 0.318586] platform soc: Fixed dependency cycle(s) with /soc/interrupt-controller@c000000
[ 0.335550] HugeTLB: registered 1.00 GiB page size, pre-allocated 0 pages
[ 0.343028] HugeTLB: 0 KiB vmemmap can be freed for a 1.00 GiB page
[ 0.349925] HugeTLB: registered 2.00 MiB page size, pre-allocated 0 pages
[ 0.357393] HugeTLB: 0 KiB vmemmap can be freed for a 2.00 MiB page
[ 0.366613] cryptd: max_cpu_qlen set to 1000
[ 0.389504] raid6: int64x8 gen() 889 MB/s
[ 0.411373] raid6: int64x4 gen() 1022 MB/s
[ 0.433239] raid6: int64x2 gen() 921 MB/s
[ 0.455114] raid6: int64x1 gen() 814 MB/s
[ 0.459819] raid6: using algorithm int64x4 gen() 1022 MB/s
[ 0.482977] raid6: .... xor() 562 MB/s, rmw enabled
[ 0.488348] raid6: using intx1 recovery algorithm
[ 0.494471] fbcon: Taking over console
[ 0.499129] SCSI subsystem initialized
[ 0.503479] usbcore: registered new interface driver usbfs
[ 0.509552] usbcore: registered new interface driver hub
[ 0.515436] usbcore: registered new device driver usb
[ 0.521288] mc: Linux media interface: v0.10
[ 0.526039] videodev: Linux video capture interface: v2.00
[ 0.532663] Advanced Linux Sound Architecture Driver Initialized.
[ 0.540479] NetLabel: Initializing
[ 0.544232] NetLabel: domain hash size = 128
[ 0.549027] NetLabel: protocols = UNLABELED CIPSOv4 CALIPSO
[ 0.555326] NetLabel: unlabeled traffic allowed by default
[ 0.561797] vgaarb: loaded
[ 0.565388] clocksource: Switched to clocksource riscv_clocksource
[ 0.575618] VFS: Disk quotas dquot_6.6.0
[ 0.580149] VFS: Dquot-cache hash table entries: 512 (order 0, 4096 bytes)
[ 0.588049] FS-Cache: Loaded
[ 0.592141] AppArmor: AppArmor Filesystem Enabled
[ 0.610336] NET: Registered PF_INET protocol family
[ 0.616994] IP idents hash table entries: 131072 (order: 8, 1048576 bytes, linear)
[ 0.635072] tcp_listen_portaddr_hash hash table entries: 4096 (order: 5, 131072 bytes, linear)
[ 0.644807] Table-perturb hash table entries: 65536 (order: 6, 262144 bytes, linear)
[ 0.653366] TCP established hash table entries: 65536 (order: 7, 524288 bytes, linear)
[ 0.662950] TCP bind hash table entries: 65536 (order: 10, 4194304 bytes, linear)
[ 0.678552] TCP: Hash tables configured (established 65536 bind 65536)
[ 0.687310] MPTCP token hash table entries: 8192 (order: 6, 393216 bytes, linear)
[ 0.696113] UDP hash table entries: 4096 (order: 6, 393216 bytes, linear)
[ 0.704031] UDP-Lite hash table entries: 4096 (order: 6, 393216 bytes, linear)
[ 0.713157] NET: Registered PF_UNIX/PF_LOCAL protocol family
[ 0.719481] NET: Registered PF_XDP protocol family
[ 0.724777] PCI: CLS 0 bytes, default 64
[ 0.729749] Unpacking initramfs...
[ 0.735108] Initialise system trusted keyrings
[ 0.740129] Key type blacklist registered
[ 0.744948] workingset: timestamp_bits=46 max_order=21 bucket_order=0
[ 0.752168] zbud: loaded
[ 0.766857] jffs2: version 2.2. (NAND) (SUMMARY) © 2001-2006 Red Hat, Inc.
[ 0.775499] fuse: init (API version 7.39)
[ 0.829188] NET: Registered PF_ALG protocol family
[ 0.834546] xor: measuring software checksum speed
[ 0.843703] 8regs : 2601 MB/sec
[ 0.852351] 8regs_prefetch : 2601 MB/sec
[ 0.860958] 32regs : 2606 MB/sec
[ 0.869570] 32regs_prefetch : 2593 MB/sec
[ 0.874381] xor: using function: 32regs (2606 MB/sec)
[ 0.879983] Key type asymmetric registered
[ 0.884554] Asymmetric key parser 'x509' registered
[ 0.890053] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 247)
[ 0.898639] io scheduler mq-deadline registered
[ 0.903689] io scheduler kyber registered
[ 0.908750] io scheduler bfq registered
[ 1.014677] Serial: 8250/16550 driver, 6 ports, IRQ sharing disabled
[ 1.027329] random: crng init done
[ 1.043539] loop: module loaded
[ 1.049739] cadence-qspi 13010000.spi: couldn't determine trigger-address
[ 1.057307] cadence-qspi 13010000.spi: Cannot get mandatory OF data.
[ 1.066114] i2c_dev: i2c /dev entries driver
[ 1.072190] cpu cpu0: OPP table can't be empty
[ 1.077713] sdhci: Secure Digital Host Controller Interface driver
[ 1.084594] sdhci: Copyright(c) Pierre Ossman
[ 1.089529] Synopsys Designware Multimedia Card Interface Driver
[ 1.096546] sdhci-pltfm: SDHCI platform and OF driver helper
[ 1.103585] ledtrig-cpu: registered to indicate activity on CPUs
[ 1.110704] hid: raw HID events driver (C) Jiri Kosina
[ 1.116767] usbcore: registered new interface driver usbhid
[ 1.122941] usbhid: USB HID core driver
[ 1.127452] SPI driver sensorhub has no spi_device_id for samsung,sensorhub-rinato
[ 1.135817] SPI driver sensorhub has no spi_device_id for samsung,sensorhub-thermostat
[ 1.145026] riscv-pmu-sbi: SBI PMU extension is available
[ 1.151083] riscv-pmu-sbi: 16 firmware and 4 hardware counters
[ 1.157619] riscv-pmu-sbi: Perf sampling/filtering is not supported as sscof extension is not available
[ 1.177067] Initializing XFRM netlink socket
[ 1.182065] NET: Registered PF_INET6 protocol family
[ 1.467055] Freeing initrd memory: 7860K
[ 1.517360] Segment Routing with IPv6
[ 1.521496] RPL Segment Routing with IPv6
[ 1.526014] In-situ OAM (IOAM) with IPv6
[ 1.530668] sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
[ 1.538687] NET: Registered PF_PACKET protocol family
[ 1.544290] NET: Registered PF_KEY protocol family
[ 1.549869] Key type dns_resolver registered
[ 1.581005] registered taskstats version 1
[ 1.585795] Loading compiled-in X.509 certificates
[ 1.613636] Loaded X.509 cert 'Build time autogenerated kernel key: 4c3549a9ff5df31a134a9c5f9ba227c32fc91e91'
[ 1.641814] zswap: loaded using pool zstd/zsmalloc
[ 1.663092] Key type .fscrypt registered
[ 1.667464] Key type fscrypt-provisioning registered
[ 1.676002] Btrfs loaded, zoned=yes, fsverity=no
[ 1.681246] AppArmor: AppArmor sha1 policy hashing enabled

解决办法

排查过程不细说了,这里只记录下解决办法。
在uboot 执行 env default -a -f 然后重启


为 VisionFive V2 更新 uboot
https://blog.askk.cc/2024/10/07/update-spl-for-visionfive-v2/
作者
sukanka
发布于
2024年10月7日
许可协议