본문 바로가기
카테고리 없음

[qemu]qemu build

by 코딩스미스 2023. 3. 18.
git clone git://git.qemu.org/qemu.git
cd qemu
git checkout -b (version or tag)
git submodule update --init

### arm aarch64
### 라즈베리파이에 맞춰서 오디오를 alsa로 한다. 설정을 하지 않으면 oss가 된다.
./configure --prefix=`pwd`/build --target-list=arm-softmmu,aarch64-softmmu --audio-drv-list=alsa
make
make install

오디오 설정을 alsa로 해서 그런지 qemu가 제대로 동작하지 않는다.

오디오 설정 관련 내용을 참조한다.

Historically QEMU upstream defaulted to

    --audio-drv-list=oss

This is awful so Fedora has for a long time built QEMU with

    --audio-drv-list=pa,sdl,alsa,oss

Upstream recently tried to change its default to

    --audio-drv-list=pa,alsa,sdl,oss

but it turns out this was bad because both the alsa and sdl audio drivers in QEMU have completely broken probing logic. This causes them to claim they can support audio even when no audio hardware exists on the host. This results in problems like the huge pile of errors shown above which often casues QEMU to fail to start:

  https://bugs.launchpad.net/qemu/+bug/1816052

Thus upstream finally decided on

    --audio-drv-list=pa,oss

None of this explains why you would see a regression in libguestfs though as Fedora has been enabling the broken audio drivers for ages.

I wonder if we should drop  sdl & alsa from Fedora builds though. PulseAudio is good enough for desktop virt under the normal user session. For server virt running as root, spice audio tunnelling is better bet.

There could some people relying on alsa or sdl, but it is problematic as shown above.