Jump to content

QEMU: Difference between revisions

From postmarketOS Wiki
link to https://github.com/postmarketOS/pmbootstrap/issues/1158
Qemu on Debian stretch: previous howto was enough to boot using commandline mode in qemu, but didn't allow wayland to start
Line 12: Line 12:


Qemu on Debian does not include SDL-support by default. To use pmbootstrap on Debian you have to do the following:
Qemu on Debian does not include SDL-support by default. To use pmbootstrap on Debian you have to do the following:
# Ensure that /etc/apt/sources.list contains a deb-src line for your distribution.
# Ensure that /etc/apt/sources.list contains a deb-src line for Debian buster or later.
# <code>apt-get source qemu</code> (get the source code for the Debian package)
# <code>sudo apt-get build-dep libvirglrenderer-dev/buster</code> (install build dependencies for libvirglrenderer)
# <code>cd qemu-*</code>
# <code>fakeroot apt-get -b source libvirglrenderer-dev/buster</code> (download and build libvirglrenderer)
# In debian/rules change common_configure_opts such that the line <code>--extra-ldflags="$(LDFLAGS) -Wl,--as-needed" \</code> to <code>--extra-ldflags="$(LDFLAGS) -Wl,--as-needed,-rpath-link,/lib/x86_64-linux-gnu" \</code> and add <code>"--enable-sdl --with-sdlabi=2.0 \</code> as the following line.
# <code>sudo dpkg -i libvirglrenderer0_0.6.0-2_amd64.deb libvirglrenderer-dev_0.6.0-2_amd64.deb</code> (install it)
# <code>apt-get build-dep qemu</code> (get build dependencies for qemu)
# <code>sudo apt-get build-dep qemu/buster</code>
# <code>fakeroot debian/rules binary</code> (compile the package)
# <code>fakeroot apt-get -b source qemu/buster</code>
# Install the appropriate Debian packages which have been created in ..
# Install the appropriate qemu Debian packages which have been created in the current directory.


=== See also ===
=== See also ===

Revision as of 13:01, 26 January 2018

Note Right now we use the QEMU version installed on the host system, but we want to change that: #1158

Building and starting a QEMU image

pmbootstrap init  # Choose a qemu-* device (x86_64: amd64, arm: vexpress-soc)
pmbootstrap install --no-fde
pmbootstrap qemu --image-size=2G

Note: The amd64 version is recommended if you don't know which one to choose. See the device specific pages (links below) for the differences.

The --image-size=2G parameter will increase the image size to 2GB, so you don't instantly run out of space (by default the image size is as small as possible). Check out pmbootstrap qemu --help for more options, such as performance tweaks.

Qemu on Debian stretch

Qemu on Debian does not include SDL-support by default. To use pmbootstrap on Debian you have to do the following:

  1. Ensure that /etc/apt/sources.list contains a deb-src line for Debian buster or later.
  2. sudo apt-get build-dep libvirglrenderer-dev/buster (install build dependencies for libvirglrenderer)
  3. fakeroot apt-get -b source libvirglrenderer-dev/buster (download and build libvirglrenderer)
  4. sudo dpkg -i libvirglrenderer0_0.6.0-2_amd64.deb libvirglrenderer-dev_0.6.0-2_amd64.deb (install it)
  5. sudo apt-get build-dep qemu/buster
  6. fakeroot apt-get -b source qemu/buster
  7. Install the appropriate qemu Debian packages which have been created in the current directory.

See also