Overview
This page describes the current state of the SH4 target in QEMU. The home page of QEMU can be found
here. For CVS access, please use the repository hosted by
GNU Savannah.
Support for SH4 is not included in the QEMU-0.9.0 release. Please compile from source using latest CVS.
User Space Emulator
SH4 support can be enabled by passing --target-list=sh4-linux-user to the ./configure script. The will enable SH4 user space emulation in Little Endian mode. It is also possible to enable experimental Big Endian user space emulation using --target-list=sh4eb-linux-user.
The SH4 user space emulators can be used together with Scratchbox version 2 aka
sbox2
System Emulation
Experimental SH4 system emulation in Little Endian mode can be enabled using --target-list=sh4-softmmu. Emulation is not complete at this point, but it is possible to launch a kernel and get some serial port output. Most instructions and interrupts are emulated today, together with very basic serial port and timer support. The MMU needs more work so it is not possible to launch a user space process yet.
The following command line can be used to start a kernel image:
qemu-system-sh4 -M r2d -kernel ~/zImage -nographic -monitor null -serial null -serial stdio
Wiki