Linux Unified Kernel
Linux Unified Kernel, also known as Longene[1] and informally as LUK, is an operating system kernel intended to be binary-compatible with application software and device drivers made for Microsoft Windows and Linux. In order to accomplish this, key features of the Windows kernel are ported to the Linux kernel.
Longene is written in the C programming language and is free and open source software. It is licensed under the terms of the GNU General Public License version 2 (GPLv2).
First release candidate for 1.0 version was published on December 31, 2013.[2] As it uses wineserver for unimplemented functions, many Windows programs already work well.
Features
Longene aims to add all Windows kernel mechanisms, including system calls, Windows Registry, Windows Driver Model, Deferred Procedure Call, and others, into the Linux kernel to form a new kernel. The new kernel will allow both Linux and Windows applications and device drivers to work without virtualization or emulation. In order to prevent bloating, if a function is available in both the ReactOS and Linux kernel, the Linux implementation is used. Functions are implemented using Linux loadable kernel modules, so they can be loaded and unloaded easily.
Longene has two sets of system calls and their corresponding tables: a Windows syscall set and a Linux syscall set. Windows applications call the syscall table via software interrupt "int 0x2e". Linux applications call the syscall table via "int 0x80".
The Linux Unified Kernel project does not develop the Windows and the Linux userland libraries. Those libraries are offered by others projects, such as Wine, ReactOS, GNU, Kernel-win32 (a former project intended to move some functions from the Wineserver into the Linux kernel to accelerate Wine, now hosted by the ReactOS team) and NDISwrapper.
Development
In September 2005, the Linux Unified Kernel project gained sponsorship from Insigma Technology, a China-based IT consulting corporation. The project leader, Decao Mao, proposed the idea and route of the Linux Unified Kernel. He wrote a series of articles about the market, the intellectual property rights and the techniques to explain why people needed the project and how to implement the Linux Unified Kernel. The articles Mao wrote were then compiled to form the white paper of the project.
According to the white paper, to implement the Linux Unified Kernel one needs to add several parts to the Linux kernel:
- A framework that matches the properties and requirements of Windows device drivers (i.e., the Windows device driver framework) so that multiple Windows device driver modules may be loaded into the kernel, while retaining their relationship and running conditions as in Windows.
- A set of export functions defined by Windows kernel export function interface (WDK). To device driver programs, these functions are like library functions provided by kernel.
- Windows native API. Microsoft did not open their native API, but "Windows NT/2000 Native API Reference" and other materials have unveiled this information. Implementing the Windows system API in the Linux kernel could be compared to the implementation of a high level language in assembly, because inside the kernel usable functions are not implemented by the external Linux kernel API anymore but by internal Linux kernel functions.
- The Linux Unified Kernel project produces patches for the Linux kernel to accomplish its goal. The project developers expect these patches to eventually merge into the Linux kernel main tree.[citation needed] Those who program on the Windows platform would then be able to develop applications and device drivers for the Linux platform or port their products to Linux platform with a low cost.
Development strategy
Longene uses Wine as a base for implementing the Windows API. The project re-implements Wine's modules for use as part of the joint kernel. Longene defers from using Wine modules that have not been sufficiently implemented for the project. Versions of Longene are released when several of the Wine modules have been successfully implemented into the kernel. The new stable version will then be used as a base for implementing future modules. Windows API that have not been implemented by Wine are developed into modules from scratch.
For device drivers, Longene imports NDISWrapper into the kernel. Modifications are made to NDISwrapper for missing functionality of the Windows Driver Model using ReactOS code as a reference. The Windows Driver Kit implementation is based on ReactOS code. It uses a combination of redirecting drivers to Linux kernel resources and additional libraries that implement functions that cannot be implemented in Linux.
Current and future development
Developers are currently working on moving all functions of wineserver into kernel space. The next version will get rid of wineserver, but Luk still depends on wine's dll files to run. And the developers are also working hard on the stabilization of SMP [9] and porting NDISWrapper code to the project.
The project's aim is a series of patches for the Linux kernel. The development team expects those patches to eventually merge into the Linux kernel main tree. In order to achieve this, developers are reducing the modifications to the main parts of the Linux kernel by moving code to loadable kernel modules.
In the future the following will be added:
- The WDM device driver framework
- System calls of the file system management
- APIs in registry management
- Various system call functions on the Windows system call interface
- The Windows DPC mechanism
- Exported kernel functions defined by Windows DDK
Architecture support
- IA-32 (working)
- x86-64 (not working, in progress)
- Loongson 3 (not working, in progress)
- The Loongson 3 port is expected to utilize new instructions for Hardware-assisted x86 emulation.
Longene can also be run on software which emulates or virtualizes the above hardware, such as VMware and VirtualBox.
See also
- Linux kernel
- ReactOS
- Wine
- NDISwrapper
- Microsoft Windows Services for UNIX
- Cooperative Linux
- Cygwin