GXemul
From Wikipedia, the free encyclopedia
GXemul | |
---|---|
Ultrix running in GXemul |
|
Developed by | Anders Gavare |
Latest release | 0.4.6.5 / June 11, 2008 |
Genre | Emulator |
License | BSD-style license |
Website | gavare.se/gxemul |
GXemul (formerly known as mips64emul) is a computer architecture emulator being developed by Anders Gavare. It is available as free software under a revised BSD-style license. In 2005, Gavare changed the name of the software project from mips64emul to GXemul. This was to avoid giving the impression that the emulator was confined to the MIPS instruction set, which was the only architecture being emulated initially.
Although development of the emulator is still a work-in-progress, since 2004 it has been stable enough to let various unmodified guest operating systems run as if they were running on real hardware. Currently emulated processor architectures include ARM, MIPS, PowerPC, and SuperH. Guest operating systems that have been verified to work inside the emulator are NetBSD, OpenBSD, Linux, HelenOS, Ultrix, and Sprite.
Apart from running entire guest operating systems, the emulator can also be used for experiments on a smaller scale, such as hobby operating system development, or it can be used as a general debugger.
Contents |
[edit] Dynamic Translation
GXemul's processor emulation uses dynamic translation into an intermediate representation (IR). The translation step which would translate this IR into native code on the host has not been implemented. That step is not necessary, because the IR is already in a format which can be executed. In other words, it should be possible to port the emulator to new host architectures with just a recompilation; there is no need to implement a native code generation backend for each host architecture to get it running.
(Older releases, up to and including 0.3.8, used dynamic binary translation, which translated the emulated machine code directly into native code on the host. This worked for DEC Alpha and i386 hosts. The binary translation mode was removed in release 0.4.0.)
[edit] Usage Example
Assuming you have downloaded a NetBSD/pmax 4.0 CD-ROM ISO image (pmaxcd-4.0.iso), the following commands will let you install NetBSD onto an emulated DECstation 5000/200 (also known as "3max"):
dd if=/dev/zero of=nbsd_pmax.img bs=1024 count=1 seek=3000000
gxemul -e 3max -d nbsd_pmax.img -d b:pmaxcd-4.0.iso
The first command (dd) creates an empty disk image, and the second command launches GXemul. The -e option specifies the machine to emulate, and the -d options add disk images. The first disk image is the newly created disk image where NetBSD will be installed. The second is the CD-ROM ISO image; the b: modifier flag means that the system should boot from the ISO image, instead of the first available disk image.
Installing NetBSD within the emulator should be very similar to installing it on real hardware. Once the installation has completed, the following command should start NetBSD from the disk image:
gxemul -e 3max -d nbsd_pmax.img