Closed oresttokovenko closed 3 years ago
@simonaque you'd be much better off compiling from source code: you should end up with an M1 native version then, instead of running through Rosetta 2.
Rosetta 2 is mostly fine, but according to Apple:
it doesn’t support the execution of some newer instruction sets and processor features, such as AVX, AVX2, and AVX512 vector instructions
This means that some applications optimised for modern X86-64 processors are not compatible with Apple Silicon out of the box.
If you compile from source code, you should avoid this issue.
@LukeUsher Thank you for the response! I tried that and got this far, any suggestions?
(base) ➜ ~ wget https://download.qemu.org/qemu-5.2.0.tar.xz
zsh: command not found: wget
(base) ➜ ~ git clone https://git.qemu.org/git/qemu.git
Cloning into 'qemu'...
remote: Counting objects: 536021, done.
remote: Compressing objects: 100% (97762/97762), done.
remote: Total 536021 (delta 441714), reused 529874 (delta 436699)
Receiving objects: 100% (536021/536021), 197.78 MiB | 4.04 MiB/s, done.
Resolving deltas: 100% (441714/441714), done.
Updating files: 100% (8010/8010), done.
(base) ➜ ~ cd qemu
(base) ➜ qemu git:(master) git submodule init
Submodule 'capstone' (https://git.qemu.org/git/capstone.git) registered for path 'capstone'
Submodule 'dtc' (https://git.qemu.org/git/dtc.git) registered for path 'dtc'
Submodule 'meson' (https://git.qemu.org/git/meson.git) registered for path 'meson'
Submodule 'roms/QemuMacDrivers' (https://git.qemu.org/git/QemuMacDrivers.git) registered for path 'roms/QemuMacDrivers'
Submodule 'roms/SLOF' (https://git.qemu.org/git/SLOF.git) registered for path 'roms/SLOF'
Submodule 'roms/edk2' (https://git.qemu.org/git/edk2.git) registered for path 'roms/edk2'
Submodule 'roms/ipxe' (https://git.qemu.org/git/ipxe.git) registered for path 'roms/ipxe'
Submodule 'roms/openbios' (https://git.qemu.org/git/openbios.git) registered for path 'roms/openbios'
Submodule 'roms/opensbi' (https://git.qemu.org/git/opensbi.git) registered for path 'roms/opensbi'
Submodule 'roms/qboot' (https://git.qemu.org/git/qboot.git) registered for path 'roms/qboot'
Submodule 'roms/qemu-palcode' (https://git.qemu.org/git/qemu-palcode.git) registered for path 'roms/qemu-palcode'
Submodule 'roms/seabios' (https://git.qemu.org/git/seabios.git/) registered for path 'roms/seabios'
Submodule 'roms/seabios-hppa' (https://git.qemu.org/git/seabios-hppa.git) registered for path 'roms/seabios-hppa'
Submodule 'roms/sgabios' (https://git.qemu.org/git/sgabios.git) registered for path 'roms/sgabios'
Submodule 'roms/skiboot' (https://git.qemu.org/git/skiboot.git) registered for path 'roms/skiboot'
Submodule 'roms/u-boot' (https://git.qemu.org/git/u-boot.git) registered for path 'roms/u-boot'
Submodule 'roms/u-boot-sam460ex' (https://git.qemu.org/git/u-boot-sam460ex.git) registered for path 'roms/u-boot-sam460ex'
Submodule 'roms/vbootrom' (https://git.qemu.org/git/vbootrom.git) registered for path 'roms/vbootrom'
Submodule 'slirp' (https://git.qemu.org/git/libslirp.git) registered for path 'slirp'
Submodule 'tests/fp/berkeley-softfloat-3' (https://git.qemu.org/git/berkeley-softfloat-3.git) registered for path 'tests/fp/berkeley-softfloat-3'
Submodule 'tests/fp/berkeley-testfloat-3' (https://git.qemu.org/git/berkeley-testfloat-3.git) registered for path 'tests/fp/berkeley-testfloat-3'
Submodule 'ui/keycodemapdb' (https://git.qemu.org/git/keycodemapdb.git) registered for path 'ui/keycodemapdb'
(base) ➜ qemu git:(master) git submodule update --recursive
Cloning into '/Users/oresttokovenko/qemu/capstone'...
Cloning into '/Users/oresttokovenko/qemu/dtc'...
Cloning into '/Users/oresttokovenko/qemu/meson'...
Cloning into '/Users/oresttokovenko/qemu/roms/QemuMacDrivers'...
Cloning into '/Users/oresttokovenko/qemu/roms/SLOF'...
Cloning into '/Users/oresttokovenko/qemu/roms/edk2'...
Cloning into '/Users/oresttokovenko/qemu/roms/ipxe'...
Cloning into '/Users/oresttokovenko/qemu/roms/openbios'...
Cloning into '/Users/oresttokovenko/qemu/roms/opensbi'...
Cloning into '/Users/oresttokovenko/qemu/roms/qboot'...
Cloning into '/Users/oresttokovenko/qemu/roms/qemu-palcode'...
Cloning into '/Users/oresttokovenko/qemu/roms/seabios'...
Cloning into '/Users/oresttokovenko/qemu/roms/seabios-hppa'...
Cloning into '/Users/oresttokovenko/qemu/roms/sgabios'...
Cloning into '/Users/oresttokovenko/qemu/roms/skiboot'...
Cloning into '/Users/oresttokovenko/qemu/roms/u-boot'...
Cloning into '/Users/oresttokovenko/qemu/roms/u-boot-sam460ex'...
Cloning into '/Users/oresttokovenko/qemu/roms/vbootrom'...
Cloning into '/Users/oresttokovenko/qemu/slirp'...
Cloning into '/Users/oresttokovenko/qemu/tests/fp/berkeley-softfloat-3'...
Cloning into '/Users/oresttokovenko/qemu/tests/fp/berkeley-testfloat-3'...
Cloning into '/Users/oresttokovenko/qemu/ui/keycodemapdb'...
Submodule path 'capstone': checked out 'f8b1b833015a4ae47110ed068e0deb7106ced66d'
Submodule path 'dtc': checked out '85e5d839847af54efab170f2b1331b2a6421e647'
Submodule path 'meson': checked out '776acd2a805c9b42b4f0375150977df42130317f'
Submodule path 'roms/QemuMacDrivers': checked out '90c488d5f4a407342247b9ea869df1c2d9c8e266'
Submodule path 'roms/SLOF': checked out 'e18ddad8516ff2cfe36ec130200318f7251aa78c'
Submodule path 'roms/edk2': checked out '06dc822d045c2bb42e497487935485302486e151'
Submodule path 'roms/ipxe': checked out '4bd064de239dab2426b31c9789a1f4d78087dc63'
Submodule path 'roms/openbios': checked out '7f28286f5cb1ca682e3ba0a8706d8884f12bc49e'
Submodule path 'roms/opensbi': checked out 'a98258d0b537a295f517bbc8d813007336731fa9'
Submodule path 'roms/qboot': checked out 'a5300c4949b8d4de2d34bedfaed66793f48ec948'
Submodule path 'roms/qemu-palcode': checked out 'bf0e13698872450164fa7040da36a95d2d4b326f'
Submodule path 'roms/seabios': checked out '155821a1990b6de78dde5f98fa5ab90e802021e0'
Submodule path 'roms/seabios-hppa': checked out '73b740f77190643b2ada5ee97a9a108c6ef2a37b'
Submodule path 'roms/sgabios': checked out 'cbaee52287e5f32373181cff50a00b6c4ac9015a'
Submodule path 'roms/skiboot': checked out '3a6fdede6ce117facec0108afe716cf5d0472c3f'
Submodule path 'roms/u-boot': checked out 'd3689267f92c5956e09cc7d1baa4700141662bff'
Submodule path 'roms/u-boot-sam460ex': checked out '60b3916f33e617a815973c5a6df77055b2e3a588'
Submodule path 'roms/vbootrom': checked out '0c37a43527f0ee2b9584e7fb2fdc805e902635ac'
Submodule path 'slirp': checked out '8f43a99191afb47ca3f3c6972f6306209f367ece'
Submodule path 'tests/fp/berkeley-softfloat-3': checked out 'b64af41c3276f97f0e181920400ee056b9c88037'
Submodule path 'tests/fp/berkeley-testfloat-3': checked out '5a59dcec19327396a011a17fd924aed4fec416b3'
Submodule path 'ui/keycodemapdb': checked out '6b3d716e2b6472eb7189d3220552280ef3d832ce'
(base) ➜ qemu git:(master) ./configure
zsh: ./configure: bad interpreter: /bin/sh^M: no such file or directory```
Hi @simonaque, building for the new M1 Apple Macs isn't supported yet, but should be working soon. I don't have this hardware myself, but I have been working with others who do and will try to get a build running for it that you can download soon. You are welcome to join the Discord server for updates about it.
@mborgerson thank you, I will look into it
@kl0wn can you please push your m1 patches to a branch on your repo that has this working for reference
This should be fixed now. Enjoy xemu on your M1 mac!
Error code below