User:Pivotman319/Sandbox/7000ARMDoc

Prerequisites[edit | edit source]

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

  • The QEMU v6.1.0 Tegra 2 WoA fork that simulates a real-world Nvidia Tegra 250 development kit, modified to run early Windows on ARM builds
    • As of writing, continuous integration (CI) is currently only set up to automatically produce Windows builds. The fork must be manually compiled from source if using a different operating system platform like macOS or Linux.
  • The required patched EFI firmware capsule images (originally from build 7822), to be placed in the QEMU installation directory in a new folder labeled fw
  • Two virtual hard disk images (for storing the installation media and the OS install)

Precautions[edit | edit source]

  • The emulator may quit when a system reboot is initiated. This is an intentional design decision implemented by Microsoft as restarts are treated as full shutdowns by the Tegra 250 HAL, and cannot be worked around.
  • In rare edge cases, Secure Digital MultiMediaCard (SDMMC) emulation may not be reliable and can possibly corrupt the main OS disk partition midway through image deployment or feature staging. Re-attempting the below instructions by first formatting the main OS partition and then modifying the setup BCD store to use one CPU core (located as EFI\Microsoft\Boot\BCD in the installation media) via the following command:
    bcdedit /offline /store M:\EFI\Microsoft\Boot\BCD /set {default} NUMPROC 1
    
may help significantly improve the chances of a successful installation, at the expense of additional time due to the lack of multi-threading.
  • 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
    
  • For builds prior to 7957 (excluding builds 7792 and 7822), it is critical that the Windows Setup boot image be substituted with the Windows Preinstallation Environment image from the original partner drop (ordinarily located in the winpe or woape directories), as the Setup boot image does not contain the required hardware abstraction layer (HAL) extensions, and will therefore cause the operating system to immediately bugcheck with code HAL_INITIALIZATION_FAILED as soon as the boot sequence starts.

Instructions[edit | edit source]

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

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

create vdisk file="C:\ARM8\Setup.vhd" maximum=4096 type=expandable
select vdisk file="C:\ARM8\Setup.vhd"
attach vdisk
convert gpt
create partition primary
format quick fs=fat32 label=INSTALL
assign letter=M
create vdisk file="C:\ARM8\Main.vhd" maximum=65536 type=expandable
select vdisk file="C:\ARM8\Main.vhd"
attach vdisk
convert gpt
create partition efi size=100
format quick fs=fat32 label=EFIESP
create partition primary
format quick fs=ntfs label=MainOS
assign letter=P
exit

Depending on your desired build flavor (free or checked), copy the contents of the installation media over to the INSTALL partition. Extract the needed EFI boot manager (\Windows\Boot\EFI\bootmgfw.efi) from the Windows PE or Windows Setup boot image to INSTALL, as EFI\Boot\bootarm.efi.

Eject all currently attached virtual disks from the machine, and 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 and FWType with either the 78xx variant firmware (for early builds up to 7898) or the multi variant (for builds 7898 through Windows 8 build 7996):[a]

set BL=".\fw\HARMONY.fd.FWType"
set MAIN="C:\ARM8\Main.vhd"
set SETUP="C:\ARM8\Setup.vhd"

qemu-system-arm ^
    -M tegra2-qemu -m 1G -accel tcg,thread=multi ^
    -bootloader %BL% ^
    -device usb-tablet,id=mouse -device usb-kbd,id=kbd ^
    -drive if=sd,index=1,format=vpc,file=%SETUP% ^
    -drive if=sd,index=0,file=%MAIN% ^
    -serial null -nic none ^
    -s ^

Start installing the operating system. Setup must be directly invoked from the original installation media as the version in the OS boot image does not function. The following command may be used to start the installation process:

start D:\sources\setup.exe

Immediately after completing the first phase of setup, remove the SD slot for the installation media and boot into the operating system by using the below batch script configuration:[a]

set BL=".\fw\HARMONY.fd.FWTYPE"
set MAIN="C:\ARM8\Main.vhd"

qemu-system-arm ^
    -M tegra2-qemu -m 1G -accel tcg,thread=multi ^
    -bootloader %BL% ^
    -device usb-tablet,id=mouse -device usb-kbd,id=kbd ^
    -drive if=sd,index=0,file=%MAIN% ^
    -serial null -nic none ^
    -s ^

Continue installing the operating system through normal means.
Cite error: <ref> tags exist for a group named "lower-alpha", but no corresponding <references group="lower-alpha"/> tag was found