Skip to main content.

Goals and Motivations

As the cornerstone of all TinyKRNL Development, Phase 1 serves as a pillar for the upcoming phases, both in terms of code, as well as the experience gained by the team and relationships formed during this critical phase.

From a technical perspective, this phase aims to create the basic drivers required for a minimal boot into the Native Command Line Interface (NCLI), based on experiments done inside Bochs and QEMU with Windows 2003 SP1. These drivers will be coded by the team, and one of the first goals will be to ensure that the minimal Windows image created can still boot to the NCLI and that the same features should still work.

Apart from drivers, another major component needed for the kernel is the Hardware Abstraction Layer, or HAL. This large library will be written by a team of around 4 or 5 developers, and is the second most important component of the NT architecture, after the kernel. We expect this HAL to be fully ACPI compliant (halacpi.dll) as well as support SMP systems with Local I/O APICs.

The next big component which will be required to achieve a boot is the User Mode NT System Library (ntdll.dll), which native mode programs (and, indirectly, other subsystem programs) use to call kernel APIs or runtime library (Rtl) functions. This library is very large (upwards of 600kb) and will also probably consist of a large team of developers.

Finally, once all these components are shown to work in the same reliable and functional way as their Windows counterparts, work on the kernel will start, in order to be able to load these same drivers and launch the user mode command line.

Although these goals may seem very hard to reach and requiring long-term development, we believe that there are several factors which should help development considerably. For the drivers, almost half of them are available as sample source code in the Windows Driver Kit. By using and learning from this sample source code, it should considerably speed up our development of compatible drivers. Secondly, even for the other non-documented drivers, it is very possible that only about 50-60% of each driver would actually be used for Phase 1. Remember that we are not booting into graphical mode yet, and barely using any system resources. It's very likely that many code paths in the drivers will not be used, and could be left stubbed for the moment. This also applies to the HAL and ntdll.dll, and even more so because the latter only needs to be implemented enough to load and provide functionality for the NCLI. Although the NCLI is an advanced utility, it uses perhaps less then 40 Rtl functions (if that many at all), and those have already been mostly implemented in other projects such as ReactOS or WINE, so their code can be used as an example for our implementations. It's very possible that our ntdll.dll for Phase 1 will only be about 20-30KB. Therefore, the two longest individual components in terms of development time will probably be the HAL and the kernel itself.

On the documentation side, Phase 1 will prepare the initial documentation system for all source code. Every function, whether internal or external will come documented with a standard "comment header", inspired by the one proposed by Microsoft developer Larry Osterman, and present in some sample WDK code, although a bit modified. These comment headers are then parsed by Doxygen, which produces browsable documentation our servers, along with inlined source code for easy reading and debugging. Apart from code documentation, we are planning to publish some of the books which will become part of the TinyKRNL library. We hope to be able to publish two electronic articles on the NT Boot process. The first will deal with the boot phase from the Master Boot Record to the Kernel,  and the second will deal with the entire Kernel/HAL initialization algorithm, up until the last phase of the Executive startup routine. Additionally, we hope to have our first actually published book on the Windows NT Memory Manager.

Finally, as far as project organization goes, this phase will be critical for the team to grow and get to know itself, as well as to begin the first public announcements of the project and its goals. Like the cover of a book and a first impression, Phase 1 will be critical to further TinyKRNL development.

^ TOP

Components

Phase 1's components include all the minimum drivers and support files needed for the Test Suite to display the Native Command Line, as well as the early framework of the Kernel and much of the HAL. This includes the following components:

The completion status of these components can be viewed by visiting the status page, also accessible from the top left corner of the site header. Clicking on each component will reveal in-depth information about its implementation status.

^ TOP

Timeline

Assuming the projected timeline of 9 months for the entire development of Phase 1, the following tentative timeline is currently being worked with:

^ TOP

Milestones

Phase 1 has a number of important milestones which will demonstrate and publicly exhibit the current development status. The following have been selected:

  1. The Test Suite can run with the TinyKRNL Drivers and User-mode System DLL.
  2. The Test Suite can run with the TinyKRNL HAL.
  3. The Kernel initializes far enough for WinDBG/KD to connect to it; minimal debugging (reading/writing memory) is possible.
  4. The Kernel initializes far enough to display the boot logo and/or status messages on the screen.
  5. The Kernel initializes far enough to load the drivers proven to work in Milestone 1.
  6. The Kernel loads the first user-mode process, the Native Command Line Interface.
  7. The Test Suite components have been entirely replaced by TinyKRNL components which give the same functionality to the user.