Jump to content

Draft:OpenKernel

From The OpenXP Wiki
Revision as of 15:48, 27 August 2025 by Ashific (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

OpenKernel (also: OK, OpenWin), is an internal attempt to rewrite/rejuvenate Windows NT kernel to turn it more capable and modern, by integrating similar solutions implemented in MinWin and adding more features which doesn't exist in original NT project.

Originally OpenKernel's need have been raised in order to replace the Windows Server 2003's kernel with structurally same but different in approach kernel, which will fix most of compatibility issues for both old and new machines. This project doesn't have similar aims as ReactOS does, however, OpenKernel tends to be free for use and open-source. This approach will make OK eventually replace NT.

Structure

The pure basis of the OpenKernel would be the Server 2003 RTM + Windows Research Kernel. In contrary of original one, the IA-64 native support will be removed entirely, due to absence of this architecture and very rare opportunity of Intel Itanium machines. Also, the MinWin-ish approach is planned: kernel will turn more modular and expandable, among with dealing with culprits of undocumented routines and internally improving all sub-modules of kernel. The precise construction of kernel is following:

  • ntoskrnl.exe - unified kernel which combines all features of multi/uniprocessor machines. This will turn as ultimate replacement for ntkrnlmp.exe for multiprocessors too. The additional kernels will be added, but they will support relatively newer processor features,
  • kernelCore.dll - a pure grounding for exportable functions of kernel. This serves as a in-place replacement of KernelBase.dll and combines all functions from kernel32.dll and advapi32.dll files. The latter two will be delivered as stubs, which will route the necessary functions into kernel core,
  • kernelSchema.dll - schema orchestrating mechanism for adding additional APIs into system. This allows for third-party sides to create their custom Kernel Extension modules and therefore, use them when OpenKernel is loaded. Approach will allow to port newer Windows DLLs and functionality directly into OpenKernel without recompiling or rebuilding entire project,
  • hal.dll - enhanced and updated Hardware Abstraction Layer. Updated HAL will allow to run OpenKernel under ancient and modern hardware, by implementing custom HALs and adding new capabilities of ACPI, AHCI and many more components,
  • halSchema.dll - same approach of orchestrating custom HALs and their management for hal.dll, with practically same ability levels, only for Hardware Abstraction Layers.

Compilers

OpenKernel will be implemented by switching compilers stack: thus, the NASM will turn the direct replacement for Microsoft's MASM, which is proprietary and have Microsoft-specific instructions set. Also, the compiler will be switched into Tiny CC (aka TCC), in order to be cross-platform compatible and allow more enhanced ports into foreign architectures, e.g. ARM and RISC-V.

Also the ability to make ELF-compatible kernel is in plans too, for leveraging work in easier way and allowing better hot-patching mechanism for OpenKernel.

Sub-projects

Among with OpenKernel, additional projects will be developed in parallel, to enhance OpenKernel with additional functionality, ultimately replacing Windows NT ones. These projects will use same development principles and will be tied with OpenKernel as additional dependencies.

OpenCRT

OpenC(++) Language Runtime is a one-in replacement for MSVC Runtime, with extra functionality such as support for newer C(++) standards and libraries, cross-platform source code and easy integration in other operating systems, such as Linux-based ones, macOS and more. As a compatibility layer, msvcrt.dll and ucrtbase.dll will be provided as stubs linking to OpenCRT DLL files, additionally making runtime more reliable and faster.

Env

Env is a virtual environment which can initialize multiple virtual environments at once, work in completely separate environments in order to bypass system breaking capabilities. With enhancements of .env type files, the Env project will provide extra syntax features, turning it into a make-like syntax tuned platform. Env will be capable to replace legacy Razzle environment shipped with earlier versions of Windows NT.