Danny Chin
Danny Chin

Reputation: 11

Error running qemu-system-riscv using root.bin and vmlinux

I am following riscv.org guides for toolchain building. When emulate using qemu running local built rootfilesystem (with busybox) and Linux Kernel, encounter the error below:

Running Qemu using local-built root.bin and kernel image

danny@danny:~/test/riscv/work$ qemu-system-riscv -hda root-local.bin -kernel vmlinux-local -nographic

unassigned address was called?
with addr: 102000735F80006E
not implemented for riscv

Running Qemu using riscv.org stocked root.bin and kernel image

danny@danny:~/test/riscv/work$ qemu-system-riscv -hda root.bin -kernel vmlinux -nographic

[    0.150000] io scheduler cfq registered (default)
[    0.160000] Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled
[    0.160000] serial8250: ttyS0 at I/O 0x3f8 (irq = 4, base_baud = 115200) is a 16550A
[    0.160000] TCP: cubic registered
[    0.160000] htifbd: detected disk with ID 1
[    0.160000] htifbd: adding htifbd0
[    0.160000] VFS: Mounted root (ext2 filesystem) readonly on device 254:0.
[    0.160000] devtmpfs: mounted
[    0.160000] Freeing unused kernel memory: 64K (ffffffff80002000 - ffffffff80012000)
[    0.200000] EXT2-fs (htifbd0): warning: mounting unchecked fs, running e2fsck is recommended
#uname -a
Linux ucbvax 3.14.15-g4073e84-dirty #4 Sun Jan 11 07:17:06 PST 2015 riscv GNU/Linux

If qemu testing using the downloaded root.bin and vmlinux from riscv.org, seem ok but cant see the busybox starting message and the terminal cant Halt :

Have tested qemu using various combination and result as below:

**root.bin       vmlinux      RESULT**
local-built    local-built  Unassigned address was called ....
Downloaded     Downloaded   Seem OK but without busybox starting bar
local-built    Downloaded   Kernelpanic-not syncing:No working init found     
Downloaded     local-built  Unassigned address was called .... 

We are starting a project to build and fabricate a RISCV silicon chip for Makers around the world and testing the toolchain now in order to port Ubuntu Core & Android to RISCV. Any idea what might probably went wrong ?

Thanks.

Upvotes: 1

Views: 319

Answers (1)

user2548418
user2548418

Reputation: 1571

QEMU hasn't been fully updated to support the new RISC-V privileged spec (github issue). The update is currently underway.

For an ISA simulator, spike is a good alternative. It may not have all of the platform features of QEMU, but it could serve as a starting point while the QEMU update completes.

Upvotes: 1

Related Questions