【发布时间】:2019-07-20 21:54:51
【问题描述】:
我使用 Spike 使用 riscv 工具启动 linux,但 linux 启动顺序似乎在 Bootconsole[early0] disabled 处停止。
我尝试添加内核命令行 root=/dev/vda ro console=ttyS0 但没有奏效。相同的控制台设置适用于 QEMU。还检查了 .config 文件中的 CONFIG_HVC_RISCV_SBI=y 行。它就在那里。还是过不了。
尝试使用 Linux 内核版本 4.19 到 5.2。没运气。我在这里做错了吗?
我遵循的步骤:
使用 Riscv 工具链编译 linux 使用 ../configure --host=riscv64-unknown-elf --with-payload= [vmlinux 的路径] 编译 riscv-pk 使用“Spike bbl”来启动spike image。
如果需要更多信息,请告诉我。
对不起,这里是菜鸟。
附加终端输出
bbl loader
OF: fdt: Ignoring memory range 0x80000000 - 0x80200000
Linux version 4.19.59 (root@AsusFX504) (gcc version 8.2.0 (GCC)) #2 SMP Sat Jul 20 05:11:32 IST 2019
bootconsole [early0] enabled
initrd not found or empty - disabling initrd
Zone ranges:
DMA32 [mem 0x0000000080200000-0x00000000ffffffff]
Normal empty
Movable zone start for each node
Early memory node ranges
node 0: [mem 0x0000000080200000-0x00000000ffffffff]
Initmem setup node 0 [mem 0x0000000080200000-0x00000000ffffffff]
software IO TLB: mapped [mem 0xfa3fe000-0xfe3fe000] (64MB)
elf_hwcap is 0x112d
percpu: Embedded 17 pages/cpu s29912 r8192 d31528 u69632
Built 1 zonelists, mobility grouping on. Total pages: 516615
Kernel command line:
Dentry cache hash table entries: 262144 (order: 9, 2097152 bytes)
Inode-cache hash table entries: 131072 (order: 8, 1048576 bytes)
Sorting __ex_table...
Memory: 1988760K/2095104K available (5468K kernel code, 329K rwdata, 1751K rodata, 193K init, 806K bss, 106344K reserved, 0K cma-reserved)
SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
rcu: Hierarchical RCU implementation.
rcu: RCU restricting CPUs from NR_CPUS=8 to nr_cpu_ids=1.
rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=1
NR_IRQS: 0, nr_irqs: 0, preallocated irqs: 0
clocksource: riscv_clocksource: mask: 0xffffffffffffffff max_cycles: 0x24e6a1710, max_idle_ns: 440795202120 ns
Console: colour dummy device 80x25
console [tty0] enabled
bootconsole [early0] disabled
【问题讨论】:
-
要查看其中的内容,您可以在内核命令行中添加
keep_bootcon。
标签: linux linux-kernel riscv