fp-wiki>ImportUser (Imported from MoinMoin) |
m (1 revision(s)) |
(No difference)
|
Revision as of 16:26, 24 May 2008
OLPC Simulator
Overview
The engine of the hardware simulator is to be provided by the QEMU emulator . This is a fast system emulator for x86, x86_64, ppc, ppc64, arm, sparc32, sparc64 & MIPS CPU architectures. For the purposes of OLPC, only the x86 emulation will be needed to simulate the AMD Geode CPU. The performance hit is approx x5-10 using the basic emulator engine, but adding in either the KQEMU or QVM86 kernel accelerators reduces the hit to x1-2. Remember that the Geode CPU is only running at a fraction the MHz of a current entry level PC, the slowdown imposed by the emulator can actually be considered a benefit, giving developers a better feel of how well the applications will respond on the real hardware.
Given limitless development resources there is much that could be done to make the a system which very closely simulates the actual hardware platform. Only a very few developers (those working on kernel & display hardware drivers), however, would ever need to have exact hardware simulation - for the broader application developer community it would be complete overkill. Thus, unless people in the community volunteer to further enhance the simulation, it is intended to keep things pretty simple. The characteristics of the simulator will thus be:
- Generic Pentium-II CPU
- 128 MB of RAM
- 512 MB disk image
- NE-200 network card
- Cirrus SVGA display
The OS images will be configured to load the block2mtd.ko kernel driver, making the generic IDE driver appear to be a MTD (Flash RAM) device. This will allow the same JFFS2 filesystem to be run instead the emulator. Similarly the kernel will be setup to boot a framebuffer fixed to a resolution of 640x480 at 16bpp (or whatever the latest display hardware specs are)
Implementation
The long term plans for the simulator called for something more than just a simple GUI around QEMU - after all, there are already plenty of GUI frontends for QEMU. In particular it is critical that the full capabilities present in any UI, also be exposed to developers in a formal API, facilitating tasks such as automated testing. The decision was thus made to write a DBus service for controlling QEMU, and build a variety of client applications using this API. So the simulator comprises:
QEMU:: The x86 emulator engine providing the powerhouse for the simulator QEMU-Manager:: A DBus service managing the QEMU engine, allowing virtual machines to be created, configured & managed. QEMU-Admin:: A general purpose UI for creating, configuring & managing virtual machines. This exposes the full capabilities of the QEMU-Manager service system-config-qemu:: An adminsitrative tool for granting unprivileged users access to the kernel accelerator, and setting up bridged networking to the host mahcine vde:: Provides a virtual ethernet link between VMs, also briding to the host network via a TAP device dnsmasq:: Provides DHCP and DNS services when using bridged networking qemu-network:: A set of scripts for activating / configuring the VDE, DNS & DHCP services
Alternatives
QEMU is not the only machine virtualization technology available. Developers from a Windows background may be more familiar with VMWare, while the leading technology for Linux is found in the form of Xen. Since the Geode is an x86 compatible CPU, it will also be possible to run the OS platform images within both Xen or VMware Player. In fact there are already working instructions for VMWare player .