Document:Installing 7xxx-series ARMv7 Windows 8 builds in QEMU

Prerequisites[edit | edit source]

The following requirements used in order to install this build onto a virtual machine are listed below:

  • A package containing a copy of QEMU v9.1 (modified for Windows RT compatibility), the needed EFI firmware and the required HAL extensions
    • For build 7915, a modified HAL and a pre-staged Ultimate edition image is also included in the above package and will be required for installation
    • For running QEMU under a host OS other than Windows (e.g. macOS on Apple Silicon), compile this QEMU fork from source using the standard QEMU build instructions for the users' system and use the built one instead of the one pre-included in the package. However, it is required to follow the below instructions on a Windows machine first before booting the final virtual disk image under another host system
  • One virtual hard disk image (for storing the operating system)

Precautions[edit | edit source]

  • USB HID device emulation is unstable and will occasionally result in devices failing to register any user inputs. To restore input, switch to the QEMU compatibility monitor (Ctrl+Alt+2) and run the following commands:
device_del kbd
device_add usb-kbd,id=kbd

Instructions[edit | edit source]

These instructions assume that the user has an elevated command prompt window open.

Create the needed virtual disk image through the diskpart utility by running the below script; they will be created under a directory in the C: drive named ARM8. The partitions will be respectively mounted under drive letters F and P.

create vdisk file="C:\ARM8\HDD.vhd" maximum=65536 type=expandable
select vdisk file="C:\ARM8\HDD.vhd"
attach vdisk
convert gpt
create partition efi size=100
format quick fs=fat32
assign letter=F
create partition primary
format quick fs=ntfs
assign letter=P
exit

Deploy the staged image and apply the generic product key by invoking the following DISM commands, then add the boot files to the EFI partition:

DISM /Apply-Image /ImageFile:"X:\path\to\install.wim" /ApplyDir:P:\ /Index:1
bcdboot "P:\Windows" /s F: /f UEFI

Modify the boot configuration data to allow the build to boot properly by adding the following BCD parameters:

SOS mode is not applicable for the Windows Preinstallation Environment and the second phase of setup.
bcdedit /store "F:\EFI\Microsoft\Boot\BCD" /set {bootmgr} TESTSIGNING ON
bcdedit /store "F:\EFI\Microsoft\Boot\BCD" /set {bootmgr} NOINTEGRITYCHECKS ON
bcdedit /store "F:\EFI\Microsoft\Boot\BCD" /set {emssettings} BOOTEMS OFF
bcdedit /store "F:\EFI\Microsoft\Boot\BCD" /set {default} EMS OFF
bcdedit /store "F:\EFI\Microsoft\Boot\BCD" /set {default} TESTSIGNING ON
bcdedit /store "F:\EFI\Microsoft\Boot\BCD" /set {default} NOINTEGRITYCHECKS ON
bcdedit /store "F:\EFI\Microsoft\Boot\BCD" /set {default} ADVANCEDOPTIONS ON
bcdedit /store "F:\EFI\Microsoft\Boot\BCD" /set {default} DETECTHAL NO
bcdedit /store "F:\EFI\Microsoft\Boot\BCD" /set {default} SOS TRUE

For build 7915 only: take ownership of the hardware abstraction layer DLL (hal.dll) and replace it with the patched version included as part of the package:

takeown /f P:\Windows\System32\hal.dll
icacls P:\Windows\System32\hal.dll /grant Users:F
xcopy /cherkyq X:\path\to\HALs\hal.dll P:\Windows\System32\hal.dll

Place the generic interrupt timer (EGIT) HAL extension (HalExtGit.dll) into the Windows\System32 directory, and mount the SYSTEM registry hive:

reg load HKLM\SysMount "P:\Windows\System32\config\SYSTEM"

Merge the below following values into the system registry to enable support for the generic interrupt timer HAL extension:

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SysMount\ControlSet001\Control\OsExtensionDatabase\VEN_ARM.&DEV_0001&REV_0000]
"HalExtension"="HalExtGit.dll"

Unmount the registry hive, eject the currently attached virtual disk from the machine, and then paste and run the contents of the below script onto a batch file within the QEMU installation directory, replacing YYYY-MM-DD with the build's compile date:

set MAIN="C:\ARM8\HDD.vhd"

qemu-system-arm ^
    -M virt,highmem=false,force_el3=false,force_psci=true,pci=false -cpu cortex-a15 -smp cores=1,threads=1 -m 2048 ^
    -device usb-kbd,id=kbd -device usb-tablet,id=mice ^
    -drive id=usbstick,if=none,file=%MAIN% -device usb-storage,drive=usbstick ^
    -bios fw\QEMU_EFI.fd -device VGA,vgamem_mb=4 ^
    -rtc base=YYYY-MM-DD,clock=vm ^
    --accel tcg,thread=multi

Select the "Disable Driver Signature Enforcement" option in the Advanced Options menu (this must be done for every system boot) and continue installing the operating system through normal means. The length of the installation process may take between a half-hour or an hour (depending on your system's specifications) due to current limitations preventing the OS from booting on two or more CPU threads.

Staging the operating system from scratch (by installing any edition from the official installation media) is left as an exercise for the reader.