Hello folks!
So I've been trying to get any x86-based OS working using QEMU and AQEMU as the front-end GUI and for the life of me, I have not been able to install any operating system. Be it any windows distribution from 95 onwards, to Linux or ReactOS. It seems as if the tinycode translator is not translating the x86 code properly and causing faults. Just about every single OS install breaks.
Has anyone here attempted to use Qemu at all with the Pi 4 and had any success? Or is Qemu's tinycode translator totally broken?
Or maybe any workarounds?
Depending on the OS install, it will fail, fault or lockup at various places during the install process.
Any help would be amazing.
Raspberry Pi 4 and QEMU (x86/x64)
"Just because you invested your valuable time in compensating for a software designer’s madness, does not mean the software is good. It means you don’t value your own time as much as you should. "
Re: Raspberry Pi 4 and QEMU (x86/x64)
Sorry to push a thread back up - but anyone? I've been desperately trying to find a solution to this. Someone had to have run into this by now in some way?
Is there anything you'd like for me to run to any info to give to the forum/thread?
Is there anything you'd like for me to run to any info to give to the forum/thread?
"Just because you invested your valuable time in compensating for a software designer’s madness, does not mean the software is good. It means you don’t value your own time as much as you should. "
Re: Raspberry Pi 4 and QEMU (x86/x64)
No one knows, because no one has done it?
Most will be able to help with ARM QEMU on a x86 box.
You want to do x86 QEMU on a ARM box.
That might take longer to answer as only the Pi4 is perhaps good enough to do it and not enough have been out in the wild long enough.
Most will be able to help with ARM QEMU on a x86 box.
You want to do x86 QEMU on a ARM box.
That might take longer to answer as only the Pi4 is perhaps good enough to do it and not enough have been out in the wild long enough.
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges
Raspberries are not Apples or Oranges
Re: Raspberry Pi 4 and QEMU (x86/x64)
Right, I think so as well. The Pi 4 is still just so new, there haven't been enough people fiddling with x86 emulation on its latest ARM platform.Gavinmc42 wrote: ↑Sat Jul 27, 2019 1:25 amNo one knows, because no one has done it?
Most will be able to help with ARM QEMU on a x86 box.
You want to do x86 QEMU on a ARM box.
That might take longer to answer as only the Pi4 is perhaps good enough to do it and not enough have been out in the wild long enough.
Well I'll keep hammering away at it and see if anyone has anything to add.
I might just compile from source, I just need to find the repo to get the absolute latest.
"Just because you invested your valuable time in compensating for a software designer’s madness, does not mean the software is good. It means you don’t value your own time as much as you should. "
Re: Raspberry Pi 4 and QEMU (x86/x64)
Here is the solution.
Compile it right from source.
https://github.com/qemu/qemu
It will take about 4 hours to compile on a Pi 4.
Just be sure to read the instructions and be sure to call a 'make install' after it successfully compiles (with sudo preferably) to install it in the proper directories so that libvirt or AQEMU can see that QEMU exists.
In short, the QEMU from the Raspberry Pi 4 from aptitude repositories are completely broken (e.g. the apt-get install of qemu). Compile it yourself to fix it.
Compile it right from source.
https://github.com/qemu/qemu
It will take about 4 hours to compile on a Pi 4.
Just be sure to read the instructions and be sure to call a 'make install' after it successfully compiles (with sudo preferably) to install it in the proper directories so that libvirt or AQEMU can see that QEMU exists.
In short, the QEMU from the Raspberry Pi 4 from aptitude repositories are completely broken (e.g. the apt-get install of qemu). Compile it yourself to fix it.
"Just because you invested your valuable time in compensating for a software designer’s madness, does not mean the software is good. It means you don’t value your own time as much as you should. "
Re: Raspberry Pi 4 and QEMU (x86/x64)
Make sure your swap file is big enough when compiling.
I have mine set at 1GB on a 4B1.
I think the Pi4B4 can only handle upto to 3GB at the moment, USB driver conflict?
Use the other 1GB as swap?
One day Win95/98?
I have mine set at 1GB on a 4B1.
I think the Pi4B4 can only handle upto to 3GB at the moment, USB driver conflict?
Use the other 1GB as swap?
One day Win95/98?
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges
Raspberries are not Apples or Oranges
Re: Raspberry Pi 4 and QEMU (x86/x64)
I ended up cross-compiling to save those four hours. In a Buster x86_64 container:
Windows 95 then installed properly as I followed the wiki on qemu.org. Took about 30 minutes step-by-step which felt a lot faster than I recall from doing this on a Pi 3B+ long ago.
I didn't test any Raspbian qemu binaries but I believe you RET80. Thanks for letting us all know before we have that heartache after a long wait on a slow emulated OS install.
Code: Select all
git clone git://git.qemu-project.org/qemu.git
cd qemu
sudo dpkg --add-architecture armhf
sudo apt-get update
sudo apt-get install -y g++-arm-linux-gnueabihf flex bison libglib2.0-dev:armhf # and possibly some other lib*-dev:armhf deps
./configure --cross-prefix=arm-linux-gnueabihf- --prefix=/usr/local --target-list="i386-softmmu i386-linux-user x86_64-softmmu x86_64-linux-user " --enable-linux-user --enable-user --enable-system
make
sudo make install
# then copy installed /usr/local contents to the Pi
I didn't test any Raspbian qemu binaries but I believe you RET80. Thanks for letting us all know before we have that heartache after a long wait on a slow emulated OS install.
That was only for the 64-bit kernel. For the purpose of this thread users can compile on 32-bit Raspbian even if intending to emulate 64-bit Intel.
-
- Posts: 95
- Joined: Wed Feb 18, 2015 9:05 pm
Re: Raspberry Pi 4 and QEMU (x86/x64)
Will anyone kindly upload the working, compiled qemu to the repositories?
Using dosbox-x to emulate win9x is painfully slow
Using dosbox-x to emulate win9x is painfully slow
-
- Posts: 27225
- Joined: Tue Mar 25, 2014 12:40 pm
Re: Raspberry Pi 4 and QEMU (x86/x64)
snowballEarth wrote: ↑Fri Aug 14, 2020 3:41 pmWill anyone kindly upload the working, compiled qemu to the repositories?
Using dosbox-x to emulate win9x is painfully slow
https://github.com/ptitSeb/box86
https://www.hackster.io/news/run-x86-ga ... ab2ebefd51
Take what I advise as advice not the utopian holy grail, and it is gratis !!
-
- Posts: 95
- Joined: Wed Feb 18, 2015 9:05 pm
Re: Raspberry Pi 4 and QEMU (x86/x64)
Thanks for the help. Box86 will eventually be the best way to run individual x86 programs on arm, if it isn't already.fruitoftheloom wrote: ↑Fri Aug 14, 2020 4:33 pm
https://github.com/ptitSeb/box86
https://www.hackster.io/news/run-x86-ga ... ab2ebefd51
I'm following the latest magpi96 guide to run the entire windows 98 operating system on the pi 4, using dosbox-x. It takes hours just to install one set of drivers. From what I've played with so far win98 is kind of usable after initial setup, if you stick to simple apps.
I've seen reports and watched YouTube videos of win 98 running better through qemu though. So if anyone has a guide on installing win9x on qemu
-
- Posts: 24
- Joined: Tue Oct 20, 2020 3:12 pm
Re: Raspberry Pi 4 and QEMU (x86/x64)
I have compiled and packaged debian packages of qemu 5.2.50:snowballEarth wrote: ↑Fri Aug 14, 2020 3:41 pmWill anyone kindly upload the working, compiled qemu to the repositories?
Using dosbox-x to emulate win9x is painfully slow
armhf: https://archive.org/download/macos_921_ ... -armhf.deb
arm64: https://archive.org/download/macos_921_ ... _arm64.deb
if you don't want to download those debs because of security reasons, I compiled qemu using those steps:
armhf:
compiled and packaged using my script: https://github.com/Itai-Nelken/qemu2deb ... ses/latest
if you want to see the exact steps to compile, see the arm64 steps or read my script.
arm64:
the following steps will compile all qemu machine types, and will take ~1 hour on a ssd and ~1-2 hours on a sd card.
Code: Select all
sudo apt install build-essential ninja-build libepoxy-dev libdrm-dev libgbm-dev libx11-dev libvirglrenderer-dev libpulse-dev libsdl2-dev git libglib2.0-dev libfdt-dev libpixman-1-dev zlib1g-dev libepoxy-dev libdrm-dev libgbm-dev libx11-dev libvirglrenderer-dev libpulse-dev libsdl2-dev git
git clone https://git.qemu.org/git/qemu.git
cd qemu
git submodule init
git submodule update --recursive
./configure --enable-sdl --enable-opengl --enable-virglrenderer --enable-system --enable-modules --audio-drv-list=pa --enable-kvm
ninja -C build
sudo ninja install -C build
armhf: https://archive.org/download/macos_921_ ... _armhf.deb
arm64: https://archive.org/download/macos_921_ ... _arm64.deb)
replace 'sudo ninja install -C build' with 'sudo checkinstall'.
Re: Raspberry Pi 4 and QEMU (x86/x64)
Hi,itainelken wrote: ↑Wed Feb 24, 2021 4:45 pmI have compiled and packaged debian packages of qemu 5.2.50:snowballEarth wrote: ↑Fri Aug 14, 2020 3:41 pmWill anyone kindly upload the working, compiled qemu to the repositories?
Using dosbox-x to emulate win9x is painfully slow
armhf: https://archive.org/download/macos_921_ ... -armhf.deb
arm64: https://archive.org/download/macos_921_ ... _arm64.deb
if you don't want to download those debs because of security reasons, I compiled qemu using those steps:
armhf:
compiled and packaged using my script: https://github.com/Itai-Nelken/qemu2deb ... ses/latest
if you want to see the exact steps to compile, see the arm64 steps or read my script.
arm64:
the following steps will compile all qemu machine types, and will take ~1 hour on a ssd and ~1-2 hours on a sd card.to make a deb, I used checkinstall (from here: https://github.com/giuliomoro/checkinstall, I have made a deb for it here:Code: Select all
sudo apt install build-essential ninja-build libepoxy-dev libdrm-dev libgbm-dev libx11-dev libvirglrenderer-dev libpulse-dev libsdl2-dev git libglib2.0-dev libfdt-dev libpixman-1-dev zlib1g-dev libepoxy-dev libdrm-dev libgbm-dev libx11-dev libvirglrenderer-dev libpulse-dev libsdl2-dev git git clone https://git.qemu.org/git/qemu.git cd qemu git submodule init git submodule update --recursive ./configure --enable-sdl --enable-opengl --enable-virglrenderer --enable-system --enable-modules --audio-drv-list=pa --enable-kvm ninja -C build sudo ninja install -C build
armhf: https://archive.org/download/macos_921_ ... _armhf.deb
arm64: https://archive.org/download/macos_921_ ... _arm64.deb)
replace 'sudo ninja install -C build' with 'sudo checkinstall'.
I'm trying to get qemu working on the pi 400. I am running Ubuntu Mate 21.04. Do you know if the official repos contain a working qemu or are they still broke? Anyway I went ahead and installed it anyway.
I tried downloading your compiled qemu 5.2.50 from your post but the link is dead.
I am running this from the cmd line:
$ qemu-system-aarch64 -m 512 -nic user,model=virtio -drive file=alpine.qcow2,media=disk,if=virtio -cdrom alpine-standard-3.14.1-aarch64.iso -sdl
I get 'qemu-system-aarch64: -sdl: SDL support is disabled'
When I remove the sdl switch I get:
'qemu-system-aarch64: No machine specified, and there is no default. Use -machine help to list supported machines'
I'm pretty new to qemu as you can tell but I would love to get it working on my pi 400.
Any ideas?
Cheers.
-
- Posts: 7791
- Joined: Sat Aug 18, 2012 2:33 pm
Re: Raspberry Pi 4 and QEMU (x86/x64)
I compiled QEMU 6.0.9 arm/aarch64 recently, easier than I expected.
Have not tried the x86 version.
Would be fun if I had the time, maybe next lockdown?
Have not tried the x86 version.
Would be fun if I had the time, maybe next lockdown?
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges
Raspberries are not Apples or Oranges
Re: Raspberry Pi 4 and QEMU (x86/x64)
Ok I'm confused. Does x86 Qemu work on pi 4? What am I missing? So if I want to run an x86 distro under pi 4 with Qemu I need to use x86 Qemu?cleverca22 wrote: ↑Wed Aug 18, 2021 6:32 pmyour running the aarch64 qemu, but this thread is about the x86 qemu
Re: Raspberry Pi 4 and QEMU (x86/x64)
QEMU on Pi can easy do arm and aarch64.
Need to have a x86 "guest" to emulate a PC.
Plenty of search results for arm/aarch64 "guest on PC/x86x64...
For 32bit Pi's - Arm Platform with x86 guest.
Should be able to do DOS/Win3?
I think I used this and ended up with arm and aarch64 guests.
https://www.qemu.org/download/
Play a bit more with configure and get an X86 guest too?
Need to have a x86 "guest" to emulate a PC.
Plenty of search results for arm/aarch64 "guest on PC/x86x64...
For 32bit Pi's - Arm Platform with x86 guest.
Should be able to do DOS/Win3?
I think I used this and ended up with arm and aarch64 guests.
https://www.qemu.org/download/
Play a bit more with configure and get an X86 guest too?
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges
Raspberries are not Apples or Oranges
Re: Raspberry Pi 4 and QEMU (x86/x64)
Very interesting had a look at./configure again, lots of guest
"qemu-x86_64 -h" popped up the help and so did many others
Seems like I have a lot of guests.
Do I have cross compilers for all of them
"qemu-x86_64 -h" popped up the help and so did many others
Seems like I have a lot of guests.
Do I have cross compilers for all of them

Code: Select all
aarch64-softmmu alpha-softmmu arm-softmmu avr-softmmu cris-softmmu hppa-softmmu i386-softmmu m68k-softmmu microblaze-softmmu microblazeel-softmmu mips-softmmu mips64-softmmu mips64el-softmmu mipsel-softmmu nios2-softmmu or1k-softmmu ppc-softmmu ppc64-softmmu riscv32-softmmu riscv64-softmmu rx-softmmu s390x-softmmu sh4-softmmu sh4eb-softmmu sparc-softmmu sparc64-softmmu tricore-softmmu x86_64-softmmu xtensa-softmmu xtensaeb-softmmu aarch64-linux-user aarch64_be-linux-user alpha-linux-user arm-linux-user armeb-linux-user cris-linux-user hexagon-linux-user hppa-linux-user i386-linux-user m68k-linux-user microblaze-linux-user microblazeel-linux-user mips-linux-user mips64-linux-user mips64el-linux-user mipsel-linux-user mipsn32-linux-user mipsn32el-linux-user nios2-linux-user or1k-linux-user ppc-linux-user ppc64-linux-user ppc64le-linux-user riscv32-linux-user riscv64-linux-user s390x-linux-user sh4-linux-user sh4eb-linux-user sparc-linux-user sparc32plus-linux-user sparc64-linux-user x86_64-linux-user xtensa-linux-user xtensaeb-linux-user
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges
Raspberries are not Apples or Oranges
Re: Raspberry Pi 4 and QEMU (x86/x64)
Thanks for your help.Gavinmc42 wrote: ↑Thu Aug 19, 2021 12:01 pmQEMU on Pi can easy do arm and aarch64.
Need to have a x86 "guest" to emulate a PC.
Plenty of search results for arm/aarch64 "guest on PC/x86x64...
For 32bit Pi's - Arm Platform with x86 guest.
Should be able to do DOS/Win3?
I think I used this and ended up with arm and aarch64 guests.
https://www.qemu.org/download/
Play a bit more with configure and get an X86 guest too?
So I could use aarch64 qemu on my pi 4 to run a VM of Ubuntu 21.04 arm64 version?
Re: Raspberry Pi 4 and QEMU (x86/x64)
Probably, but don't expect a desktop.So I could use aarch64 qemu on my pi 4 to run a VM of Ubuntu 21.04 arm64 version?
I have not run a 64bit VM on Pi OS 32.
I did run 7 small Ultibo VMs at once, so one bigger VM OS should work.
Try it out and seen what happens.
This is all pretty new territory to explore.
I do know running 32 bit on Aarch64 is easier, so maybe use the 64bit Beta Raspberry OS.
Or just use the latest Ubuntu on Pi.
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges
Raspberries are not Apples or Oranges