About Dazzle
Dazzle is a build environment centered around the Windows Driver Kit (WDK) and a pun on the environment used by the NT Group, called Razzle (to create the expression "Razzle Dazzle"). It is made up of a couple of shell scripts, DOSKey macros and a test suite, and it allows easy building of the entire TinyKRNL tree and/or of a single component, while handling all the proper WDK configuration settings necessary for things like producing debug symbols (PDB files) in the the right directories. Dazzle is made up of four scripts:
- Dazzle.cmd - Responsible for setting up Dazzle itself, this script is executed through a shortcut on the desktop. It sets the right WDK environment variables, loads the DOSKey macros and displays a help menu.
- Clean.cmd - Responsible for cleaning the entire tree by removing any generated files. Useful for debugging build problems or creating a clean copy of a directory.
- Test.cmd - Part of the Test Suite (see the Test Suite page for more information). Responsible for creating and/or mounting the test image, copying the test module (if any), and launching the emulation environment and, if specified, the Windows Debugger (WinDBG).
The complete and full documentation for Dazzle is available in the \tools\docs directory of the source tree. For anecdote's sake, the original information (written by Mark Lukovsky) for Razzle can be seen here: http://www.securityoffice.net/mssecrets/other/Startup.htm.
^ TOPPrerequisites
The only prerequisite for using Dazzle is a valid installation of the Windows Driver Kit (WDK), which can currently be obtained through an MSDN subscription or through participation in the Vista beta. The TinyKRNL project does not distribute the WDK. Do not ask. Usage of the DDK is currently not supported because both the IFS and HAL Kit are required for TinyKRNL development, and before the WDK, these kits were available only under NDA or prohibitive pricing. When the WDK becomes a fully public and final release, it will be freely obtainable by any developer. We apologize for the current situation, however, you can still develop isolated components by using only the DDK.
Once the WDK is installed, is it extremely important to setup the BASEDIR environment variable. This variable must point to the base installation directory of the WDK, and not the root directory. That is to say, for example, c:\winddk\5308, not merely c:\winddk. To do this, right-click on My Computer, click on Properties, go to the Advanced tab, and click on Environment Variables. Then click on New, and fill out the information. The dialog you will be seeing should look similar to this:

Starting Dazzle
Once the WDK is installed and the BASEDIR environment variable has been set, you need to create an icon to Dazzle, which will open up a "Dazzle Window". You can have multiple Dazzle Windows, and within this environment, all the Dazzle commands and macros will be functional and available to you. To create a shortcut to Dazzle, right-click on your desktop and follow the Add New Shortcut Wizard. When the wizard requests the path, write the following: "cmd.exe /k TinyKRNL-directory/tools/dazzle.cmd", for example: "cmd.exe /k c:\tinykrnl\tools\dazzle.cmd". Once the shortcut is created, make sure that "Start in" is set to your TinyKRNL directory. This is an example of how your shortcut properties might look like after creating the shortcut:

Make sure that the path after cmd.exe points to dazzle.cmd but that the "Start in" path points to the TinyKRNL directory and not Dazzle.
^ TOPBasic Usage
Once the shortcut has been created, it's time to start up your very first Dazzle Window. Once launched, you should see the following screen appear:

Before continuing, there are three important pieces of information to check.
- The title of the window should match what you see in this picture; especially important is the x86-fre text.
- The displayed WDK path should match your BASEDIR environment variable, and it should point to where the where the WDK has been installed.
- The displayed SRC path should point to the directory where you have checked out TinyKRNL and not the tools directory.
If any of these three things does not match, you will likely see errors and/or your build environment is invalid and corrupt. Retrace your steps; you probably forgot a small detail during configuration.
Once Dazzle is running, the commands available are shown on screen. For a simple user, the command you will most likely be working with the most is simply "make", which will build the entire tree. Writing the name of a module will build only that module instead; for example, writing "pci" will build the PCI Bus Driver. To launch the Test Suite, you can simply write "test", as a non-developer should not have the need to test only a single module. If you want to build a release, write "release", and this will create the entire \WINDOWS-equivalent tree in the release directory.
Later, this release directory will be directly copyable to an image or hard disk, or even to a CD in order to boot TinyKRNL. However, at this stage, this is not currently possible.