Skip to content

Releases: binarymaster/qemu

v6.2.0-winrt-v3

13 May 20:57
Compare
Choose a tag to compare

QEMU that can emulate Windows on ARM (Windows RT)

Patched version by @driver1998 plus new UEFI firmware.

Fixed issues in this release:

  • SD card performance problem (slow boot)

Prebuilt QEMU binaries are compiled with MSYS/MinGW64 for Windows x64 host.

While testing, make sure to use firmware binary from this release.

Configuration with boot priority: 1) SD card, 2) USB disk

This is how you install WoA from WinPE disk image, and then boot the system.

@echo off
set HDD=sdcard.vhd
set USB=winpe9600.vhd

qemu-system-arm ^
-M virt,highmem=false ^
-cpu cortex-a15 ^
--accel tcg,thread=multi ^
-m 2G ^
-bios QEMU_EFI_1512_driver1998.fd ^
-device VGA ^
-device usb-kbd,id=kbd ^
-device usb-tablet,id=mice ^
-drive id=mydrive,if=none,file=%HDD% -device sd-card,drive=mydrive ^
-drive id=usbstick,if=none,file=%USB% -device usb-storage,drive=usbstick ^
-rtc base=2013-07-15,clock=vm
Configuration with boot priority: 1) USB CD-ROM, 2) SD card

This is how you install WoA from CD/DVD ISO image, and then boot the system.

@echo off
set ISO=9600.17053.winblue_refresh.141120-0031_woafre_client_CoreARM_O15_en-us-IR5_CCSA_WOAFRER_EN-US.iso
set HDD=sdcard.vhd

qemu-system-arm ^
-M virt,highmem=false ^
-cpu cortex-a15 ^
--accel tcg,thread=multi ^
-m 2G ^
-bios QEMU_EFI_1512_driver1998.fd ^
-device VGA ^
-device usb-kbd,id=kbd ^
-device usb-tablet,id=mice ^
-drive id=usbcdrom,if=none,media=cdrom,format=raw,file=%ISO%,readonly=on -device usb-storage,drive=usbcdrom ^
-drive id=mydrive,if=none,file=%HDD% -device sd-card,drive=mydrive ^
-rtc base=2013-07-15,clock=vm

Result should look like this: https://twitter.com/x86corez/status/1523303255438028800

Tested Windows on ARM builds
  • Windows RT beta - build 6.2.8330.0.armfre.fbl_woa.120424-2227
    • ❌ Windows PE - hangs on boot logo
    • ✔️ Full installation (works, however boot is not stable)
  • Windows RT beta - build 6.2.8422.0.armfre.fbl_woa.120524-2000
    • ❌ Windows PE - not bootable
    • ✔️ Full installation (works, but not stable at all - harder to install than build 8330)
  • Windows RT beta - build 6.2.8513.0.armfre.win8_gdr_soc_ti.120710-2000
    • Error Code: 0x0000005C (0x00000110, 0x05250631, 0x00000014, 0xC0000001) - both PE and full installation
  • Windows RT - build 6.2.9200.16551.armfre.win8_gdr.130306-1502 (Surface RT 8.0 North America recovery)
    • ❌ Windows PE - hangs on boot logo
    • ❌ Full installation - Error Code: 0x0000005C (0x00000110, 0x05250631, 0x00000014, 0xC0000001)
  • Windows RT 8.1 - build 6.3.9600.16452.armfre.winblue_gdr.131030-1505
    • ❌ KMODE_EXCEPTION_NOT_HANDLED - both PE and full installation (SurfaceRT_BMR_10.8.17.0 recovery)
    • ❌ KMODE_EXCEPTION_NOT_HANDLED - both PE and full installation (SurfaceRT_BMR_20.8.17.0 recovery)
  • Windows RT 8.1 - build 6.3.9600.17328.armfre.winblue_r3.140827-1500
    • ✔️ Windows PE
    • ✔️ Full installation
  • Windows 10 Enterprise - build 10.0.15035.0.woafre.rs2_release.170209-1535
    • ✔️ Windows PE
    • ✔️ Full installation
  • Windows 10 Polaris - build 10.0.16299.241.armfre.rs3_release_svc_sec.180102-2128
    • ✔️ POLARIS_BOOT - boots to Windows logo
    • ✔️ POLARIS_INSTALL - boots to black screen
  • Windows 10 PE - build 10.0.17763.1.armfre.rs5_release.180914-1434
    • ❌ Hangs on boot logo
  • Windows Server 2016 Datacenter Nano - build 10.0.20308.1.armfre.fe_release.210305-1700
    • ❌ ContainerOS - not bootable
    • ❌ UtilityVM - not bootable

Known issues:

  • USB EHCI emulation is not perfect and may get broken, especially during installation
    • Workaround to fix input, enter commands in compatmonitor0:
    • Reattach keyboard: device_del kbd then device_add usb-kbd,id=kbd
    • Reattach mouse: device_del mice then device_add usb-tablet,id=mice
  • Older beta builds like 8330 and 8422 will throw an exception on reboot
    • It may be a problem with ResetSystemLib - need to double check
  • Works only on 1 CPU core, it's possible to add more, but they are not being started:
    • ACPI MADT table is missing
    • MpPark protocol is not implemented in CPU
    • WFI has to be handled
    • Each CPU should have own GIC
  • Not tested on Linux with KVM yet, maybe SMP will work there

Appendix A - building UEFI firmware:

UEFI firmware was built on Debian 11 with GCC 11.

git clone https://github.com/driver1998/edk2-winrt
cd edk2-winrt
make -C BaseTools
source edksetup.sh
export GCC49_ARM_PREFIX=arm-linux-gnueabihf-
build -a ARM -t GCC49 -b RELEASE -p ArmVirtPkg/ArmVirtQemuWinRt.dsc

v6.2.0-winrt-v2

08 May 20:50
Compare
Choose a tag to compare

See the latest release, this one is outdated now.

Archival # QEMU that can emulate Windows on ARM (Windows RT)

Patched version by @driver1998 plus new UEFI firmware.

Fixed issues in this release:

  • Keyboard is now working in UEFI
  • UEFI now can boot from:
    • SD card (this is our HDD)
    • USB thumbdrive
    • USB CD/DVD-ROM

Prebuilt QEMU binaries are compiled with MSYS/MinGW64 for Windows x64 host.

While testing, make sure to use firmware binary from this release.

Configuration with boot priority: 1) SD card, 2) USB disk

This is how you install WoA from WinPE disk image, and then boot the system.

@echo off
set HDD=sdcard.vhd
set USB=winpe9600.vhd

qemu-system-arm ^
-M virt,highmem=false ^
-cpu cortex-a15 ^
--accel tcg,thread=multi ^
-m 2G ^
-bios QEMU_EFI_1512_driver1998.fd ^
-device VGA ^
-device usb-kbd ^
-device usb-tablet ^
-drive id=mydrive,if=none,file=%HDD% -device sd-card,drive=mydrive ^
-drive id=usbstick,if=none,file=%USB% -device usb-storage,drive=usbstick ^
-rtc base=2013-07-15,clock=vm
Configuration with boot priority: 1) USB CD-ROM, 2) SD card

This is how you install WoA from CD/DVD ISO image, and then boot the system.

@echo off
set ISO=9600.17053.winblue_refresh.141120-0031_woafre_client_CoreARM_O15_en-us-IR5_CCSA_WOAFRER_EN-US.iso
set HDD=sdcard.vhd

qemu-system-arm ^
-M virt,highmem=false ^
-cpu cortex-a15 ^
--accel tcg,thread=multi ^
-m 2G ^
-bios QEMU_EFI_1512_driver1998.fd ^
-device VGA ^
-device usb-kbd ^
-device usb-tablet ^
-drive id=usbcdrom,if=none,media=cdrom,format=raw,file=%ISO%,readonly=on -device usb-storage,drive=usbcdrom ^
-drive id=mydrive,if=none,file=%HDD% -device sd-card,drive=mydrive ^
-rtc base=2013-07-15,clock=vm

Result should look like this: https://twitter.com/x86corez/status/1523303255438028800

Tested Windows on ARM builds:

  • Windows RT beta - build 6.2.8330.0.armfre.fbl_woa.120424-2227
    • ❌ Windows PE
    • ✔️ Full installation (works, albeit very unstable)
  • Windows RT 8.1 - build 6.3.9600.17328.armfre.winblue_r3.140827-1500
    • ✔️ Windows PE
    • ✔️ Full installation
  • Windows 10 Enterprise - build 10.0.15035.0.woafre.rs2_release.170209-1535
    • ✔️ Windows PE
    • ✔️ Full installation

Known issues:

  • Booting from SD card is slow, you may think the OS is hung (give it some time)
  • USB EHCI emulation is not perfect and may get broken, especially during installation
  • Works only on 1 CPU core, it's possible to add more, but they are not being started:
    • ACPI MADT table is missing
    • MpPark protocol is not implemented in CPU
    • WFI has to be handled
    • Each CPU should have own GIC
  • Not tested on Linux with KVM yet, maybe SMP will work there

Appendix A - building UEFI firmware:

UEFI firmware was built on Debian 11 with GCC 11.

git clone https://github.com/driver1998/edk2-winrt
cd edk2-winrt
make -C BaseTools
source edksetup.sh
export GCC49_ARM_PREFIX=arm-linux-gnueabihf-
build -a ARM -t GCC49 -b RELEASE -p ArmVirtPkg/ArmVirtQemuWinRt.dsc

v6.2.0-winrt

08 May 14:52
Compare
Choose a tag to compare

See the latest release, this one is outdated now.

Archival Patched version by @driver1998.

Prebuilt binaries are compiled with MSYS/MinGW64 for Windows x64 host.

@echo off
set WINPE=winpe9600.vhd
set HDD=sdcard.vhd

qemu-system-arm ^
-M virt,highmem=false ^
-cpu cortex-a15 ^
--accel tcg,thread=multi ^
-m 2G ^
-bios QEMU_EFI_1512.fd ^
-device VGA ^
-device usb-kbd ^
-device usb-tablet ^
-device usb-storage,drive=usbstick -drive id=usbstick,if=none,file=%WINPE% ^
-device virtio-scsi-pci,id=scsi0 -drive if=virtio,file=%WINPE% ^
-drive id=mydrive,if=none,file=%HDD% -device sd-card,drive=mydrive ^
-rtc base=2013-07-15,clock=vm
  • How to boot WoA that you have deployed/installed:
@echo off
set HDD=sdcard.vhd

qemu-system-arm ^
-M virt,highmem=false ^
-cpu cortex-a15 ^
--accel tcg,thread=multi ^
-m 2G ^
-bios QEMU_EFI_1512.fd ^
-device VGA ^
-device usb-kbd ^
-device usb-tablet ^
-device virtio-scsi-pci,id=scsi0 -drive if=virtio,file=%HDD% ^
-drive id=mydrive,if=none,file=%HDD% -device sd-card,drive=mydrive ^
-rtc base=2013-07-15,clock=vm

Result should look like this: https://twitter.com/x86corez/status/1523303255438028800

How this technically works:

  1. Insert the same disk image into both SD card and VirtIO HDD
  2. UEFI recognizes VirtIO and boots from it
  3. Windows does not see VirtIO but does see SD card
  4. UEFI did not recognized SD card, so it only reported one HDD controller to the OS
  5. Windows does not go mad and proceeds to boot

Tested Windows on ARM builds:

  • ✔️ Windows RT 8.1 - build 6.3.9600.17328.armfre.winblue_r3.140827-1500
  • ✔️ Windows 10 Enterprise - build 10.0.15035.0.woafre.rs2_release.170209-1535
  • ❌ Windows RT beta - build 6.2.8330.0.armfre.fbl_woa.120424-2227

Known issues:

  • Keyboard will not work in UEFI
  • UEFI only can boot from VirtIO, but we're doing a trick here
  • USB EHCI emulation is not perfect and may get broken, especially during installation
  • Works only on 1 CPU core, it's possible to add more, but they are not being detected