文档:在 QEMU 中安装早期基于 ARMv7 的 Windows RT 内部版本:修订间差异
跳转到导航
跳转到搜索
文档:在 QEMU 中安装早期基于 ARMv7 的 Windows RT 内部版本 (查看源代码)
2025 年 11 月 23 日 (日) 20:46 的版本
、 2025 年 11 月 23 日 (星期日)无编辑摘要
正义羊-JRJSheep(讨论 | 贡献) (→注意事项) |
正义羊-JRJSheep(讨论 | 贡献) 无编辑摘要 |
||
| 第 6 行: | 第 6 行: | ||
* 两个虚拟磁盘(用于存储安装介质以及系统安装) | * 两个虚拟磁盘(用于存储安装介质以及系统安装) | ||
<references group="如果不希望等待安装过程(可能会出现安装失败),可以选择离线使用ARM64系统stage ARM32系统或者是选择下载已经stage完毕的系统进行安装" /> | <references group="如果不希望等待安装过程(可能会出现安装失败),可以选择离线使用ARM64系统stage ARM32系统或者是选择下载已经stage完毕的系统进行安装" /> | ||
==== Prerequisites ==== | |||
The following requirements used in order to install this build onto a virtual machine are listed below: | |||
* The [https://github.com/Wack0/tegra2_qemu_woa QEMU v6.1.0 Tegra 2 WoA fork] that simulates a real-world [[w:Nvidia Tegra 250|Nvidia Tegra 250]] development kit, modified to run early Windows on ARM builds | |||
** As of 2025, continuous integration (CI) is currently only set up to automatically produce Windows builds. The fork must be manually compiled from source by using a different operating system like macOS or Linux. | |||
* The required [https://github.com/Wack0/tegra2_qemu_woa/releases/download/20240909/woa_t2_patched_uefi.zip patched EFI firmware capsule images] (originally from [[Windows 8 build 7822|build 7822]]), to be placed in the QEMU installation directory in a new folder named <code>fw</code> | |||
* Two virtual hard disk images (for storing the installation media and the OS install) | |||
=== 注意事项 === | === 注意事项 === | ||
| 第 18 行: | 第 25 行: | ||
* 对于 [[Windows 8 Build 7957.0.fbl_core1_kernel_npc.110302-1700|Build 7957]]之前的版本 (不包括 [[Windows_8 Build 7792.0.winmain.100802-1750|Build 7792]] 与 [[Windows_8_Build_7822.0.fbl_core1_kernel_npc_ext.100930-1700|7822]]), 需要将 [[Windows 安装程序]] wim 启动镜像替换为原始泄露压缩包中单独的 [[Windows 预安装环境]] wim 启动镜像 (一般位于 <code>winpe</code> 或者 <code>woape</code> 文件夹中), 原因为原始安装介质的启动必须驱动中缺少在Tegra 2 HAL启动所需的硬件抽象层(HAL)驱动, 启动会导致系统发生错误检查 <code>HAL_INITIALIZATION_FAILED</code> 。 | * 对于 [[Windows 8 Build 7957.0.fbl_core1_kernel_npc.110302-1700|Build 7957]]之前的版本 (不包括 [[Windows_8 Build 7792.0.winmain.100802-1750|Build 7792]] 与 [[Windows_8_Build_7822.0.fbl_core1_kernel_npc_ext.100930-1700|7822]]), 需要将 [[Windows 安装程序]] wim 启动镜像替换为原始泄露压缩包中单独的 [[Windows 预安装环境]] wim 启动镜像 (一般位于 <code>winpe</code> 或者 <code>woape</code> 文件夹中), 原因为原始安装介质的启动必须驱动中缺少在Tegra 2 HAL启动所需的硬件抽象层(HAL)驱动, 启动会导致系统发生错误检查 <code>HAL_INITIALIZATION_FAILED</code> 。 | ||
*此教程不适合 [[Windows 8 Build 7915.0.fbl core1 kernel npc ext.110131-1820|Build 7915]] 的启动,由于第一次泄露为德州仪器针对 OMAP4 设备进行设计,不适合在 tegra 2 设备运行,需要另一版本 QEMU 添加相关驱动进行修改后以运行此版本。 | *此教程不适合 [[Windows 8 Build 7915.0.fbl core1 kernel npc ext.110131-1820|Build 7915]] 的启动,由于第一次泄露为德州仪器针对 OMAP4 设备进行设计,不适合在 tegra 2 设备运行,需要另一版本 QEMU 添加相关驱动进行修改后以运行此版本。 | ||
==== Precautions ==== | |||
* 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, [[w:Secure Digital|Secure Digital]] [[w:MultiMediaCard|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 <code>EFI\Microsoft\Boot\BCD</code> in the installation media) via the command below may help significantly improve the chances of a successful installation, at the expense of additional time due to the lack of multi-threading:<syntaxhighlight lang="batch"> | |||
bcdedit /offline /store M:\EFI\Microsoft\Boot\BCD /set {default} NUMPROC 1 | |||
</syntaxhighlight> | |||
* 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 ({{key press|Ctrl|Alt|2}}) and run the following commands:<syntaxhighlight lang="batch"> | |||
device_del kbd | |||
device_add usb-kbd,id=kbd | |||
</syntaxhighlight> | |||
* For builds prior to [[Windows 8 build 7957|7957]] (excluding builds [[Windows 8 build 7792|7792]] and [[Windows 8 build 7822|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 <code>winpe</code> or <code>woape</code> 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 <code>HAL_INITIALIZATION_FAILED</code> as soon as the boot sequence starts. | |||
*This guide is not designed for build 7915 due to it being designed to run on Texas Instruments OMAP4 and won't run on the Tegra 2 QEMU. It is required to use QEMU-woa instead. | |||
===详细设置=== | ===详细设置=== | ||
| 第 80 行: | 第 99 行: | ||
在完成之后可以继续通过正常方式进行操作系统的 sysprep 阶段以及 OOBE 阶段。 | 在完成之后可以继续通过正常方式进行操作系统的 sysprep 阶段以及 OOBE 阶段。 | ||
===Instructions=== | |||
These instructions assume that the user has an elevated command prompt window open. | |||
Create the needed virtual disk images through the <code>diskpart</code> utility by running the below script; they will be created under a directory in the C: drive named <code>ARM8</code>. The <code>INSTALL</code>, <code>MainOS</code> and EFI system partitions will be respectively mounted under drive letters F and P. | |||
<syntaxhighlight lang="batch"> | |||
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 | |||
</syntaxhighlight> | |||
Depending on the users' desired build flavor (free or checked), copy the contents of the installation media over to the <code>INSTALL</code> partition. Extract the needed EFI boot manager (<code>\Windows\Boot\EFI\bootmgfw.efi</code>) from the [[Windows PE]] or [[Windows Setup]] boot image to <code>INSTALL</code>, as <code>EFI\Boot\bootarm.efi</code>. | |||
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 <code>YYYY-MM-DD</code> with a date which is prior to the build’s built-in [[timebomb]] expires and <code>FWType</code> with either the <code>78xx</code> variant firmware (for early builds up to [[Windows 8 build 7898|7898]]) or the <code>multi</code> variant (for builds 7898 through [[Windows 8 build 7996 (fbl_multimedia_media_sndproc)|build 7996]]):{{efn|name="quad2g"|If utilizing the quad-core variant of the Tegra 2 WoA fork, the machine configuration in the batch script must be modified to address 2 GB of RAM, and the patched <code>2g</code> EFI firmware capsules must also be used to start up the virtual machine. The <code>multi2g</code> combination can be used to immediately boot into builds 8020 through 8061; if this combination is not being used, then necessary registry modifications against the <code>SYSTEM</code> hive to load Tegra 2 HAL extension IDs <code>VEN_ra2.&DEV_0002</code> (<code>HalExtTegra2.dll</code>) and <code>VEN_ra2.&DEV_0003</code> (<code>HalExtTegra2Dma.dll</code>; in later builds, <code>HalExtTegraDma.dll</code>) are required.}} | |||
<syntaxhighlight lang="batch"> | |||
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=0,format=vpc,file=%SETUP% ^ | |||
-drive if=sd,index=1,file=%MAIN% ^ | |||
-serial null -nic none ^ | |||
-s ^ | |||
-rtc base=YYYY-MM-DD,clock=vm ^ | |||
</syntaxhighlight> | |||
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.<!-- staging doesn't work in build 7792 through ~mid-/late 78xx, and MS recommends starting setup from the install media per official documentation --> The following command may be used to start the installation process:<syntaxhighlight lang="batch"> | |||
start D:\sources\setup.exe | |||
</syntaxhighlight> | |||
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:{{efn|name="quad2g"}} | |||
<syntaxhighlight lang="batch"> | |||
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 ^ | |||
-rtc base=YYYY-MM-DD,clock=vm ^ | |||
</syntaxhighlight> | |||
Continue installing the operating system through normal means. | |||
===Notes=== | |||
{{notelist}} | |||