QEMU custom build for one architecture only
Asked Answered
B

4

6

I downloaded the tarball from qemu.org. Now how can I compile the source code only for the i386 architecture?

I mean, my QEMU need not be able to emulate a Power PC, Motorola 68000 or others.

I tried these steps:

./configure
make
make install

But there was a failure:

No rule to build target 'all'  

In addition to this, the above steps compile QEMU for all architectures.

Hope to get some help.

Blackhead answered 20/9, 2011 at 6:28 Comment(2)
can you be more specific? i.e. what version of the source did you grab, what platform are you running on, what compilers do you have installed?Pesek
I used qemu qemu-0.15.0.tar.gz on puppy linux 528. compiler was gcc that comes with puppy528. But I think, irrespective of everything else, qemu source code should compile fine at least in modest systems.Blackhead
T
13

On a Linux machine, download Qemu Source Code and extract it to a directory, then cd to that directory and do the following:

./configure --disable-kvm [--prefix=PFX] [--target-list="i386-softmmu x86_64-softmmu"]
make
make install
Thebes answered 17/10, 2011 at 17:57 Comment(5)
How to get rid of "ERROR: unknown option [--prefix=PFX]" after running this command?Neddra
@ Amit I have the same issue. Did you find a fix for it?Underarm
this might be of help for future people. I added a comment aswell regarding a switch for /configure. askubuntu.com/questions/814522/error-configure-and-make-qemu/…Underarm
@AFJ the brackets describe optional parameters you probably need to adjust to get things working. Remove [--prefix=PFX] or change it to --prefix=PFX with PRF set to the prefix (probably you any --prefix=/usr/local and if you get permission errors from installing as root then chown -R $(id -u):$(id -g) and my personal trick is to poke around the AUR or Gentoo recipes or GitHub actions scripts for guidance, gotchas and getting things just right compiling qemu from source.)Bridgeboard
Also docker helps an insane amount for building. Run . /etc/*ease ; docker run -it --rm --mount "type=bind,source=$PWD,target=/usr/local" --workdir /usr/local ubuntu:${UBUNTU-CODENAME:-rolling} /usr/bin/bash -iBridgeboard
I
4

first tar it (extract it) then go to the directory on shell then type this commands

./configure --target-list=i386-softmmu

when build successful

press make and enter when this done then write

sudo make install

that's it

Inae answered 20/2, 2014 at 5:40 Comment(0)
B
0

For general linux,

tar xvzf qemu-1.4.0.tar.bz2
cd qemu-1.4.0
./configure --target-list=i386-softmmu
make
make install

For puppy linux wary 530,

tar xvzf qemu-1.4.0.tar.bz2
cd qemu-1.4.0
./configure --target-list=i386-softmmu
make
new2dir make install
cd ..
dir2pet qemu-1.4.0-i486
Blackhead answered 5/10, 2013 at 9:32 Comment(0)
D
0
./configure  --target-list=x86_64-linux-user --disable-smartcard-nss

This command work for me, while building Qemu 1.6 on centOS

Detraction answered 14/3, 2014 at 6:29 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.