Windows Research Kernel

The Windows Research Kernel (WRK, Microsoft Windows Academic Operating System) is a portion of the source code of Windows Server 2003 Service Pack 1 kernel, which was released publicly in 2009. It was used primarily in universities, academies and scientific centers for investigating and researching the Windows NT kernel structure and working principles. 
WRK contains almost full realization of the Service Pack 1 kernel, with partially missing pieces (which can be recovered using the Windows Server 2003 RTM kernel and included libraries). Excluded sources are primarily in the areas of plug-and-play, power management, the device verifier, kernel debugger interface, and virtual DOS machine (VDM). Also, internal preliminary definitions and grammar mistakes have been fixed, and removed support for servers and IA-64 architecture. Specific build scripts resembling DDK also have been removed, and building is accomplished with simpler and hard coded NMake rules instead. 
== Description ==
Besides kernel source code, WRK includes following: 
* Hardware Abstraction Layers (HAL) and their PDB debugging files for:
** ACPI compatible EISA/ISA (halacpi.dll),
** ACPI 1.0 - APIC platform (halmacpi.dll),
** MPS 1.4 (halmps.dll),
* Other pre-compiled files, such as:
** VGA boot driver (bootvid.dll),
** SDBPAINT module,
** Resource file for ntoskrnl.exe (ntoskrnl.res), containing build number, build development branch and date of compilation,
* WRK specific libraries: ntoswrk.lib and ntosarch.lib. The ntoswrk.lib is the largest library in Research Kernel, as it contains numerous implementations of functionality not included as source code, such as HAL implementations and other corresponding functions of kernel. 
* Documentation for WRK compilation among with Windows Kernel internals,
* Bat script to copy WRK at specific destination.
The resulting image has a build number of 3800.1807, while the included HAL images contain the likely canonical build number - 3790.1807. It also bears a specific build lab — WRKP1.2(daveprobert), assuming that the WRK is published by Microsoft employee Dave Probert, who was working at Microsoft’s NT kernel subdivision as of compilation.
=== Compiling ===
To compile WRK, you must initiate it's environment primarily at C:\WRK-v1.2, by copying or extracting that folder in root of C:\ or another disk you prefer. Next, open Command Prompt (cmd.exe) and navigate to WRK folder, after which run command initializing environment:
C:\WRK-v1.2>wrkenv.bat [x86 or amd64]
If you won't specify any architecture, by default WRK environment will initialize itself for x86 machines, but you can append amd64 at the end of command and run it for AMD64 systems.
After that, build WRK by running this command:
C:\WRK-v1.2>build.bat
This command will build kernel by using pure NMake ruleset and pre-compiled libraries. Resulted output will be stored on base\ntos\BUILD\EXE folder.
=== Booting ===
To run the kernel, a Windows XP Professional x64 Edition or Windows Server 2003 SP1 machine is required, because of the boot loader and session manager incremental changes, which resemble only SP1 versions and newer. Additional patches are need to run it on Windows XP SP1 and Windows Server 2003 RTM.
To boot the target system with WRK, the compiled kernel file must be copied (wrkx86.exe for x86, or wrkamd64.exe for AMD64). For x86 systems, it is also needed to copy halacpim.dll or other HAL files included in the WRK (such as halmacpi.dll and halmps.dll) into C:\Windows\System32.
Then, a new boot record in boot.ini should be created.
multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="WRK" /kernel=wrkx86.exe /hal=halacpim.dll
After adding the boot record, restart the virtual machine and choose the WRK boot entry.
Category:Windows Server 2003 builds