Documentation/Platforms/OpenRISC

From QEMU
Revision as of 12:23, 23 February 2017 by Shorne (talk | contribs)

Description

OpenRISC is an open source processor architecture. While instruction sets like x86 are proprietary and owned by a single company, OpenRISC is free. Its main use is as a processor on an embedded system.

Full system emulation

To boot linux you can run the following.

 qemu-system-or1k -cpu or1200 -M or1k-sim -kernel $LINUX/vmlinux -serial stdio -nographic -monitor none

User mode emulation

Using QEMU user mode emulation we can run and debug OpenRISC binaries on your host linux.

 $ cat main.c
 #include <stdio.h>
 int main() {
    printf ("hello\n");
    return 0;
 }
 $ or1k-linux-musl-gcc main.c
 # Here $LDPATH/lib/ld-musl-or1k.so.1 is linked to or1k-linux-musl/lib/libc.so
 $ qemu-or1k -L $LDPATH ./a.out 
 hello

Links

Contacts

Maintainer: Jia Liu