§2023-10-19
- QEMU A generic and open source machine emulator and virtualizer
- Download or bujild instruction
- QEMU documentation
- The main documentation section is the first place to go in case you have questions about using QEMU.
- Most of the documentation is generated automatically from the QEMU git source tree, however some text files have not been converted to the new format yet. These documentation files can be browsed via the git web interface instead.
- The QEMU wiki contains more user documentation and developer documentation that has not been integrated into the QEMU git tree.
- ゼロからの OS 自作入門
- configure options
./configure --enable-system --enable-user --enable-slirp --target-list=x86_64-softmmu,arm-softmmu
--enable-system:
- Purpose: This option enables QEMU's system mode.
- Explanation: System mode allows QEMU to run entire guest operating systems, which means it's capable of full system emulation. It's useful when you want to run an entire operating system, similar to what you would do with a virtual machine, and emulate the underlying hardware.
--enable-user:
- Purpose: This option enables QEMU's user mode.
- Explanation: User mode allows QEMU to run individual user-level applications without the need for emulating an entire operating system or hardware. It's particularly useful for running applications compiled for a different target architecture on your host system. QEMU translates the syscalls and binary code, allowing the application to run on a different architecture. It's not intended for full system emulation but rather for running individual programs.
--target-list=x86_64-softmmu,arm-softmmu:
- Purpose: This option specifies the list of target architectures for which you want to build QEMU. In this case, it includes x86_64 and ARM.
- Explanation: Softmmu is a QEMU feature that allows you to emulate a full machine. When you specify x86_64-softmmu, you're enabling support for emulating x86_64 architecture machines in full system mode. Similarly, arm-softmmu enables support for emulating ARM architecture machines in full system mode. With these options, you can create virtual machines that emulate both x86_64 and ARM-based systems, and run full operating systems on them.
In summary, by using --enable-system, --enable-user, and specifying x86_64-softmmu,arm-softmmu in the --target-list, you're configuring QEMU to build with a wide range of capabilities. You can use the resulting QEMU binary for full system emulation (system mode) and for running individual programs on various target architectures (user mode), including x86_64 and ARM. These options provide flexibility for different use cases, whether you want to create virtual machines, test software across architectures, or perform other tasks related to emulation and virtualization.
wget https://download.qemu.org/qemu-8.1.2.tar.xz
tar xvJf qemu-8.1.2.tar.xz
cd qemu-8.1.2
./configure
make
time make
- orangepi5+ 8G and odroid-h2
real 33m58.860s 46m45.885s user 240m01.291s 150m56.446s sys 22m48.20s 20m49.333s
sudo make install
By default, when you run sudo make install for QEMU, it installs the QEMU binaries and related files to system directories. The installation directory is usually determined by the configuration used when building QEMU. Typically, QEMU installs its files to the following directories:
- Executables (QEMU binary files) are installed to /usr/local/bin or /usr/bin.
- Libraries are placed in /usr/local/lib or /usr/lib.
- Configuration files and data may be placed in /usr/local/share/qemu or /usr/share/qemu.
You can specify a different installation directory by using the --prefix option when running ./configure. For example, if you want to install QEMU to a custom directory, you can configure it like this:
./configure --prefix=/path/to/custom/installation/directory
alexlai@h2Jammy:~/build/qemu-8.1.2$ sudo make install
[sudo] password for alexlai:
changing dir to build for make "install"...
make[1]: Entering directory '/home/alexlai/build/qemu-8.1.2/build'
[1/118] Generating qemu-version.h with a custom command (wrapped by meson to capture output)
[1/2] Installing files.
Installing trace/trace-events-all to /usr/local/share/qemu
Installing qemu-system-aarch64 to /usr/local/bin
Installing qemu-system-alpha to /usr/local/bin
Installing qemu-system-arm to /usr/local/bin
Installing qemu-system-avr to /usr/local/bin
Installing qemu-system-cris to /usr/local/bin
Installing qemu-system-hppa to /usr/local/bin
Installing qemu-system-i386 to /usr/local/bin
Installing qemu-system-loongarch64 to /usr/local/bin
Installing qemu-system-m68k to /usr/local/bin
Installing qemu-system-microblaze to /usr/local/bin
Installing qemu-system-microblazeel to /usr/local/bin
Installing qemu-system-mips to /usr/local/bin
Installing qemu-system-mips64 to /usr/local/bin
Installing qemu-system-mips64el to /usr/local/bin
Installing qemu-system-mipsel to /usr/local/bin
Installing qemu-system-nios2 to /usr/local/bin
Installing qemu-system-or1k to /usr/local/bin
Installing qemu-system-ppc to /usr/local/bin
Installing qemu-system-ppc64 to /usr/local/bin
Installing qemu-system-riscv32 to /usr/local/bin
Installing qemu-system-riscv64 to /usr/local/bin
Installing qemu-system-rx to /usr/local/bin
Installing qemu-system-s390x to /usr/local/bin
Installing qemu-system-sh4 to /usr/local/bin
Installing qemu-system-sh4eb to /usr/local/bin
Installing qemu-system-sparc to /usr/local/bin
Installing qemu-system-sparc64 to /usr/local/bin
Installing qemu-system-tricore to /usr/local/bin
Installing qemu-system-x86_64 to /usr/local/bin
Installing qemu-system-xtensa to /usr/local/bin
Installing qemu-system-xtensaeb to /usr/local/bin
Installing qemu-aarch64 to /usr/local/bin
Installing qemu-aarch64_be to /usr/local/bin
Installing qemu-alpha to /usr/local/bin
Installing qemu-arm to /usr/local/bin
Installing qemu-armeb to /usr/local/bin
Installing qemu-cris to /usr/local/bin
Installing qemu-hexagon to /usr/local/bin
Installing qemu-hppa to /usr/local/bin
Installing qemu-i386 to /usr/local/bin
Installing qemu-loongarch64 to /usr/local/bin
Installing qemu-m68k to /usr/local/bin
Installing qemu-microblaze to /usr/local/bin
Installing qemu-microblazeel to /usr/local/bin
Installing qemu-mips to /usr/local/bin
Installing qemu-mips64 to /usr/local/bin
Installing qemu-mips64el to /usr/local/bin
Installing qemu-mipsel to /usr/local/bin
Installing qemu-mipsn32 to /usr/local/bin
Installing qemu-mipsn32el to /usr/local/bin
Installing qemu-nios2 to /usr/local/bin
Installing qemu-or1k to /usr/local/bin
Installing qemu-ppc to /usr/local/bin
Installing qemu-ppc64 to /usr/local/bin
Installing qemu-ppc64le to /usr/local/bin
Installing qemu-riscv32 to /usr/local/bin
Installing qemu-riscv64 to /usr/local/bin
Installing qemu-s390x to /usr/local/bin
Installing qemu-sh4 to /usr/local/bin
Installing qemu-sh4eb to /usr/local/bin
Installing qemu-sparc to /usr/local/bin
Installing qemu-sparc32plus to /usr/local/bin
Installing qemu-sparc64 to /usr/local/bin
Installing qemu-x86_64 to /usr/local/bin
Installing qemu-xtensa to /usr/local/bin
Installing qemu-xtensaeb to /usr/local/bin
Installing qga/qemu-ga to /usr/local/bin
Installing qemu-img to /usr/local/bin
Installing qemu-io to /usr/local/bin
Installing qemu-nbd to /usr/local/bin
Installing storage-daemon/qemu-storage-daemon to /usr/local/bin
Installing contrib/elf2dmp/elf2dmp to /usr/local/bin
Installing qemu-edid to /usr/local/bin
Installing qemu-bridge-helper to /usr/local/libexec
Installing qemu-pr-helper to /usr/local/bin
Installing pc-bios/edk2-aarch64-code.fd to /usr/local/share/qemu
Installing pc-bios/edk2-arm-code.fd to /usr/local/share/qemu
Installing pc-bios/edk2-arm-vars.fd to /usr/local/share/qemu
Installing pc-bios/edk2-i386-code.fd to /usr/local/share/qemu
Installing pc-bios/edk2-i386-secure-code.fd to /usr/local/share/qemu
Installing pc-bios/edk2-i386-vars.fd to /usr/local/share/qemu
Installing pc-bios/edk2-x86_64-code.fd to /usr/local/share/qemu
Installing pc-bios/edk2-x86_64-secure-code.fd to /usr/local/share/qemu
Installing /home/alexlai/build/qemu-8.1.2/include/qemu/qemu-plugin.h to /usr/local/include/
Installing new directory /var/local/run
Installing /home/alexlai/build/qemu-8.1.2/ui/icons/qemu_16x16.png to /usr/local/share/icons/hicolor/16x16/apps
Installing /home/alexlai/build/qemu-8.1.2/ui/icons/qemu_24x24.png to /usr/local/share/icons/hicolor/24x24/apps
Installing /home/alexlai/build/qemu-8.1.2/ui/icons/qemu_32x32.png to /usr/local/share/icons/hicolor/32x32/apps
Installing /home/alexlai/build/qemu-8.1.2/ui/icons/qemu_48x48.png to /usr/local/share/icons/hicolor/48x48/apps
Installing /home/alexlai/build/qemu-8.1.2/ui/icons/qemu_64x64.png to /usr/local/share/icons/hicolor/64x64/apps
Installing /home/alexlai/build/qemu-8.1.2/ui/icons/qemu_128x128.png to /usr/local/share/icons/hicolor/128x128/apps
Installing /home/alexlai/build/qemu-8.1.2/ui/icons/qemu_256x256.png to /usr/local/share/icons/hicolor/256x256/apps
Installing /home/alexlai/build/qemu-8.1.2/ui/icons/qemu_512x512.png to /usr/local/share/icons/hicolor/512x512/apps
Installing /home/alexlai/build/qemu-8.1.2/ui/icons/qemu_32x32.bmp to /usr/local/share/icons/hicolor/32x32/apps
Installing /home/alexlai/build/qemu-8.1.2/ui/icons/qemu.svg to /usr/local/share/icons/hicolor/scalable/apps
Installing /home/alexlai/build/qemu-8.1.2/ui/qemu.desktop to /usr/local/share/applications
Installing /home/alexlai/build/qemu-8.1.2/pc-bios/bios.bin to /usr/local/share/qemu
Installing /home/alexlai/build/qemu-8.1.2/pc-bios/bios-256k.bin to /usr/local/share/qemu
Installing /home/alexlai/build/qemu-8.1.2/pc-bios/bios-microvm.bin to /usr/local/share/qemu
Installing /home/alexlai/build/qemu-8.1.2/pc-bios/qboot.rom to /usr/local/share/qemu
Installing /home/alexlai/build/qemu-8.1.2/pc-bios/vgabios.bin to /usr/local/share/qemu
Installing /home/alexlai/build/qemu-8.1.2/pc-bios/vgabios-cirrus.bin to /usr/local/share/qemu
Installing /home/alexlai/build/qemu-8.1.2/pc-bios/vgabios-stdvga.bin to /usr/local/share/qemu
Installing /home/alexlai/build/qemu-8.1.2/pc-bios/vgabios-vmware.bin to /usr/local/share/qemu
Installing /home/alexlai/build/qemu-8.1.2/pc-bios/vgabios-qxl.bin to /usr/local/share/qemu
Installing /home/alexlai/build/qemu-8.1.2/pc-bios/vgabios-virtio.bin to /usr/local/share/qemu
Installing /home/alexlai/build/qemu-8.1.2/pc-bios/vgabios-ramfb.bin to /usr/local/share/qemu
Installing /home/alexlai/build/qemu-8.1.2/pc-bios/vgabios-bochs-display.bin to /usr/local/share/qemu
Installing /home/alexlai/build/qemu-8.1.2/pc-bios/vgabios-ati.bin to /usr/local/share/qemu
Installing /home/alexlai/build/qemu-8.1.2/pc-bios/openbios-sparc32 to /usr/local/share/qemu
Installing /home/alexlai/build/qemu-8.1.2/pc-bios/openbios-sparc64 to /usr/local/share/qemu
Installing /home/alexlai/build/qemu-8.1.2/pc-bios/openbios-ppc to /usr/local/share/qemu
Installing /home/alexlai/build/qemu-8.1.2/pc-bios/QEMU,tcx.bin to /usr/local/share/qemu
Installing /home/alexlai/build/qemu-8.1.2/pc-bios/QEMU,cgthree.bin to /usr/local/share/qemu
Installing /home/alexlai/build/qemu-8.1.2/pc-bios/pxe-e1000.rom to /usr/local/share/qemu
Installing /home/alexlai/build/qemu-8.1.2/pc-bios/pxe-eepro100.rom to /usr/local/share/qemu
Installing /home/alexlai/build/qemu-8.1.2/pc-bios/pxe-ne2k_pci.rom to /usr/local/share/qemu
Installing /home/alexlai/build/qemu-8.1.2/pc-bios/pxe-pcnet.rom to /usr/local/share/qemu
Installing /home/alexlai/build/qemu-8.1.2/pc-bios/pxe-rtl8139.rom to /usr/local/share/qemu
Installing /home/alexlai/build/qemu-8.1.2/pc-bios/pxe-virtio.rom to /usr/local/share/qemu
Installing /home/alexlai/build/qemu-8.1.2/pc-bios/efi-e1000.rom to /usr/local/share/qemu
Installing /home/alexlai/build/qemu-8.1.2/pc-bios/efi-eepro100.rom to /usr/local/share/qemu
Installing /home/alexlai/build/qemu-8.1.2/pc-bios/efi-ne2k_pci.rom to /usr/local/share/qemu
Installing /home/alexlai/build/qemu-8.1.2/pc-bios/efi-pcnet.rom to /usr/local/share/qemu
Installing /home/alexlai/build/qemu-8.1.2/pc-bios/efi-rtl8139.rom to /usr/local/share/qemu
Installing /home/alexlai/build/qemu-8.1.2/pc-bios/efi-virtio.rom to /usr/local/share/qemu
Installing /home/alexlai/build/qemu-8.1.2/pc-bios/efi-e1000e.rom to /usr/local/share/qemu
Installing /home/alexlai/build/qemu-8.1.2/pc-bios/efi-vmxnet3.rom to /usr/local/share/qemu
Installing /home/alexlai/build/qemu-8.1.2/pc-bios/qemu-nsis.bmp to /usr/local/share/qemu
Installing /home/alexlai/build/qemu-8.1.2/pc-bios/bamboo.dtb to /usr/local/share/qemu
Installing /home/alexlai/build/qemu-8.1.2/pc-bios/canyonlands.dtb to /usr/local/share/qemu
Installing /home/alexlai/build/qemu-8.1.2/pc-bios/petalogix-s3adsp1800.dtb to /usr/local/share/qemu
Installing /home/alexlai/build/qemu-8.1.2/pc-bios/petalogix-ml605.dtb to /usr/local/share/qemu
Installing /home/alexlai/build/qemu-8.1.2/pc-bios/multiboot.bin to /usr/local/share/qemu
Installing /home/alexlai/build/qemu-8.1.2/pc-bios/multiboot_dma.bin to /usr/local/share/qemu
Installing /home/alexlai/build/qemu-8.1.2/pc-bios/linuxboot.bin to /usr/local/share/qemu
Installing /home/alexlai/build/qemu-8.1.2/pc-bios/linuxboot_dma.bin to /usr/local/share/qemu
Installing /home/alexlai/build/qemu-8.1.2/pc-bios/kvmvapic.bin to /usr/local/share/qemu
Installing /home/alexlai/build/qemu-8.1.2/pc-bios/pvh.bin to /usr/local/share/qemu
Installing /home/alexlai/build/qemu-8.1.2/pc-bios/s390-ccw.img to /usr/local/share/qemu
Installing /home/alexlai/build/qemu-8.1.2/pc-bios/s390-netboot.img to /usr/local/share/qemu
Installing /home/alexlai/build/qemu-8.1.2/pc-bios/slof.bin to /usr/local/share/qemu
Installing /home/alexlai/build/qemu-8.1.2/pc-bios/skiboot.lid to /usr/local/share/qemu
Installing /home/alexlai/build/qemu-8.1.2/pc-bios/palcode-clipper to /usr/local/share/qemu
Installing /home/alexlai/build/qemu-8.1.2/pc-bios/u-boot.e500 to /usr/local/share/qemu
Installing /home/alexlai/build/qemu-8.1.2/pc-bios/u-boot-sam460-20100605.bin to /usr/local/share/qemu
Installing /home/alexlai/build/qemu-8.1.2/pc-bios/qemu_vga.ndrv to /usr/local/share/qemu
Installing /home/alexlai/build/qemu-8.1.2/pc-bios/edk2-licenses.txt to /usr/local/share/qemu
Installing /home/alexlai/build/qemu-8.1.2/pc-bios/hppa-firmware.img to /usr/local/share/qemu
Installing /home/alexlai/build/qemu-8.1.2/pc-bios/opensbi-riscv32-generic-fw_dynamic.bin to /usr/local/share/qemu
Installing /home/alexlai/build/qemu-8.1.2/pc-bios/opensbi-riscv64-generic-fw_dynamic.bin to /usr/local/share/qemu
Installing /home/alexlai/build/qemu-8.1.2/pc-bios/npcm7xx_bootrom.bin to /usr/local/share/qemu
Installing /home/alexlai/build/qemu-8.1.2/pc-bios/vof.bin to /usr/local/share/qemu
Installing /home/alexlai/build/qemu-8.1.2/pc-bios/vof-nvram.bin to /usr/local/share/qemu
Installing /home/alexlai/build/qemu-8.1.2/build/pc-bios/descriptors/50-edk2-i386-secure.json to /usr/local/share/qemu/firmware
Installing /home/alexlai/build/qemu-8.1.2/build/pc-bios/descriptors/50-edk2-x86_64-secure.json to /usr/local/share/qemu/firmware
Installing /home/alexlai/build/qemu-8.1.2/build/pc-bios/descriptors/60-edk2-aarch64.json to /usr/local/share/qemu/firmware
Installing /home/alexlai/build/qemu-8.1.2/build/pc-bios/descriptors/60-edk2-arm.json to /usr/local/share/qemu/firmware
Installing /home/alexlai/build/qemu-8.1.2/build/pc-bios/descriptors/60-edk2-i386.json to /usr/local/share/qemu/firmware
Installing /home/alexlai/build/qemu-8.1.2/build/pc-bios/descriptors/60-edk2-x86_64.json to /usr/local/share/qemu/firmware
Installing /home/alexlai/build/qemu-8.1.2/pc-bios/keymaps/ar to /usr/local/share/qemu/keymaps
Installing /home/alexlai/build/qemu-8.1.2/pc-bios/keymaps/bepo to /usr/local/share/qemu/keymaps
Installing /home/alexlai/build/qemu-8.1.2/pc-bios/keymaps/cz to /usr/local/share/qemu/keymaps
Installing /home/alexlai/build/qemu-8.1.2/pc-bios/keymaps/da to /usr/local/share/qemu/keymaps
Installing /home/alexlai/build/qemu-8.1.2/pc-bios/keymaps/de to /usr/local/share/qemu/keymaps
Installing /home/alexlai/build/qemu-8.1.2/pc-bios/keymaps/de-ch to /usr/local/share/qemu/keymaps
Installing /home/alexlai/build/qemu-8.1.2/pc-bios/keymaps/en-gb to /usr/local/share/qemu/keymaps
Installing /home/alexlai/build/qemu-8.1.2/pc-bios/keymaps/en-us to /usr/local/share/qemu/keymaps
Installing /home/alexlai/build/qemu-8.1.2/pc-bios/keymaps/es to /usr/local/share/qemu/keymaps
Installing /home/alexlai/build/qemu-8.1.2/pc-bios/keymaps/et to /usr/local/share/qemu/keymaps
Installing /home/alexlai/build/qemu-8.1.2/pc-bios/keymaps/fi to /usr/local/share/qemu/keymaps
Installing /home/alexlai/build/qemu-8.1.2/pc-bios/keymaps/fo to /usr/local/share/qemu/keymaps
Installing /home/alexlai/build/qemu-8.1.2/pc-bios/keymaps/fr to /usr/local/share/qemu/keymaps
Installing /home/alexlai/build/qemu-8.1.2/pc-bios/keymaps/fr-be to /usr/local/share/qemu/keymaps
Installing /home/alexlai/build/qemu-8.1.2/pc-bios/keymaps/fr-ca to /usr/local/share/qemu/keymaps
Installing /home/alexlai/build/qemu-8.1.2/pc-bios/keymaps/fr-ch to /usr/local/share/qemu/keymaps
Installing /home/alexlai/build/qemu-8.1.2/pc-bios/keymaps/hr to /usr/local/share/qemu/keymaps
Installing /home/alexlai/build/qemu-8.1.2/pc-bios/keymaps/hu to /usr/local/share/qemu/keymaps
Installing /home/alexlai/build/qemu-8.1.2/pc-bios/keymaps/is to /usr/local/share/qemu/keymaps
Installing /home/alexlai/build/qemu-8.1.2/pc-bios/keymaps/it to /usr/local/share/qemu/keymaps
Installing /home/alexlai/build/qemu-8.1.2/pc-bios/keymaps/ja to /usr/local/share/qemu/keymaps
Installing /home/alexlai/build/qemu-8.1.2/pc-bios/keymaps/lt to /usr/local/share/qemu/keymaps
Installing /home/alexlai/build/qemu-8.1.2/pc-bios/keymaps/lv to /usr/local/share/qemu/keymaps
Installing /home/alexlai/build/qemu-8.1.2/pc-bios/keymaps/mk to /usr/local/share/qemu/keymaps
Installing /home/alexlai/build/qemu-8.1.2/pc-bios/keymaps/nl to /usr/local/share/qemu/keymaps
Installing /home/alexlai/build/qemu-8.1.2/pc-bios/keymaps/no to /usr/local/share/qemu/keymaps
Installing /home/alexlai/build/qemu-8.1.2/pc-bios/keymaps/pl to /usr/local/share/qemu/keymaps
Installing /home/alexlai/build/qemu-8.1.2/pc-bios/keymaps/pt to /usr/local/share/qemu/keymaps
Installing /home/alexlai/build/qemu-8.1.2/pc-bios/keymaps/pt-br to /usr/local/share/qemu/keymaps
Installing /home/alexlai/build/qemu-8.1.2/pc-bios/keymaps/ru to /usr/local/share/qemu/keymaps
Installing /home/alexlai/build/qemu-8.1.2/pc-bios/keymaps/th to /usr/local/share/qemu/keymaps
Installing /home/alexlai/build/qemu-8.1.2/pc-bios/keymaps/tr to /usr/local/share/qemu/keymaps
Installing /home/alexlai/build/qemu-8.1.2/pc-bios/keymaps/sl to /usr/local/share/qemu/keymaps
Installing /home/alexlai/build/qemu-8.1.2/pc-bios/keymaps/sv to /usr/local/share/qemu/keymaps
make[1]: Leaving directory '/home/alexlai/build/qemu-8.1.2/build'