Documentation/Platforms/OpenRISC

From QEMU
Revision as of 11:52, 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.

Suggested command-line

To boot linux you can run

 qemu-system-or1k -m 1024 -nographic -kernel <kernel file> -net nic,model=opencores_eth -net tap,name=or1k
 qemu-system-or1k -cpu or1200 -M or1k-sim -kernel $LINUX/vmlinux -serial stdio -nographic -monitor none

Command line for user process

Using qemu linux-user 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

Video introducing OpenRISC
The OpenRISC project site
OpenRISC 1000 specification

Contacts

Maintainer: Jia Liu