hansdegoede: me (Default)
[personal profile] hansdegoede
Hi,

Here is a little howto for building qemu + spice with usbredirection from source, for those of you who are not running Fedora 16.

The below instructions assume:
  1. That you are familiar with building things from source
  2. That you are running the 64 bit version a fairly recent Linux distribution
  3. That you want to override you distro installed version of various bits with the bits build from source, this is necessary to ensure that everything builds and runs linked against the correct version of various libs.
  4. That using a distribution with a multilib setup where 64 bit libraries go into /usr/lib64. If you are using a distro which puts 64 bits libraries under /usr/lib rather then /usr/lib64 (for example Debian or ubuntu), you need to replace /usr/lib64 with /usr/lib in all commands below
*** Step 1 Building libusb ***

First of all you will need libusb from git for now, hopefully there will soon be an offfical 1.0.9 release you can use instead. To build libusb from git do:

git clone git://libusbx.git.sourceforge.net/gitroot/libusbx/libusbx
cd libusbx
./autogen.sh --prefix=/usr --libdir=/lib64
make
sudo make install

*** Step 2 building usbredir ***

Next you will need to build usbredir itself for the usbredirparser and usbredirhost libraries, download it here, then do:

tar xvfj usbredir-0.4.3.tar.bz2
cd usbredir-0.4.3
make -j2 PREFIX=/usr LIBDIR=/usr/lib64
sudo make PREFIX=/usr LIBDIR=/usr/lib64 install

*** step 3 building spice-protocol ***

For usbredir support we need version >= 0.10 of spice-protocol, download it here, then do:

tar xvfj spice-protocol-0.10.1.tar.bz2
cd spice-protocol-0.10.1
./configure.sh --prefix=/usr --libdir=/usr/lib64
make -j2
sudo make install

*** step 4 building spice[-server] ***

For usbredir support we need version >= 0.10 of spice, download it here, then do:

tar xvfj spice-0.10.1.tar.bz2
cd spice-0.10.1
./configure --prefix=/usr --libdir=/usr/lib64 --enable-smartcard
make -j2
sudo make install

*** Step 5 building qemu ***

The core usbredir code is already in the qemu-0.15.0 upstream release, but some bits needed for integrating it
with spice are missing. Besided that it is also good to get a version with some recent spice fixes included, so
we will again use a git tree for this:

git clone git://people.freedesktop.org/~jwrdegoede/qemu
cd qemu
git checkout -B qemu-kvm-1.0-usbredir qemu-kvm-1.0-usbredir
./configure --prefix=/usr --enable-smartcard-nss --enable-smartcard --enable-spice --target-list=x86_64-softmmu
make -j2
# do not do make install, this will replace the versions of seabios & friends installed by your distro with (quite old non
# working) versions of seabios which are still part of the qemu git tree (someone ought to fix this one of these days)
sudo install -m0755 -p x86_64-softmmu/qemu-system-x86_64 /usr/bin

*** Step 6 building spice-gtk with usbredir support ***

Get spice-gtk version 0.11 or newer here.

tar xvfj spice-gtk-0.11.tar.bz2
cd spice-gtk-0.11
./configure --prefix=/usr --libdir=/usr/lib64
make -j2
sudo make install

*** All done ***

All done, to enjoy the usbredir support you need to pass some extra qemu options on the qemu cmdline, see my next blogpost for details.
This account has disabled anonymous posting.
If you don't have an account you can create one now.
HTML doesn't work in the subject.
More info about formatting

Profile

hansdegoede: me (Default)
Hans de Goede

May 2025

S M T W T F S
    123
45678910
11121314151617
1819202122 2324
25262728293031

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Jun. 5th, 2025 03:47 pm
Powered by Dreamwidth Studios