我使用Spike通过riscv工具引导linux,但是linux的引导序列似乎在禁用Bootconsoleearly0时停止了。
我尝试添加内核命令行根=/dev/vda ro console=ttyS0,但不起作用。同样的控制台设置也适用于QEMU。我还检查了CONFIG_HVC_RISCV_SBI=y行的.config文件,它就在那里。还是无法释怀。
已尝试使用Linux内核版本4.19到5.2。不走运。我是不是做错了什么?
我遵循的步骤如下:
编译linux与Riscv工具链编译riscv-pk与../configure --host=riscv64-未知-elf -- with -payload=路径到vmlinux使用"Spike bbl“启动spike镜像。
如果需要更多的信息,请让我知道。
抱歉,菜鸟。
附加终端输出
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发布于 2019-07-21 16:15:12
这可能是因为在您的 config中启用了linux 。禁用虚拟终端可能会解决您的问题。
在Linux 中,make menuconfig转到:-
位置:
和禁用虚拟终端。
Symbol: VT [=y] n
Type : bool
Prompt: Virtual terminal 发布于 2019-09-03 19:21:48
正如前面提到的,原因是启用了VT,所以内核有一个虚拟的VT帧缓冲区,但您不必禁用它。console=ttyS0也不会工作,因为SPIKE不会模仿它。请注意,这在释放的HiFive上也不起作用,因为串行终端是ttySIF0和ttySIF1。你想要的是console=hvc0,并且SPIKE将能够从那里继续,例如在你的内核.config中:
CONFIG_CMDLINE_BOOL=y
CONFIG_CMDLINE="earlyprintk console=hvc0"
CONFIG_CMDLINE_FORCE=yhttps://stackoverflow.com/questions/57128866
复制相似问题