Longene

Linux Unified Kernel

Longene 0.2.1
Developer Insigma Technology
Written in C
OS family Hybrid: Linux-like and Windows-like
Source model Open source
Latest preview 1.0-rc2 / January 16, 2014 (2014-01-16)
Marketing target Personal computing
Available in Multilingual
Platforms IA-32, x86-64
Kernel type Hybrid (Linux kernel and designed to be compatible with Windows NT)
License GNU GPL v2
Official website www.longene.org/en/index.php

Longene[1] 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).

Although the project is in the alpha stage of development as of 2015, 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 Longene project does not develop the Windows and the Linux userland libraries. Those libraries are offered by others projects, such as Wine, ReactOS, GNU, and NDISwrapper.[2]

Development

In September 2005, the Longene project gained sponsorship from Insigma Technology (浙大网新), a China-based IT consulting corporation. The project leader, Decao Mao (毛德操), proposed the idea and route of the Longene. 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 Longene. The articles Mao wrote were then compiled to form the white paper of the project.

According to the white paper, to implement the Longene, one needs to add several parts to the Linux kernel:

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.

Version history

An earlier version, unifiedkernel-2.6.13,[3] released in February 15, 2006. This version actualized the Windows system call mechanism.

color meaning
red Release no longer supported
yellow Release, supported
green Current release
blue Future release
Version Release date Release Information
0.1.0 April 30, 2006
  • kernel-win32 ported
  • Windows system call mechanism based on "int 2e"
0.2.0 December 1, 2006
  • Windows process/thread creating implemented
  • partial implementation of Windows APC mechanism
0.2.1 February 4, 2008
  • Windows process/thread management
  • virtual memory management
  • synchronization
  • object management
  • built-in EXE loading function
0.2.2 October 31, 2008
  • Token mechanism
  • GUI installation program
0.2.2-1 December 17, 2008
  • bug fixes
0.2.3 February 12, 2009
  • Windows registry mechanism ported from Wine
0.2.4 May 22, 2009
  • file system management ported from Wine
  • partial implementation of registry management APIs
  • binary packages for popular distributions provided
0.2.4.1 August 31, 2009
  • based on Linux Kernel 2.6.30
  • support of new file systems (ext4 and others)
0.3 May 31, 2010
  • move all functions of wineserver into kernel space and get rid of wineserver
0.3.1 February 26, 2011
  • support non-root user
  • support apps Chinese path
0.3.2 June 8, 2011
  • support wineconsole, Windows console apps,such as cmd.exe can run like this way: wineconsole cmd.exe
  • improve the way of creation of process,so windows native-app and wine buitin-app can created by each other.
1.0-rc1 December 31, 2013
  • complete modification of the framework, the Longene is no longer needed kernel patch
  • Longene has supported SMP
  • more convenient installation, better compatibility, better stability
1.0-rc2 January 16, 2014
  • upgrade wine to version 1.7.10
  • solve ordinary users after the restart problem
  • solve several file permissions
  • modify file loading type
2.0[4] 2015
  • QEMU codes integration
  • support Windows applications running on an ARM machine

Current and future development

Developers are currently working on Longene 2.0, which will support the Windows applications run on non-x86 architecture machine, such as ARM architecture machine and Loongson architecture machine. And the developers are also working on the AMD64 support and porting NDISWrapper code to the project.

Not yet implemented (but planned):

Available Open Source resources

The Longene is based on the Linux kernel. It implements its functions in the Linux loadable kernel modules (LKMs). As opposed to ReactOS implementing functions from scratch, Longene exploits the abundant code and documentation of the Linux kernel to generate its functions. These are the main approaches to implementing the Windows mechanisms in Longene:
  1. System call interface – Some can be grafted to the appropriate Linux system calls, or partially reuse the code from corresponding Linux system calls, and the remnants have no counterpart in Linux require to use low-level Linux kernel functions to implement.
  2. Device driver framework – The device driver interrupt service register grafted to the Linux interrupt mechanism, the device drivers are concerned about running Windows kernel is mapped to the Linux kernel running on. Device driver will request DPC grafted into Linux-bh function mechanism.
  3. The Microsoft Windows native system files that are copyrighted by Microsoft — The category of .sys modules used for standard, basic, common external devices, such as disk, USB, graphics devices, network equipment and so on, there are corresponding functions in the Linux kernel. To drive those devices, it is only required to build a bridge and there is no need to create .sys modules. For the category of .sys modules that can not find the corresponding objects in the Linux kernel, emulation is required.
  4. Windows DDK – The majority of device driver interface function (as well as the data structure) have a counterpart in the Linux kernel. Some function in the Linux kernel does not correspond to relatively close objects, then use Linux kernel stuff to be built all kinds of material. The concrete approaches are, some resources calls and references can be mapped (redirect)/grafted (adapter) the Linux kernel on the counterpart, and the remnants required to realize.
ReactOS is a clone of MS Windows written from scratch. Longene uses ReactOS code as a reference to implement some basic mechanisms of the Microsoft Windows Operating System. That involves implementing the Windows device driver framework, NDIS, the system call interface, the process management and resource management, the device driver interface (Environment), etc.
Wine implements a compatibility layer, providing alternative implementations of the DLLs that Windows programs call, and processes to substitute for the Windows NT kernel. As opposed to Longene using the microkernel functions to implement Windows API in kernel space, Wine uses the macro host OS API to implement Windows API in userspace. Longene offers the Windows Process management, Thread management, Object management, etc., in kernel; Wine offers those by wineserver running in userspace.Longene depends on Wine for the user libraries (the .dll files). Most of Wine's DLLs can be used directly by Longene. Wine code (such as the Windows Registry table) can be referred to implement some functions. In the transitional state, Longene uses Wine to offer those functions that have not been completed yet.
Kernel-Win32 is a project intended to move some functions from the Wineserver into the Linux kernel to accelerate Wine. Longene project ported (and partly re-implemented) kernel-win32 into Longene to implement the Windows system call mechanism.
NDISWrapper recreated a partial Windows NT kernel inside a Linux kernel module, making it possible to execute modern Windows drivers inside the NT kernel box. NDISWrapper consists of a NTOSKRNL API, a basic WDM controller, and a set of Windows call wrappers such as Wireless/NDIS/USB/PnP to Linux APIs. NDISWrapper is not limited to executing only NDIS drivers; other WDM drivers can be used as long as the driver doesn't call unimplemented Windows API functions. The opening gambit of WDM of Longene will be to import NDISWrapper into Longene. Then the Longene project team implements its WDM via modifying NDISwrapper and adding functions into NDISWrapper with ReactOS code as a reference.
To run Windows applications on x86 architecture binary image directly on the ARM architecture, obviously have to be simulation. QEMU is an open source emulator on Linux that can run on Wine,but it is unacceptably slow. QEMU interpreted x86 instruction user space (including Wine instruction), it is just a case of system calls into the Linux kernel , where is the "original" running at full speed . General applications are running in the user period of time, less time to run into the kernel, so very slow. But if push it up the line to the Win API, namely those DLL provided by Wine, will run at full speed,then running speed should can significantly improve because most applications actually always spin in a DLL at runtime, and Wine those DLL is compiled into ARM mode. In this way that combine Wine and QEMU and put Wineserver's functions moved into the kernel, so be able to achieve the goal, this is the idea of Longjing 2.0.

Users

MagicLinux – MagicLinux is a Chinese Linux distribution based on Red Hat Linux. Version 2.1 of MagicLinux, released on December 15, 2008, includes a main version (DVD, with Linux kernel 2.6.25.20), a compact version (CD, with Linux kernel 2.6.25.20) and a Longene version (CD, with Longene 0.2.2).[5]

Hardware requirements

The minimum hardware requirements to run are:

Architecture support

See also

References

  1. Longene web site
  2. Linux unified kernel 0.2.4.1 "The LUK project does not develop the Windows and the Linux userland libraries. Those libraries are offered by the Wine (or Microsoft Windows/ReactOS) project and the Linux project."
  3. unifiedkernel-2.6.13
  4. Longene 2.0 will support the Windows applications run on non-x86 architecture machine
  5. Magic Linux 2.5 rc2 发布
This article is issued from Wikipedia - version of the Sunday, April 03, 2016. The text is available under the Creative Commons Attribution/Share Alike but additional terms may apply for the media files.