HOME

TheInfoList



OR:

Longene ( zh, s=龙井) is a
Linux Linux ( ) is a family of open source Unix-like operating systems based on the Linux kernel, an kernel (operating system), operating system kernel first released on September 17, 1991, by Linus Torvalds. Linux is typically package manager, pac ...
-based
operating system An operating system (OS) is system software that manages computer hardware and software resources, and provides common daemon (computing), services for computer programs. Time-sharing operating systems scheduler (computing), schedule tasks for ...
kernel intended to be binary compatible with
application software Application software is any computer program that is intended for end-user use not operating, administering or programming the computer. An application (app, application program, software application) is any program that can be categorized as ...
and
device driver In the context of an operating system, a device driver is a computer program that operates or controls a particular type of device that is attached to a computer or automaton. A driver provides a software interface to hardware devices, enabli ...
s made for
Microsoft Windows Windows is a Product lining, product line of Proprietary software, proprietary graphical user interface, graphical operating systems developed and marketed by Microsoft. It is grouped into families and subfamilies that cater to particular sec ...
and Linux. As of 1.0-rc2, it consists of a Linux kernel module implementing aspects of the Windows kernel and a modified
Wine Wine is an alcoholic drink made from Fermentation in winemaking, fermented fruit. Yeast in winemaking, Yeast consumes the sugar in the fruit and converts it to ethanol and carbon dioxide, releasing heat in the process. Wine is most often made f ...
distribution designed to take advantage of the more native interface. Longene is written in the
C programming language C (''pronounced'' '' – like the letter c'') is a general-purpose programming language. It was created in the 1970s by Dennis Ritchie and remains very widely used and influential. By design, C's features cleanly reflect the capabilities of ...
and is
free and open source software Free and open-source software (FOSS) is software available under a Software license, license that grants users the right to use, modify, and distribute the software modified or not to everyone free of charge. FOSS is an inclusive umbrella term ...
. It is licensed under the terms of the
GNU General Public License The GNU General Public Licenses (GNU GPL or simply GPL) are a series of widely used free software licenses, or ''copyleft'' licenses, that guarantee end users the freedom to run, study, share, or modify the software. The GPL was the first ...
version 2 (GPLv2). Although the project is in the alpha stage of development as of 2015, many Windows programs already work well. Its official website was gone in August, but was restored in 2019. Meanwhile, the source code remains available on
GitHub GitHub () is a Proprietary software, proprietary developer platform that allows developers to create, store, manage, and share their code. It uses Git to provide distributed version control and GitHub itself provides access control, bug trackin ...
.


Features

Longene aims to add all Windows kernel mechanisms, including system calls,
Windows Registry The Windows Registry is a hierarchical database that stores low-level settings for the Microsoft Windows operating system and for applications that opt to use the registry. The kernel, device drivers, services, Security Accounts Manager, a ...
,
Windows Driver Model In computing, the Windows Driver Model (WDM) also known at one point as the Win32 Driver Model is a framework for device drivers that was introduced with Windows 98 and Windows 2000 to replace VxD, which was used on older versions of Windows su ...
, 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 Wine is an alcoholic drink made from Fermentation in winemaking, fermented fruit. Yeast in winemaking, Yeast consumes the sugar in the fruit and converts it to ethanol and carbon dioxide, releasing heat in the process. Wine is most often made f ...
,
ReactOS ReactOS is a Free and open-source software, free and open-source operating system for i586/amd64 personal computers that is intended to be binary-code compatibility, binary-compatible with computer programs and device drivers developed for Wind ...
, GNU, and NDISwrapper.


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: *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 Longene 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. 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. Since the Longene kernel does the work of the Windows NT kernel, Wine's own userspace kernel emulation (wineserver) is not needed. For device drivers, Longene imports NDISwrapper into the kernel. Modifications are made to NDISwrapper for missing functionality of the Windows Driver Model using
ReactOS ReactOS is a Free and open-source software, free and open-source operating system for i586/amd64 personal computers that is intended to be binary-code compatibility, binary-compatible with computer programs and device drivers developed for Wind ...
code as a reference. The Windows Driver Kit implementation is based on
ReactOS ReactOS is a Free and open-source software, free and open-source operating system for i586/amd64 personal computers that is intended to be binary-code compatibility, binary-compatible with computer programs and device drivers developed for Wind ...
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, released on February 15, 2006. This version actualized the Windows
system call In computing, a system call (syscall) is the programmatic way in which a computer program requests a service from the operating system on which it is executed. This may include hardware-related services (for example, accessing a hard disk drive ...
mechanism.


Current and future development

Developers are currently working on Longene 2.0, which will support Windows applications running on non-x86 architecture hardware, such as ARM and
Loongson Loongson () is the name of a family of general-purpose, MIPS architecture-compatible, later in-house LoongArch architecture central processing unit, microprocessors, as well as the name of the Chinese Fabless manufacturing, fabless company (Loo ...
. Additionally, the developers are working on AMD64 support and porting NDISWrapper code to the project. Not yet implemented (but planned): *
QEMU The Quick Emulator (QEMU) is a free and open-source emulator that uses dynamic binary translation to emulate a computer's processor; that is, it translates the emulated binary codes to an equivalent binary format which is executed by the mach ...
code integration *The WDM device driver framework *The Windows DPC mechanism *Exported kernel functions defined by Windows DDK


Available Open Source resources

;
Linux kernel The Linux kernel is a Free and open-source software, free and open source Unix-like kernel (operating system), kernel that is used in many computer systems worldwide. The kernel was created by Linus Torvalds in 1991 and was soon adopted as the k ...
: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 create its functions. These are the main approaches to implement Windows mechanisms in Longene: :#System call interface – Some of them can be taken from the appropriate Linux system calls, or partially reuse the code from corresponding Linux system calls. The rest that have no counterpart in Linux need to use low-level Linux kernel functions in their implementation. :#Device driver framework – The device driver interrupt service register is using the Linux interrupt mechanism, the device drivers perceive running Windows kernel, which is mapped to the Linux kernel running underneath. Device driver DPC requests are translated to Linux-bh functions. :#The Microsoft Windows native system files that are copyrighted by Microsoft — The category of .sys modules used for common external devices, such as disk, USB, graphics devices, network equipment and so on, for which 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 rest of .sys modules that have no the corresponding objects in the Linux kernel, an emulation is required. :#Windows DDK – The majority of device driver interface functions and data structures have counterparts in the Linux kernel. Some functions have no exact equivalent in the Linux kernel, and there is a need to build a wrapper using Linux kernel stuff. In practice, some resource calls and references can be redirected or adapted to Linux kernel counterparts, and the rest need to be implemented from scratch. ;
ReactOS ReactOS is a Free and open-source software, free and open-source operating system for i586/amd64 personal computers that is intended to be binary-code compatibility, binary-compatible with computer programs and device drivers developed for Wind ...
: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, etc. ;
Wine Wine is an alcoholic drink made from Fermentation in winemaking, fermented fruit. Yeast in winemaking, Yeast consumes the sugar in the fruit and converts it to ethanol and carbon dioxide, releasing heat in the process. Wine is most often made f ...
:Wine implements a
compatibility layer In software engineering, a compatibility layer is an interface that allows binaries for a legacy or foreign system to run on a host system. This translates system calls for the foreign system into native system calls for the host system. With s ...
, 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 :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 :NDISWrapper recreated a part of Windows NT kernel in a Linux kernel module, making possible to execute modern Windows drivers inside a Linux 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 first step of WDM implementation in Longene will be to import NDISWrapper into Longene. Then the Longene project team will implement its WDM via modifying NDISwrapper and adding functions into NDISWrapper with ReactOS code as a reference. ;
QEMU The Quick Emulator (QEMU) is a free and open-source emulator that uses dynamic binary translation to emulate a computer's processor; that is, it translates the emulated binary codes to an equivalent binary format which is executed by the mach ...
:To run Windows x86 binary applications directly on the ARM architecture, there is a need of an emulation, of course. QEMU is an open source emulator in Linux that can run Wine, but the result is unacceptably slow. QEMU interprets all x86 instructions in user space (including the Wine code); only in case of Linux system calls the application is running at full speed. The result is slow, because applications spend most of the time in the emulated user space, and less time in the kernel. But if the Win API DLLs, provided by Wine could be used outside of QEMU, they would run at full speed because they can be compiled natively, and the overall running speed should significantly improve. This way of combining Wine and QEMU, and putting Wineserver functions into the kernel, is the idea of Longene 2.0.


Users

Magic Linux – Magic Linux is a Chinese Linux distribution based on Red Hat Linux. Version 2.1 of Magic Linux, 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).Magic Linux 2.5 rc2 发布


Hardware requirements

The minimum hardware requirements to run are: *IA-32 processor *128 MB RAM *IDE or SATA harddisk *VGA compatible video card *Standard (PS/2 or USB) keyboard *PS/2 compatible mouse or Microsoft Mouse compatible serial mouse


Architecture support

*
IA-32 IA-32 (short for "Intel Architecture, 32-bit", commonly called ''i386'') is the 32-bit version of the x86 instruction set architecture, designed by Intel and first implemented in the i386, 80386 microprocessor in 1985. IA-32 is the first incarn ...
(working) *
x86-64 x86-64 (also known as x64, x86_64, AMD64, and Intel 64) is a 64-bit extension of the x86 instruction set architecture, instruction set. It was announced in 1999 and first available in the AMD Opteron family in 2003. It introduces two new ope ...
(not working, in progress) *
Loongson Loongson () is the name of a family of general-purpose, MIPS architecture-compatible, later in-house LoongArch architecture central processing unit, microprocessors, as well as the name of the Chinese Fabless manufacturing, fabless company (Loo ...
3 (not working, in progress) * ARM (not working, in progress) *Longene can also be run on software which emulates or virtualizes the above hardware, such as VMware and
VirtualBox Oracle VirtualBox (formerly Sun VirtualBox, Sun xVM VirtualBox and InnoTek VirtualBox) is a hosted hypervisor for x86 virtualization developed by Oracle Corporation. VirtualBox was originally created by InnoTek Systemberatung GmbH, which was ac ...
.


See also

*
ReactOS ReactOS is a Free and open-source software, free and open-source operating system for i586/amd64 personal computers that is intended to be binary-code compatibility, binary-compatible with computer programs and device drivers developed for Wind ...
* Cooperative Linux * Cygwin * NDISwrapper * Windows Services for UNIX * Windows Subsystem for Linux *
Wine (software) Wine is a free and open-source compatibility layer to allow application software and computer games developed for Microsoft Windows to run on Unix-like operating systems. Developers can compile Windows applications against WineLib to help po ...


References

{{Reflist, 30em Linux kernel