LiveCDQemuWin32

Differences between revisions 6 and 7
Revision 6 as of 2006-12-10 19:56:04
Size: 5063
Editor: c-68-33-112-13
Comment:
Revision 7 as of 2006-12-10 20:29:59
Size: 5555
Editor: c-68-33-112-13
Comment:
Deletions are marked like this. Additions are marked like this.
Line 27: Line 27:
Initially it should be possible to run the LiveCD under Qemu without Qvm86; operations may be slow. Recent versions of Qemu (0.8.2) seem to be workable to a point: === Unaccellerated Qemu ===
Initially it should be possible to run the LiveCD under Qemu without Qvm86; operations may be slow. Recent versions of Qemu (0.8.2) seem to be workable to a point; Kqemu seems to double emulation speed, Qvm86 should provide approximately the same gains when it's workable. We can probably claim Qemu runs Ubuntu at 1/5 to 1/2 your machine's full speed.
Line 30: Line 31:
   * '''No Acceleration''': Roughly 8 minutes to get to GDM; 10 total to reach the desktop. (Hosted on Linux)
   * '''Kqemu Acceleration''': Roughly 4 minutes to GDM; 5 to Desktop.
   * '''No Acceleration''': Roughly 8 minutes to get to GDM; 10 total to reach the desktop. (Hosted on Ubuntu)
   * '''Kqemu Acceleration''': 4(GDM)/5(Desktop) (Hosted on Ubuntu)
Line 33: Line 34:
   * '''No Acceleration''': Roughly 5 minutes to get to GDM; 7 total to reach the desktop. (Hosted on Windows XP)    * '''No Acceleration''': 5(GDM)/7(Desktop) (Hosted on Windows XP)
   * '''No Acceleration''': 7(GDM)/10(Desktop) (Hosted on Ubuntu)
   * '''Kqemu Acceleration''': 2(GDM)/3(Desktop) (Hosted on Ubuntu)
Line 40: Line 43:
 * With the `--hash-style=both` support in `binutils-1.17.50.0.x` and in `glibc` in Feisty, boot and program load time should be minimized; this should halve the boot and load times over Edgy.  * With the `--hash-style=both` support in `binutils-1.17.50.0.x` and in `glibc` in Feisty, boot and program load time should be minimized; this should [http://sourceware.org/ml/libc-alpha/2006-06/msg00095.html halve] the boot and load times over Edgy.
Line 43: Line 46:
 * Booting in Qemu without Qvm86 or KQemu will probably supply a good testbed for performance regressions.  * Booting in Qemu without Qvm86 or KQemu will probably supply developers with a good testbed for performance regressions.
Line 83: Line 86:
 * Qvm86 appears to be the windows equivalent of Kqemu (the binary accelarator module).  * Qvm86 appears to be the Open Source equivalent of Kqemu (the binary accelerator module).
Line 121: Line 124:
 * Ubuntu can't see Windows Samba shares from within Qemu; this should be addressed. --JohnMoser

Summary

This spec describes adding Qemu to the LiveCD to boot under Win32.

Rationale

Users may find themselves unwilling to try a LiveCD or make the switch to Ubuntu; a virtualized LiveCD would give users a way to use Ubuntu easily until they feel comfortable enough to commit.

Use cases

There are several.

  • Alice worries that a LiveCD may destroy her existing OS; she runs it inside a virtualized Qemu session instead.
  • Bob wants to try Ubuntu without rebooting and closing all his running programs; he uses Ubuntu within a virtualized Qemu session.
  • Eve uses Ubuntu within a Qemu virtualized session with her documents in a Samba share; she becomes comfortable enough to make the switch on her next computer upgrade.

Scope

The LiveCD should offer to run inside Qemu under Win32.

Design

Use Qvm86 and Qemu.

Unaccellerated Qemu

Initially it should be possible to run the LiveCD under Qemu without Qvm86; operations may be slow. Recent versions of Qemu (0.8.2) seem to be workable to a point; Kqemu seems to double emulation speed, Qvm86 should provide approximately the same gains when it's workable. We can probably claim Qemu runs Ubuntu at 1/5 to 1/2 your machine's full speed.

  • Dapper
    • No Acceleration: Roughly 8 minutes to get to GDM; 10 total to reach the desktop. (Hosted on Ubuntu)

    • Kqemu Acceleration: 4(GDM)/5(Desktop) (Hosted on Ubuntu)

  • Edgy
    • No Acceleration: 5(GDM)/7(Desktop) (Hosted on Windows XP)

    • No Acceleration: 7(GDM)/10(Desktop) (Hosted on Ubuntu)

    • Kqemu Acceleration: 2(GDM)/3(Desktop) (Hosted on Ubuntu)

  • Feisty: Not tested yet.

See [:LiveCDQemuWin32/Benchmarks] for more benchmarks.

Once loaded, both systems seem rather responsive; Edgy seems much more responsive than Dapper, especially in terms of screen drawing. Feisty has not been tested yet; but should supply some enhancements:

  • With the --hash-style=both support in binutils-1.17.50.0.x and in glibc in Feisty, boot and program load time should be minimized; this should [http://sourceware.org/ml/libc-alpha/2006-06/msg00095.html halve] the boot and load times over Edgy.

    • As of this writing, Feisty's toolchain and glibc supports the appropriate options; but they have not been activated on the buildd. readelf -e ''ELF_FILE'' | grep .gnu.hash will show the DT_GNU_HASH section once it's built into binaries.

  • Other enhancements to GNOME and GTK+ especially should make Feisty faster due to lowered RAM usage and faster screen painting.
  • Booting in Qemu without Qvm86 or KQemu will probably supply developers with a good testbed for performance regressions.

Implementation

make -fwin32/Makefile.gcc zlib1.dll
sudo cp -a zlib.h zconf.h /usr/i586-mingw32msvc/include
sudo cp -a libzdll.a /usr/i586-mingw32msvc/lib/libz.a
paul@katu:~/src/upload/qemu-win32/qemu-0.8.0$ cp -a ../zlib-1.2.3/upstream/tarballs/zlib-1.2.3/zlib1.dll .
paul@katu:~/src/upload/qemu-win32/qemu-0.8.0$ wine ./qemu-img.exe
qemu-img version 0.8.0, Copyright (c) 2004-2005 Fabrice Bellard
usage: qemu-img command [command options]

$ cp -a ../../sdl-1.2.9-win32/bin/SDL.dll .
paul@katu:~/src/upload/qemu-win32/qemu-0.8.0$ wine ./i386-softmmu/qemu.exe  | head
QEMU PC emulator version 0.8.0, Copyright (c) 2003-2005 Fabrice Bellard
usage: qemu [options] [disk_image]

Hzzzzah!

Current Status:

  • Boots under Wine under X, but with corrupt video
  • Boots under Windows, but with no mouse (seemed to be fixed with a reboot...)

C:\Documents and Settings\sladen\Desktop\qemu-win32_0.8.0-0loadaddr>qemu -m 180
-L . -kernel d:\install\vmlinuz -initrd ..\initramfs.gz -hdd d:\casper\filesyste
m.squashfs -hda ..\20040602150630937_YP780_yepp_studio_driver.zip -append "boot=
casper quiet splash"
  • There is no /dev/zero on Windows, so a random file is used instead; EVMS then complains that there isn't a partition table on it and asks interactive questions before dumping you at a command prompt.

  • usplash times out on pre-init

More links:

Code

Data preservation and migration

Outstanding issues

  • Qemu needs GCC 3.3 to build reliably
  • SDL 1.2
  • Zlib

http://fabrice.bellard.free.fr/qemu/qemu-doc.html#TOC56

http://www.libsdl.org/release/SDL-devel-1.2.9-mingw32.tar.gz

sudo apt-get install mingw32-binutils mingw32 mingw32-runtime

cp -al qemu-0.8.0/ qemu-0.8.0-win32

export PATH=/home/paul/src/upload/sdl-1.2.9-win32/bin/:$PATH
./configure --enable-mingw32 --cross-prefix=i586-mingw32msvc-

ERROR: "i586-mingw32msvcgcc" looks like gcc 4.x
QEMU is known to have problems when compiled with gcc 4.x
It is recommended that you use gcc 3.x to build QEMU
To use this compiler anyway, configure with --disable-gcc-check

make install

*lots of errors*

BoF agenda and discussion

  • This spec needs attention if it's going to go anywhere. --JohnMoser

  • Ubuntu can't see Windows Samba shares from within Qemu; this should be addressed. --JohnMoser


CategorySpec

LiveCDQemuWin32 (last edited 2008-08-06 16:15:37 by localhost)